nicceboy / python-markdown-generator Goto Github PK
View Code? Open in Web Editor NEWPython library for dynamically generating HTML sanitised Markdown syntax.
License: MIT License
Python library for dynamically generating HTML sanitised Markdown syntax.
License: MIT License
Hi, thanks for the nice library. I'm using it to generate some md docs and then using reveal.js to host a mini-web of slides.
I'm wondering if it would be nicer if make the lib more functional by touching function names a bit, to rename some of the functions from addXXX(write_to_fle = false)
to get_xxx()
and return the markdown raw string instead.
I have errors with correctly instalation this package from pip.
ModuleNotFoundError: No module named 'markdowngenerator.config'
I was install this package manually, but I want include this package to requirements.txt and users will have this problem.
Just going thru the project and noticed following:
from markdowngenerator import MarkdownGenerator
This triggers following error:
>>> from markdowngenerator import MarkdownGenerator
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: cannot import name 'MarkdownGenerator' from 'markdowngenerator' (/Users/rasjani/src/omat/ghteststatus/venv/lib/python3.9/site-packages/markdowngenerator/__init__.py)
MarkdownGenerator
to all lowercase, bypasses above issue but then:>>> from markdowngenerator import markdowngenerator
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/rasjani/src/omat/ghteststatus/venv/lib/python3.9/site-packages/markdowngenerator/markdowngenerator.py", line 10, in <module>
from .config.syntax import (
ModuleNotFoundError: No module named 'markdowngenerator.config'
>>>
@Nicceboy I've been playing with your code and was curious if this could be adapted to extended to start generating the keyboard-review.md
on step 3 of this Pelican Tutorial
Does this work with Mermaid for charts?
Now if, and that might be a big if, I'm wanting to know how I could extend what you wrote to write more keyboard-review.md
type blog posts. I do lots of Natural Language Processing and Machine Learning so being able to generate .md files is a very helpful tool... and If I can adapt it to Pelican now I've mostly automated a blog and website.
Hi,
Thank you for this great library,
It seems that the following exception is being raised whenever i use the context manager of the library:
File ~/libdoc-markdown/.tox/ipython/lib/python3.10/site-packages/markdowngenerator/markdowngenerator.py:232, in MarkdownGenerator.genTableOfContent(self, linenumber, max_depth)
230 if self.enable_write:
231 self.document.close()
--> 232 self.document = open(self.file, "w")
233 self.document.writelines(self.document_data_array)
AttributeError: 'MarkdownGenerator' object has no attribute 'file'
Most probably is a mistypo: self.filename
rather than self.file
ERROR: Package 'python-markdown-generator' requires a different Python: 3.9.0 not in '>=3.10,<4.0'
This is intentional?
Thanks,
Theo
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.