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

support nested directories in template directories #95

Merged
merged 1 commit into from
Dec 1, 2024

Conversation

chinatsu
Copy link
Contributor

@chinatsu chinatsu commented Dec 1, 2024

i've been wanting something like #66 for a while.

my use case specifically is qbittorrent-themes.
they need a file called config.json (by that specific name) which is pretty generic.
i could post-process filenames before i run it through rcc, but i thought it would be nice for pywal16 to support child directories inside the template folder instead.
this way i can organize my qbittorrent-stuff and have room for more config.json files that might be needed for other programs.

the PR introduces a naive class which contains every reference needed to read templates and output them to the correct spot. this could also just be a tuple, or a dictionary or something if you prefer that.
walk is a super simple function that leverages os.path stuff. i went with a generator-type of function, idk if you like that lol.

i was thinking about defining some tests to verify its functionality, but it seems the tests use my personal config, so it's hard to make a test that will work in every environment.
running the export tests locally, i can at least verify that feature parity is maintained.

@eylles
Copy link
Owner

eylles commented Dec 1, 2024

okay i like how this looks

@eylles eylles merged commit b5c73ce into eylles:master Dec 1, 2024
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