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:
parent
031666520f
commit
8a2a34c114
5 changed files with 249 additions and 129 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue