Skip to content

support nested directories in template directories#95

Merged
eylles merged 1 commit intoeylles:masterfrom
chinatsu:feat/dir-walk
Dec 1, 2024
Merged

support nested directories in template directories#95
eylles merged 1 commit intoeylles:masterfrom
chinatsu:feat/dir-walk

Conversation

@chinatsu
Copy link
Copy Markdown
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
Copy Markdown
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