Build index and generate HTML for markdown notes
mynotes builds indexes and converts to HTML a tree of notes written in Markdown.
The index building phase creates new index files (still in Markdown) that contains links to files and subfolders of the local folder.
As example, index files for the tree
are generated as following
- index.md (with links to a1.md and a2.md)
- index.md (with links to BB/index.md and b1.md)
- index.md (with link to bb1.md)
- index.md (with links to A/index.md, B/index.md and c.md)
The html generation phase creates HTML files from Markdown files (including ToC and links to upper/top index).
Additional files that are not strictly part of the notes (thus files not with Markdown format) can be placed in folders _files. These folders are by default ignored when building the indexes and generating HTML files.
Python 3.6+ is required to run mynotes.
The package can be installed directly from PyPi using pip:
pip install mynotes
or downloaded from the release/tags page and then installed using pip:
pip install mynotes-xxx.tar.gz
mynotes package contains two scripts for command line interaction.
- mynotes-build builds the index files.
usage: mynotes-build [-h] [--verbose] [--config CONFIG] Build index files for notes tree. optional arguments: -h, --help show this help message and exit --verbose, -v Increase verbosity --config CONFIG, -c CONFIG Configuration file
- mynotes-genhtml generates HTML files into a dedicated folder.
usage: mynotes-genhtml [-h] [--verbose] [--config CONFIG] Generate HTML files for markdown files. optional arguments: -h, --help show this help message and exit --verbose, -v Increase verbosity --config CONFIG, -c CONFIG Configuration file
mynotes writes the its configuration in a configuration file (.mynotes.ini). This file is created automatically if it does not exist and default configuration values are used.
mynotes takes only into account section [mynotes] thus the configuration could be written in common file, e.g. setup.cfg.
The configuration keys are:
|index||Name of index files (with markdown extension)|
|home||Main file of a directory (comes on top of the index list and is included in index HTML files.|
|excl_dirs||Directories to exclude, independent from path.|
|excl_files||Files to exclude, independent from path. The index file is not ignore when generating HTML files.|
|md_ext||Extension for Markdown files, must be used for index and home keys.|
Activated plugins for HTML generation:
Example of configuration file:
[mynotes] index = index.md home = home.md excl_dirs = .git _files _html excl_files = .gitignore .python-version index.md Makefile .mynotes.ini md_ext = .md plugins_html = links-index toc
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size mynotes-1.0.1-py3-none-any.whl (32.3 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size mynotes-1.0.1.tar.gz (27.0 kB)||File type Source||Python version None||Upload date||Hashes View|