1
0
Fork 0
mirror of https://github.com/marty-oehme/scripts.git synced 2025-12-10 22:12:45 +00:00

Version 0.2

This commit is contained in:
Maboroshy 2017-09-13 22:10:38 +04:00 committed by GitHub
parent 031666520f
commit 8a2a34c114
5 changed files with 249 additions and 129 deletions

View file

@ -23,7 +23,7 @@ def html_text(html_text, pandoc_bin='pandoc', pandoc_ver='1.19.1'):
'--atx-headers']
# Remove firefox reader mode panel if there's one
html_text = re.sub('<ul id="reader-toolbar" class="toolbar">.*</li></ul></ul>', '', html_text, flags=re.DOTALL)
html_text = re.sub('<ul id="reader-toolbar" class="toolbar">.*</li></ul></ul>', '', html_text, flags=re.DOTALL) ## TODO Maybe use html.parser
try:
pandoc_pipe = subprocess.Popen(pandoc_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE)
@ -66,4 +66,4 @@ def saved_html(html_path, folder_dir_path, pandoc_bin='pandoc', pandoc_ver='1.19
shutil.rmtree(os.path.splitext(html_path)[0] + '_files', True)
return md_text
return md_text