eolas-db/README.md

50 lines
1.4 KiB
Markdown
Raw Normal View History

2024-08-26 15:50:13 +01:00
# eolas-db
A Python application that parses Markdown entries in my
2025-10-19 12:02:25 +01:00
[zettelkasten](https://github.com/thomasabishop/eolas), extracts the content
and metadata and inserts it into an SQLite database.
2025-10-19 12:02:25 +01:00
It is a constituent part of my knowledge management system comprising [eolas](https://forgejo.systemsobscure.net/thomasabishop/eolas),
[eolas-api](https://forgejo.systemsobscure.net/thomasabishop/eolas-api), and [eolas-app](https://forgejo.systemsobscure.net/thomasabishop/eolas-app).
Usage:
```sh
app.py --source="/my-zettelkasten-entries" --target="/tmp/zettelkasten-output-dir"
```
2025-10-19 12:02:25 +01:00
- `--source`
- The directory containing the Markdown files
2025-10-19 12:02:25 +01:00
- `--target`
- The location where the resulting SQLite file should be save
2024-10-31 15:40:05 +00:00
2024-11-03 14:31:15 +00:00
## Local development
2024-10-31 15:40:05 +00:00
2025-01-21 17:43:59 +00:00
```sh
2024-10-31 15:40:05 +00:00
source venv/bin/activate
2025-10-19 12:02:25 +01:00
python3 src/app.py --source="/my-zettelkasten-entries" --target="/tmp/zettelkasten-output-dir"
2024-11-14 09:21:01 +00:00
```
## Production
2025-01-21 17:43:59 +00:00
### Generate single executable
2024-11-14 09:21:01 +00:00
2025-01-21 17:43:59 +00:00
```sh
source venv/bin/activate
sudo pyinstaller --onefile ./src/app.py --distpath="/usr/local/bin/eolas-db"
2024-11-14 09:21:01 +00:00
```
2025-10-19 12:02:25 +01:00
### Run executable
2025-01-21 17:43:59 +00:00
```sh
/usr/local/bin/eolas-db/app --source="/my-zettelkasten-entries" --target="/tmp/zettelkasten-output-dir"
2024-11-14 09:21:01 +00:00
```
2025-10-19 12:02:25 +01:00
## ERM
2024-11-03 14:31:15 +00:00
2025-10-19 12:02:25 +01:00
![ERM diagram for eolas-db](./eolas-db-ERM.png)
2025-01-21 17:43:59 +00:00
> In addition to the tables listed in the diagram, there is a [full-text search](https://sqlite.org/fts5.html) virtual table applied to `entries`. This enables search queries against the text of every entry.
2024-11-11 14:34:41 +00:00