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

Mention wrapper program in README.md? #21

Closed
suntong opened this issue Jul 26, 2020 · 8 comments
Closed

Mention wrapper program in README.md? #21

suntong opened this issue Jul 26, 2020 · 8 comments

Comments

@suntong
Copy link
Contributor

suntong commented Jul 26, 2020

Hi @JohannesKaufmann

I love your project so much that I added a wrapper program to it:

$ html2md -i https://github.com/suntong/lang
[Homepage](https://github.com/)
. . . 


$ html2md -i https://github.com/suntong/lang -s 'div#readme'   
## README.md

# lang -- programming languages demos

Would it be OK that I PR to README.md to mention html2md when it is ready? So far I'm having these planned out:

$ html2md
HTML to Markdown
Version 0.1.0 built on 2020-07-26
Copyright (C) 2020, Tong Sun

HTML to Markdown converter on command line

Usage:
  html2md [Options...]

Options:

  -h, --help                       display help information 
  -i, --in                        *The html/xml file to read from (or stdin) 
  -d, --domain                     Domain of the web page, needed for links when --in is not url 
  -s, --sel                        CSS/goquery selectors [=body]
  -v, --verbose                    Verbose mode (Multiple -v options increase the verbosity.) 

      --opt-heading-style          Option HeadingStyle 
      --opt-horizontal-rule        Option HorizontalRule 
      --opt-bullet-list-marker     Option BulletListMarker 
      --opt-code-block-style       Option CodeBlockStyle 
      --opt-fence                  Option Fence 
      --opt-em-delimiter           Option EmDelimiter 
      --opt-strong-delimiter       Option StrongDelimiter 
      --opt-link-style             Option LinkStyle 
      --opt-link-reference-style   Option LinkReferenceStyle 

  -A, --plugin-conf-attachment     Plugin ConfluenceAttachments 
  -C, --plugin-conf-code           Plugin ConfluenceCodeBlock 
  -F, --plugin-frontmatter         Plugin FrontMatter 
  -G, --plugin-gfm                 Plugin GitHubFlavored 
  -S, --plugin-strikethrough       Plugin Strikethrough 
  -T, --plugin-table               Plugin Table 
  -L, --plugin-task-list           Plugin TaskListItems 
  -V, --plugin-vimeo               Plugin VimeoEmbed 
  -Y, --plugin-youtube             Plugin YoutubeEmbed 

Thanks

@suntong
Copy link
Contributor Author

suntong commented Jul 26, 2020

First round done:

$ echo '<strong>Bold Text</strong>' | html2md -i
**Bold Text**

$ echo '<strong>Bold Text</strong>' | html2md -i --opt-strong-delimiter="__"
__Bold Text__


$ echo '<ul><li><input type=checkbox checked>Checked!</li><li><input type=checkbox>Check Me!</li></ul>' | html2md -i -G
- [x] Checked!
- [ ] Check Me!

$ echo 'Only <del>blue ones</del> <s> left</s>' | html2md -i --plugin-strikethrough
Only ~blue ones~~left~

BTW, does that strikethrough plugin result look good? -- seems at least one space between "ones" and "left" is missing.

Only blue ones~~left

@JohannesKaufmann
Copy link
Owner

@suntong looks cool 🎉. You can, of course, create a PR once it's nearly finished. I will then test the CLI a bit before merging.

That also means we should communicate when mayor bug fixes are done. I would say that my library is stable, as in all changes are backwards compatible. But there are still many edge cases that I'm finding and that means many commits. But I will introduce versioning soon.

@suntong
Copy link
Contributor Author

suntong commented Jul 27, 2020

My html2md is done now. Sorry I should have mentioned it's location, it's the newest project under my github -- https://github.com/suntong/html2md. Only the output of https://github.com/suntong/html2md#using-goquery is missing, which will be there once #22 is fixed. Please take a look, and give me some feedbacks. thanks

PS. will submit PR to mention html2md in README.md tonight.

@JohannesKaufmann
Copy link
Owner

@suntong just wanted to let you know that I'm quite busy in the next couple of days. But I haven't forgotten it and will take care of it sometime next week.

@JohannesKaufmann
Copy link
Owner

@suntong I had a look at it and it seems to be working quite well 💯

The recent changes:

  • the Table Plugin is not experimental anymore
  • there is now a new plugin called TableCompat for environments where tables are not supported
  • I had to rename the experimental plugins from EXPERIMENTAL_Xxx to EXPERIMENTALXxx (without the underscore, to make the linter happy)

@suntong
Copy link
Contributor Author

suntong commented Aug 9, 2020

Thanks for the review & udpates and all the previous fixes Johannes.

My html2md is now updated. See https://github.com/suntong/html2md#testing-the-new-table-plugins

I've also submitted a PR to close this. Please review.

thanks

@JohannesKaufmann
Copy link
Owner

@suntong I just merged your PR. Thanks alot for your work on the CLi 🎉

@suntong
Copy link
Contributor Author

suntong commented Aug 10, 2020

Oh, thanks for that, and most importantly thanks for the html-to-markdown library. This is something that I had been searching over and over throughout the years for several years now -- very glad you are providing it now.

It has been a pleasant experience working with you -- I had been hoping that you tag a release version, but before I asked for it officially, you've already did it. I've started the process of package it into the official Debian repository -- https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968146. There are a few dependencies that need to be dealt with first, but we will be there...

cheers

AnastasiaShemyakinskaya pushed a commit to anyproto/html-to-markdown that referenced this issue Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants