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

Add examples for usage from other python scripts #9

Open
MiaMish opened this issue Jan 18, 2019 · 2 comments
Open

Add examples for usage from other python scripts #9

MiaMish opened this issue Jan 18, 2019 · 2 comments

Comments

@MiaMish
Copy link

MiaMish commented Jan 18, 2019

I was looking for a library to pretty print md files from within my own python script, and not as a standalone cli.

This package works great, you should add examples for using the renderer directly from other scripts:

import consolemd
with open('README.md', 'r') as readme:
   readme_content = readme.read()
renderer = consolemd.Renderer()
renderer.render(readme_content)

cheers

@kneufeld
Copy link
Owner

That's a good idea, I'll do that. Thanks for the suggestion!

@mcintyre321
Copy link

Came here for this, thanks for the snippet!

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

3 participants