Skip to content

Commit

Permalink
Merge pull request #4 from zkhan12/dev
Browse files Browse the repository at this point in the history
use relative paths in log-html tool
  • Loading branch information
zkhan12 authored Jun 25, 2020
2 parents 5057534 + 5c6c6cd commit 2e5cbdc
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions logToHtml.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@ def build_parser():
description='accelBIDSTransform BIDS args',
formatter_class=RawTextHelpFormatter
)
parser.add_argument('log_dir', help='(must be absolute path) directory where log '
parser.add_argument('log_dir', help='directory where log '
'files are mounted')
parser.add_argument('output_file', help='location of the html output')
parser.add_argument('template_file', help='location of the html template')
parser.add_argument('rdss_log_dir', help='(must be absolute path) directory on '
'rdss drive containing logs')

return parser

Expand Down Expand Up @@ -41,11 +39,11 @@ def __init__(self, filename, status, path, date, time):
date = contents[0:10]
time = contents[11:19]
if 'ERROR' in contents:
accel_files.append(Accel(fil, 'ERROR', 'file:///' +
os.path.join(opts.rdss_log_dir, fil), date, time))
accel_files.append(Accel(fil, 'ERROR', 'file:' +
os.path.join(opts.log_dir, fil), date, time))
else:
accel_files.append(Accel(fil, 'SUCCESS', 'file:///' +
os.path.join(opts.rdss_log_dir, fil), date, time))
accel_files.append(Accel(fil, 'SUCCESS', 'file:' +
os.path.join(opts.log_dir, fil), date, time))

env = jinja2.Environment(
loader=jinja2.FileSystemLoader(searchpath=os.path.dirname(opts.template_file))
Expand Down

0 comments on commit 2e5cbdc

Please sign in to comment.