eolas-db/README.md

60 lines
1.1 KiB
Markdown
Raw Normal View History

2024-08-26 15:50:13 +01:00
# eolas-db
2024-11-14 09:21:01 +00:00
This CLI application parses entries in my
[zettelkasten](https://github.com/thomasabishop/eolas) and extracts key metadata
2025-01-21 17:43:59 +00:00
about each entry. It creates and populates an SQLite database and offers different options for
exporting representations of the relations.
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-01-21 17:43:59 +00:00
python3 src/cli.py [opts]
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
pyinstaller --onefile ${HOME}/repos/eolas-db/src/cli.py --name eolas-db [opts]
2024-11-14 09:21:01 +00:00
```
2025-01-21 17:43:59 +00:00
### Run executable
2024-11-14 09:21:01 +00:00
2025-01-21 17:43:59 +00:00
```sh
${HOME}/repos/eolas-db/dist/eolas-db
2024-11-14 09:21:01 +00:00
```
2025-01-21 17:43:59 +00:00
Or:
```sh
sudo mv ${HOME}/repos/eolas-db/dist/ /usr/local/bin
eolas-db [opts]
2024-11-14 09:21:01 +00:00
```
## Options
### `populate`
2025-01-21 17:43:59 +00:00
Parse entries and extract key metadata and body text, import into database
2024-11-14 09:21:01 +00:00
tables.
2024-11-03 14:31:15 +00:00
2025-01-21 17:43:59 +00:00
### `generate-graph`
Output a network graph of connections between entries and tags
### `export-tags`
Export a one-to-many JSON object of tags to entries.
2024-11-03 14:31:15 +00:00
## ERM
![ERM diagram for eolas-db](./eolas-db-ERM.png)
2024-11-11 14:34:41 +00:00
## Resources
https://www.digitalocean.com/community/tutorials/how-to-use-the-sqlite3-module-in-python-3