Skip to content

Instantly share code, notes, and snippets.

@trobrock
Created July 12, 2013 21:52
Show Gist options
  • Save trobrock/5988153 to your computer and use it in GitHub Desktop.
Save trobrock/5988153 to your computer and use it in GitHub Desktop.
mutt html to markdown
#!/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)
#!/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