Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions generate_static_files.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@
" \n",
" for file_name in names:\n",
" p = nbconvert.export(nbconvert.get_exporter(to_format), file_name)\n",
" with open(os.path.join(target_dir, file_name[:-6] + p[1][\"output_extension\"]), 'w') as f:\n",
" with open(os.path.join(target_dir, file_name[:-6] + p[1][\"output_extension\"]), 'w', encoding='utf-8') as f:\n",
" f.write(p[0].encode(\"utf-8\"))\n",
" print file_name"
]
Expand Down Expand Up @@ -283,9 +283,9 @@
"metadata": {},
"outputs": [],
"source": [
"with open('index.md') as f:\n",
"with open('index.md', encoding='utf-8') as f:\n",
" text = f.read()\n",
" with open(os.path.join(\"static-files\", \"html\", \"README.md\"), \"w\") as g:\n",
" with open(os.path.join(\"static-files\", \"html\", \"README.md\"), \"w\", encoding='utf-8') as g:\n",
" g.write(text.replace(\".ipynb\", \".html\"))"
]
}
Expand Down