2024-11-14 13:27:29 +00:00
|
|
|
# neuron-zk-generator
|
2024-10-19 13:03:04 +01:00
|
|
|
|
2024-11-14 13:17:26 +00:00
|
|
|
This Python application reads data from [my](https://github.com/thomasabishop/eolas) [zettelkasten](https://en.wikipedia.org/wiki/Zettelkasten) and
|
|
|
|
formats it so that it can be compiled as a [Neuron](https://neuron.zettel.page/) project and from there published as a static-site on the Web.
|
2024-10-19 13:03:04 +01:00
|
|
|
|
2024-11-14 13:17:26 +00:00
|
|
|
## Local development
|
2024-10-13 19:00:48 +01:00
|
|
|
|
2025-01-21 17:59:04 +00:00
|
|
|
Activate the virtual environment:
|
|
|
|
|
2024-10-19 13:03:04 +01:00
|
|
|
```sh
|
2024-10-13 19:00:48 +01:00
|
|
|
source venv/bin/activate
|
2024-11-14 13:17:26 +00:00
|
|
|
```
|
|
|
|
|
2025-01-21 17:59:04 +00:00
|
|
|
Run:
|
2024-11-14 13:17:26 +00:00
|
|
|
|
2025-01-21 17:59:04 +00:00
|
|
|
```sh
|
|
|
|
python3 src/app.py
|
2024-11-14 13:17:26 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Build single executable
|
2024-10-19 13:03:04 +01:00
|
|
|
|
|
|
|
Use `pyinstaller` to create single executable file. `pyinstaller` is installed
|
2024-11-14 13:27:29 +00:00
|
|
|
along with other packages specified in `setup.py`.
|
2024-10-19 13:03:04 +01:00
|
|
|
|
2025-01-21 17:59:04 +00:00
|
|
|
Ensure the virtual environment is running.
|
|
|
|
|
2024-10-19 13:03:04 +01:00
|
|
|
From root:
|
|
|
|
|
|
|
|
```sh
|
2025-01-21 17:59:04 +00:00
|
|
|
pyinstaller --onefile src/app.py --name neuron-zk-generator
|
2024-10-19 13:03:04 +01:00
|
|
|
# -F compiles to single file
|
|
|
|
```
|
|
|
|
|
|
|
|
Outputs to `neuron-zk-generator/dist/app`.
|
|
|
|
|
|
|
|
Sourcing the executable:
|
|
|
|
|
|
|
|
```sh
|
2025-01-21 17:59:04 +00:00
|
|
|
${HOME}/repos/neuron-zk-generator/dist/app
|
|
|
|
```
|
|
|
|
|
|
|
|
### Run executable as program
|
|
|
|
|
|
|
|
```sh
|
|
|
|
sudo mv ${HOME}/repos/neuron-zk-generator/dist/app /usr/local/bin
|
|
|
|
```
|
|
|
|
|
|
|
|
Then run with:
|
|
|
|
|
|
|
|
```
|
|
|
|
neuron-zk-generator
|
2024-10-19 13:03:04 +01:00
|
|
|
```
|