turndown
turndown copied to clipboard
added executable
After doing sudo npm link
, users can do html2markdown [html]
or echo [html] | html2markdown
and get markdown printed to stdout.
+1
Thanks for this. My only concern is naming. The command should probably match the existing API.
However, perhaps the project name should change to something like html2markdown
, html2md
, or htmlToMd
to be a bit more explicit?
+1 for an executable.
I replied @garbados's commit on top of the current HEAD in this branch if it can help.
Also @domchristie, for your naming concern, I think html2markdown is a good name (I like html2md too, but since the original Markdown command is markdown, I believe html2markdown is a better fit).
I'm proposing a global rename here, to unify the API, packages and command naming. Naturally, it will break the backward compatibility, and will force you to rename the repository (I assume new URLs in the above rename commit) and Bower/npm packages.
Tests don't pass because of the #2 bug, but I see no more or less breaking than before applying the changes.
Any input on this?
I’m sorry I’ve not replied. I’m still thinking about the naming issue, and the implications it may have e.g. for bower and npm
Okay, no problem.
Well I realize html2markdown is already registered on npm, so while I liked the name, it won't be an option.
html2md is available on both Bower an npm, even shorter to type and still explicit about input and output formats.
Otherwise, I think it's acceptable to keep the current repository/package name to-markdown for the CLI, thus no need to rename the core and packages, nor break the backward compatibility. Even it's a bit less explicit, I don't think it will conflict with other programs (I'm not aware of another to-markdown program doing for example AsciiDoc to Markdown conversion or something like this).
Anyway, no hurry. :)
This would be nice.
bump
@ahane please see https://github.com/domchristie/turndown/pull/209 and help outwit feedback/documentation. Thanks!