Nice library which can be used for converting html formatted content strings in JSON takeout archive to markdown:
Nice library which can be used for converting html formatted content strings in JSON takeout archive to markdown:
#!/usr/bin/python
import json
import sys
import html2text
converter = html2text.HTML2Text()
converter.ignore_links = True
for filename in sys.argv[1:]:
post = json.load(open(filename))
print ('%s :' % (filename, ))
if 'content' in post:
print(converter.handle(post['content']))
https://github.com/aaronsw/html2text
#!/usr/bin/python
import json
import sys
import html2text
converter = html2text.HTML2Text()
converter.ignore_links = True
for filename in sys.argv[1:]:
post = json.load(open(filename))
print ('%s :' % (filename, ))
if 'content' in post:
print(converter.handle(post['content']))
https://github.com/aaronsw/html2text
Very nice tool. Thank you.
ReplyDeleteTool originally created by en.wikipedia.org - Aaron Swartz - Wikipedia
ReplyDeleteRIP :(
Would it be possible for someone to create a post with photos on how to save your posts? I have many friends who wish to do so but are not technically able to understand how to accomplish it. Thank you.
ReplyDelete