Skip to content

read from STDIN or file argument #4

Closed

Description

@logicminds

Awesome utility. It would be nice to be able to have this read from STDIN or from a --file attribute.

Activity

  1. ekalinin commented on Mar 12, 2015

    @ekalinin
    Owner

    Thanks for idea. Seems, it make sense.

  2. shrayasr commented on Mar 21, 2015

    @shrayasr

    👍 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: --urls followed by a list of urls and --files followed by a list of files.

  3. logicminds commented on Mar 21, 2015

    @logicminds
    Author

    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.

  4. shrayasr commented on Mar 21, 2015

    @shrayasr

    Which means that one can process a combination of both URLs and File Paths. 🆒

  5. logicminds commented on Mar 21, 2015

    @logicminds
    Author

    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.

  6. shrayasr commented on Mar 22, 2015

    @shrayasr

    Agree. I too see more value in doing this one by one than all together. I just pipe it to pbcopy and voila, i'm good to go.

    But since the tool already supports multiple URL conversion, I brought this up. Not a good idea to break compatibility.

  7. shrayasr commented on Mar 22, 2015

    @shrayasr

    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

  8. ekalinin commented on Mar 22, 2015

    @ekalinin
    Owner

    Guys,

    Thanks for discussion.
    Just added an ability to proccess local markdown files (but not only remote html).
    Seems, works. Check out new README

  9. shrayasr commented on Mar 23, 2015

    @shrayasr

    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 .md to .html

    👍 😄

  10. ekalinin commented on Mar 23, 2015

    @ekalinin
    Owner

    Thank you :)

  11. added a commit that references this issue on Mar 23, 2015
    b314da3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions