Skip to content

Commit 2e5cbdc

Browse files
authored
Merge pull request #4 from zkhan12/dev
use relative paths in log-html tool
2 parents 5057534 + 5c6c6cd commit 2e5cbdc

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

logToHtml.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@ def build_parser():
88
description='accelBIDSTransform BIDS args',
99
formatter_class=RawTextHelpFormatter
1010
)
11-
parser.add_argument('log_dir', help='(must be absolute path) directory where log '
11+
parser.add_argument('log_dir', help='directory where log '
1212
'files are mounted')
1313
parser.add_argument('output_file', help='location of the html output')
1414
parser.add_argument('template_file', help='location of the html template')
15-
parser.add_argument('rdss_log_dir', help='(must be absolute path) directory on '
16-
'rdss drive containing logs')
1715

1816
return parser
1917

@@ -41,11 +39,11 @@ def __init__(self, filename, status, path, date, time):
4139
date = contents[0:10]
4240
time = contents[11:19]
4341
if 'ERROR' in contents:
44-
accel_files.append(Accel(fil, 'ERROR', 'file:///' +
45-
os.path.join(opts.rdss_log_dir, fil), date, time))
42+
accel_files.append(Accel(fil, 'ERROR', 'file:' +
43+
os.path.join(opts.log_dir, fil), date, time))
4644
else:
47-
accel_files.append(Accel(fil, 'SUCCESS', 'file:///' +
48-
os.path.join(opts.rdss_log_dir, fil), date, time))
45+
accel_files.append(Accel(fil, 'SUCCESS', 'file:' +
46+
os.path.join(opts.log_dir, fil), date, time))
4947

5048
env = jinja2.Environment(
5149
loader=jinja2.FileSystemLoader(searchpath=os.path.dirname(opts.template_file))

0 commit comments

Comments
 (0)