Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement/use xdg base dirs #9

Merged
merged 2 commits into from
Jun 23, 2024

Conversation

r900
Copy link
Contributor

@r900 r900 commented Jun 23, 2024

This adds the ability to use XDG_DATA_HOME for the data storage base dir, and XDG_CONFIG_HOME for the configuration base dir.

If not set it will fall back to ~/.local/share and ~/.config, as before.

(Also renames the variable STORAGE_DIR to CONFIG_DIR in config.py, for consistency :))

Tests:
When running env XDG_DATA_HOME=/tmp/gtd-data XDG_CONFIG_HOME=/tmp/gtd-config gentodo CMD, dirs and files were created in the defined places.
When the env vars are omitted it still uses the previous default and uses/creates the files there.

@csfore csfore merged commit 059123c into csfore:main Jun 23, 2024
@csfore
Copy link
Owner

csfore commented Jun 23, 2024

Looks good to me, thank you!

@r900 r900 deleted the enhancement/use_xdg_base_dirs branch June 24, 2024 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants