Skip to content
Snippets Groups Projects
Commit cd465aa9 authored by Jean-Luc Parouty's avatar Jean-Luc Parouty
Browse files

Update coocki for Windows compatibility

parent 2dac2728
No related branches found
No related tags found
No related merge requests found
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
# ---- Version ----------------------------------------------------- # ---- Version -----------------------------------------------------
# #
VERSION = '2.0.27' VERSION = '2.0.28'
# ---- Default notebook name --------------------------------------- # ---- Default notebook name ---------------------------------------
# #
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
# A simple module to run all notebooks with parameters overriding # A simple module to run all notebooks with parameters overriding
# Jean-Luc Parouty 2021 # Jean-Luc Parouty 2021
import sys,os import sys,os,platform
import json import json
import datetime, time import datetime, time
import nbformat import nbformat
...@@ -30,7 +30,7 @@ sys.path.append('..') ...@@ -30,7 +30,7 @@ sys.path.append('..')
import fidle.config as config import fidle.config as config
import fidle.cookindex as cookindex import fidle.cookindex as cookindex
VERSION = '1.2' VERSION = '1.4.1'
start_time = {} start_time = {}
end_time = {} end_time = {}
...@@ -77,7 +77,7 @@ def run_profile(profile_name, reset=False, filter=r'.*', top_dir='..'): ...@@ -77,7 +77,7 @@ def run_profile(profile_name, reset=False, filter=r'.*', top_dir='..'):
# ---- Report file -------------------------------------------------------- # ---- Report file --------------------------------------------------------
# #
metadata = config metadata = config
metadata['host'] = os.uname()[1] metadata['host'] = platform.uname()[1]
metadata['profile'] = profile_name metadata['profile'] = profile_name
report_json = top_dir + '/' + config['report_json' ] report_json = top_dir + '/' + config['report_json' ]
...@@ -223,8 +223,8 @@ def run_profile(profile_name, reset=False, filter=r'.*', top_dir='..'): ...@@ -223,8 +223,8 @@ def run_profile(profile_name, reset=False, filter=r'.*', top_dir='..'):
# ---- Save # ---- Save
save_dir = os.path.abspath( f'{top_dir}/{output_html}/{notebook_dir}' ) save_dir = os.path.abspath( f'{top_dir}/{output_html}/{notebook_dir}' )
os.makedirs(save_dir, mode=0o750, exist_ok=True) os.makedirs(save_dir, mode=0o750, exist_ok=True)
with open( f'{save_dir}/{output_name}.html', mode='w') as fp: with open( f'{save_dir}/{output_name}.html', mode='wb') as fp:
fp.write(body_html) fp.write(body_html.encode("utf-8"))
print(f' - Saved {save_dir}/{output_name}.html') print(f' - Saved {save_dir}/{output_name}.html')
# ---- Clean all ------------------------------------------------------ # ---- Clean all ------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment