9 # Define all possible option for log command : sat log <options>
10 parser = src.options.Options()
11 parser.add_option('t', 'terminal', 'boolean', 'terminal', "Terminal log.")
16 return _("Gives access to logs of salomeTools.")
18 def run(args, runner):
19 (options, args) = parser.parse_args(args)
23 # Find stylesheet Directory and files
24 xslDir = os.path.join(runner.cfg.VARS.srcDir, 'xsl')
25 xslCommand = os.path.join(xslDir, "command.xsl")
26 xslHat = os.path.join(xslDir, "hat.xsl")
27 imgLogo = os.path.join(xslDir, "LOGO-SAT.png")
29 # get the log direcory. If there is an application, it is in cfg.APPLICATION.out_dir, else in user directory
30 logDir = runner.cfg.VARS.logDir
32 # copy the stylesheet in the log directory
33 shutil.copy2(xslCommand, logDir)
34 shutil.copy2(xslHat, logDir)
35 shutil.copy2(imgLogo, logDir)
37 xmlHatFilePath = os.path.join(logDir, 'hat.xml')
38 src.xmlManager.update_hat_xml(logDir)
40 src.system.show_in_editor(runner.cfg.USER.browser, xmlHatFilePath)