anufrievroman / calcure

Modern TUI calendar and task manager with minimal and customizable UI.
https://anufrievroman.gitbook.io/calcure
MIT License
1.56k stars 45 forks source link

Support globbing in `ics_{task,event}_files` #109

Open LnLcFlx opened 1 month ago

LnLcFlx commented 1 month ago

I have a folder folder with each subfolder subfolder1, subfolder2,... representing one calendar and each subfolder containing the events as separate ics files.

Right now I have to do

ics_task_files = calendars/subfolder1,calendars/subfolder2,...

but it would be super useful if a glob patterns such as

ics_task_files = calendars/*

would expand to the above syntax. This is especially the case if you have many calendars or the calendars/subfolders change very often on disk.

anufrievroman commented 1 month ago

I think it's quite possible to make it.

Note to myself (or whoever would like to work on it): it can be implemented like that: in loaders.py around line 307, there should be a check for * and then if true, the os.walk should also walk through all directories in that path or something like that.

LnLcFlx commented 1 month ago

I was thinking of python standard library glob