turndown icon indicating copy to clipboard operation
turndown copied to clipboard

added executable

Open garbados opened this issue 10 years ago • 9 comments

After doing sudo npm link, users can do html2markdown [html] or echo [html] | html2markdown and get markdown printed to stdout.

garbados avatar Nov 21 '13 20:11 garbados

+1

raineorshine avatar Apr 02 '14 00:04 raineorshine

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?

domchristie avatar Aug 04 '14 20:08 domchristie

+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.

valeriangalliat avatar Nov 15 '14 11:11 valeriangalliat

Any input on this?

valeriangalliat avatar Dec 12 '14 08:12 valeriangalliat

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

domchristie avatar Dec 12 '14 23:12 domchristie

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. :)

valeriangalliat avatar Dec 13 '14 13:12 valeriangalliat

This would be nice.

geyang avatar Jul 20 '15 05:07 geyang

bump

ahane avatar Apr 20 '18 09:04 ahane

@ahane please see https://github.com/domchristie/turndown/pull/209 and help outwit feedback/documentation. Thanks!

domchristie avatar Apr 20 '18 09:04 domchristie