-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
read from STDIN or file argument #4
Comments
Thanks for idea. Seems, it make sense. |
👍 from me. If we consider implementing this, multiple files might be a requirement like multiple URLs. Does it makes sense then for a new flag to be introduced to indicate the source? Eg: |
I would just read the arguments given on the command line and write a function to determine if its a url or file path, then process each. |
Which means that one can process a combination of both URLs and File Paths. 🆒 |
Personally, I think processing one file at a time would be easier since the output goes to stdout. I am not sure when I would process multiple files at once because the output would be hard to distinguish between each file. |
Agree. I too see more value in doing this one by one than all together. I just pipe it to But since the tool already supports multiple URL conversion, I brought this up. Not a good idea to break compatibility. |
Took some time out since last night to understand the core logic of how this works. It generates the TOC based on the HTML and not on the markdown. Making it work with local files would mean quite a lot of change because of this. Please correct me if I'm wrong @ekalinin |
Guys, Thanks for discussion. |
Just noticed how you did it (https://github.com/ekalinin/github-markdown-toc/blob/master/gh-md-toc#L42-L53). That's pretty darned epic. Didn't know GH had an api to convert 👍 😄 |
Thank you :) |
Awesome utility. It would be nice to be able to have this read from STDIN or from a --file attribute.
The text was updated successfully, but these errors were encountered: