
Ask HN: CLI tool to download webpages and convert to Markdown? - raytracer
Is there a CLI tool that downloads webpages and converts them to Markdown?<p>I&#x27;ve just started using Obsidian https:&#x2F;&#x2F;obsidian.md&#x2F; and would like a way to save interesting blog posts and articles.
======
miles

      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-u...](http://www.cantoni.org/2019/01/27/converting-html-markdown-
using-pandoc)

~~~
I_complete_me
I tried that on a HackerNews page and the content of the output file foo.md
was in html.

~~~
miles
Sorry, 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

------
longimanus
I find Joplin [https://joplinapp.org](https://joplinapp.org) does a good job
of producing markdown from web pages and already has sync capability built in.
Looks like it would be ideal for working with Obsidian

~~~
longimanus
Exported my Joplin markdown and opened it up in Obsidian. Works like a dream
and the best part is Jopli already has it's own web clipper. Seems like a
superb match

------
dougskinner
I made this a couple weeks ago:
[https://www.npmjs.com/package/@dougskinner/markdowner](https://www.npmjs.com/package/@dougskinner/markdowner)

------
anandology
[https://github.com/aaronsw/html2text](https://github.com/aaronsw/html2text)

~~~
miles
Thank you, Anand. Despite being 8 years old, Aaron's html2text.py worked
perfectly to convert the HN homepage to Markdown. His memory (and code)
continues to be a blessing!

