markdown-calendar/README.md

26 lines
1014 B
Markdown
Raw Permalink Normal View History

2024-10-03 21:02:29 +03:00
# markdown_sqlite.py
This script processes a markdown file by reading its content and
updates an SQLite database with document content and metadata.
The user can then select specific topics based on command-line arguments.
The script tracks changes using MD5 hashes and ensures the database
2024-10-03 21:06:45 +03:00
reflects the current state of the markdown file.
2024-10-03 21:02:29 +03:00
2024-10-03 21:12:59 +03:00
Script was writen on Python 3.11.
2024-10-03 21:10:13 +03:00
It has two external libraries:
- markdown-it-py
- thefuzz[speedup]
2024-10-03 21:04:07 +03:00
usage:
$ python3.11 markdown_sqlite.py --bootstrap
$ python3.11 markdown_sqlite.py September
$ nvim calendar.md
$ python3.11 markdown_sqlite.py
2024-10-03 21:02:29 +03:00
2024-10-03 21:04:07 +03:00
arguments:
-m, --markdown: Path to markdown file (default: 'calendar.md').
-d, --database: Path to SQLite database file (default: 'markdown.db').
topic_title: Optional topic for content selection (fuzzy matching enabled).
--bootstrap: If provided, generates markdown calendar for the current year and loads it to the database.
--ls: If provided, lists all available headings.