Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added executable #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

added executable #29

wants to merge 2 commits into from

Conversation

garbados
Copy link

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

@raineorshine
Copy link

+1

@domchristie
Copy link
Collaborator

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?

@valeriangalliat
Copy link

+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
Copy link

Any input on this?

@domchristie
Copy link
Collaborator

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

@valeriangalliat
Copy link

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

@geyang
Copy link

geyang commented Jul 20, 2015

This would be nice.

process.stdin.on('end', function() {
main(input);
});
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing final newline :(

@ahane
Copy link

ahane commented Apr 20, 2018

bump

@domchristie
Copy link
Collaborator

@ahane please see #209 and help outwit feedback/documentation. Thanks!

kytrun referenced this pull request in linkue/turndown-rn Jul 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants