Improved command line instructions.

This commit is contained in:
The Wobbler 2025-04-09 21:04:48 +02:00
parent 41719a6888
commit 951d28c6e8

View file

@ -26,6 +26,15 @@ pip install pyyaml
### Command Line ### Command Line
The script is usable from the command line. It takes 2 arguments: `vault_path` and `metadata_path`. The script is usable from the command line. It takes 2 arguments: `vault_path` and `metadata_path`.
`metadata_path` comes after `vault_path` and is optional because it has a default value of `vault_path/metadata.json`. `metadata_path` comes after `vault_path` and is optional because it has a default value of `vault_path/metadata.json`.
It is recommended to put the `omg.py` into `~/bin/` and to make it executable with `chmod +x ~/bin/omg.py`.
If you did that, you can now delete every other file that came with OMG. The script is now executable from everywhere.
Example usage:
```shell
cd ~/.obsidian/myVault
omg.py .
```
### Python API ### Python API
To use the script as a module, simply import it and create an instance of the OMG class with the `path`-parameter set To use the script as a module, simply import it and create an instance of the OMG class with the `path`-parameter set