Open blattms opened 6 months ago
Would be cool to have a working default for --maindir if the scripts are called from the root directory of the git repo
@blattms Maybe.. I always called the scripts like this:
$ cd scripts/python
$ poetry shell
$ fodt-remove-span-tags --filename=main.fodt
then --maindir
is not needed since the default value is ../../parts
. If we call the script from the root of the git repo instead we need to specify --maindir
like this:
$ fodt-remove-span-tags --filename=main.fodt --maindir=parts
since now the maindir is in parts
relative to the root.
Why a user should cd into a subirectory to call a script? So the filename is a path relative to maindir?
Good point. The idea was that these scripts might not be something that you want to install globally on your system since they are only useful inside the opm-reference-manual repository. So then the user should rather activate the poetry virtual environment before running the scripts.
I agree that the scripts behave strangely/unexpectedly if installed globally. I will try to fix it.
--maindir
if the scripts are called from the root directory of the git repo checkout--filename
option is misleading as it actually needs a path. Maybe it is better to skip name and just use--file
?