4 ms·
curl --silent https://example.com/foo.html | pandoc --from html --to markdown_strict -o foo.md From Converting HTML to Markdown using Pandoc http://www.cantoni
by miles 6y ago
curl --silent https://example.com/foo.html | pandoc --from html --to markdown_strict -o foo.md
From Converting HTML to Markdown using Pandoc http://www.cantoni.org/2019/01/27/converting-html-markdown-using-pandoc http://www.cantoni.org/2019/01/27/converting-html-markdown-u...
- I_complete_me 6y agoI tried that on a HackerNews page and the content of the output file foo.md was in html.
- miles 6y agoSorry, had only tested it on my own site, which worked as expected: curl --silent https://tinyapps.org/ | pandoc --from html --to markdown_strict -o index.md
- crazypython 6y agoI'd like to add that Calibre (ebook-convert on the CLI) has a mode for outputting a .txt file with markdown formatting. It can take HTML as input.