Created
July 12, 2013 21:52
-
-
Save trobrock/5988153 to your computer and use it in GitHub Desktop.
mutt html to markdown
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from sys import argv | |
import html2text | |
file_name = argv[1] | |
fh = open(file_name) | |
contents = fh.read() | |
fh.close() | |
print html2text.html2text(contents) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'reverse_markdown' | |
file = ARGV[0] | |
contents = File.read file | |
print ReverseMarkdown.parse contents |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment