Improve CI interface
Is your feature request related to a problem? Please describe.
Use case: Render a snippet of markdown in a file on disk into HTML.
Describe the solution you'd like
A commandline interface to parse markdown and render HTML (and optionally configure markdown-it-py first)
Describe alternatives you've considered
I could write a script with an argparse.ArgumentParser and use that; but that might as well just be a console_scripts entry_point in markdown-it-py; in which case an actual argparse.ArgumentParser is justifiied.
Additional context
None
Thanks for opening your first issue here! Engagement like this is essential for open source projects! :hugs:
If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.
If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).
Welcome to the EBP community! :tada:
Heya, note there is already a CLI interface (accepts a file or starts in interactive mode):
$ markdown-it
markdown-it-py [version 0.1.0] (interactive)
Type Ctrl-D to complete input, or Ctrl-C to exit.
>>> > **hallo** there!
...
<blockquote>
<p><strong>hallo</strong> there!</p>
</blockquote>
Its not particularly well documented though, and it can't be configured, so indeed these could be improved.
See: https://github.com/executablebooks/markdown-it-py/blob/master/markdown_it/cli/parse.py
I should've looked more closely for the entry_point in setup.py.
- #54 (Pending merge)
- [ ] DOC: cli.parse: Add description and maybe also epilog with usage examples https://docs.python.org/3/library/argparse.html#description
- [ ] DOC: README.md: Include output of
markdown-it -hunder e.g. Usage > CLI
- [ ] ENH: Add output path(s)?
- [ ] ENH: Add way to do configuration
- Discussion: INI / TOML / YAML / Python and/or lots of
--args-to-test
- Discussion: INI / TOML / YAML / Python and/or lots of
- [ ] "BUG: cli.parse: return 0 for non-error" https://github.com/executablebooks/markdown-it-py/pull/55 (pending merge)