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 command line support for markdown and text files. #198

Closed
wants to merge 1 commit into from

Conversation

mforbes
Copy link

@mforbes mforbes commented Mar 1, 2021

Alternative PR to #197 which includes command-line support for all supported formats dispatched based on file name extension. Resolves issue #196 gracefully.

Copy link
Member

@miketheman miketheman left a comment

Choose a reason for hiding this comment

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

Reviewing older issues, and found this one.

A couple of questions inline.

The current command line interface isn't covered via testing, so the introduction of more complex logic points to needing some.

You can install with one of: ::

pip install readme_renderer
pip install readme_renderer[me] # Includes Markdown support.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pip install readme_renderer[me] # Includes Markdown support.
pip install readme_renderer[md] # Includes Markdown support.

args = parser.parse_args()

if args.input.name.split(".")[-1].lower() == "md":
Copy link
Member

Choose a reason for hiding this comment

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

Would it make more sense to use Pathlib's .suffix and .match on this input instead?

@miketheman
Copy link
Member

Implemented via #271

@miketheman miketheman closed this Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants