Markdown -> HTML -> pdf on the fly
Project description
Test
- hello world
def fenced_code():
for i in range(10):
print("hello world")
some pseudo code
- hows this?
- italic
- bold
- both
notetaking with python
- write a file in markdown/html
- running
notetaking <file>
will convert it to a pdf and open a pdfviewer (mupdf?) - notetaking will continue to run in the background, every time the file is saved the pdf should update
- if the document is closed stop notetaking and close the pdf
- this might not be possible because different editors will edit the file in different ways
- if the pdf is closed stop notetaking
- if there are any errors we need to notify the user via the OS, hoopefully this is universal
TODO
- include easy css support
- also call notetaking from vim
- log errors in markdown syntax
- config file, maybe use envionment variables?
- better logging messages
Limitations
There is currently no way to track errors (syntax or otherwise) in the markdown, html or css you write.
I havent found any lightweight math rendering yet https://github.com/mbarkhau/markdown-katex has worked but is very slow
Can't update in realtime. Relies on linux signals when a file is saved. Could use .file.swp
but
Useful resources
- inotify to track changes to the file https://unix.stackexchange.com/questions/88399/how-to-generate-signal-interrupt-on-a-file-descriptor-in-linux
- might even be able to track changes to the vim .swp file too
- [python-markdown]: https://python-markdown.github.io/ for converted markdown and html with nested markdown into markdown
Install
git clone ...
pip3 install -r requirements.txt
Packaging
python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*
- add
let @t=':read! screenshot %^M'
to your vimrc
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
notetaking-0.0.1.tar.gz
(19.1 kB
view hashes)
Built Distributions
notetaking-0.0.1-py3.6.egg
(11.9 kB
view hashes)
notetaking-0.0.1-py3-none-any.whl
(20.9 kB
view hashes)
Close
Hashes for notetaking-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4a06200851664aac4cb387c3e077bad867e7fcef0432759f5519de3c7423d91 |
|
MD5 | 356c4ec6a5c9211ba19a5ede5e4ebba2 |
|
BLAKE2b-256 | fe5d1ec095c839e24c748ed56c47e8c61c963b1f493eb5fe22b89667a3a88329 |