Codimd: Make the "Download as Markdown" link wget friendly

Created on 23 Jan 2017  路  11Comments  路  Source: hackmdio/codimd

Hackmd.io provides an awesome web interface, but lacks some functions such as full-text search. These features can be provided by local tools, such as grep. Right now there is no way to export all notes to the local filesystem, it is only possible to do it one by one. "Download as Markdown" is a javascript-based button. If this link is wget friendly, I can easily download all notes with a script, then manipulate notes with my local binaries.

Most helpful comment

Any chance of making the /download to work also HTML and other formats?

In Etherpad the different formats can be conveniently downloaded, just by modifying the URL

.../export/html or .../export/txt

All 11 comments

Thanks @qiuwch.
We have a temp api for "download as markdown" which is adding /download after your note link.
For example: https://hackmd.io/features/download will give you the raw markdown with content-type text/markdown.

Thanks, @jackycute. This is exactly what I am looking for. Awesome.

What if I want to download a private note? Is there a way to provide authentication info in the request header? Thanks.

Nope, not for now.
What you're asking for is API which already filed in #11
We'll need to build a OAuth process to allow programmatic usage.
Or an easy way is give every user a pair of key and secret like Hackpad did so.

Thanks. This prevents me from creating a simple full-text search solution based on grep.
But what you have provided is already pretty awesome.

No problem, please subscribe to the that API issue and you'll be informed 馃槃

Is there a way to Export history with code, besides clicking the button on the web interface?

Yes, but it only works when you've signed in.
For example, visit: https://hackmd.io/history will see all your history list.

So there is no way to get it with a script, right? This is similar to the API issue I mentioned.

Yeah, currently you won't able to fetch it because not authorized.
This part will also come along with API.

Any chance of making the /download to work also HTML and other formats?

In Etherpad the different formats can be conveniently downloaded, just by modifying the URL

.../export/html or .../export/txt

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LukasKalbertodt picture LukasKalbertodt  路  4Comments

dsprenkels picture dsprenkels  路  3Comments

ghost picture ghost  路  4Comments

ccoenen picture ccoenen  路  3Comments

mxmilkiib picture mxmilkiib  路  3Comments