Closed eco-nz closed 3 years ago
Is Python's glob.glob
(https://docs.python.org/3/library/glob.html) going to be sufficient? Do you also want me to expand environment variables?
BTW mock up below. Is this ok? User will have to click "Expand Wildcards" (or Alt+E)
I think the glob.glob or possibly/optionally glob.iglob would be fine from James's description @gillins.
ping @shepjd
@shepjd are you happy with the mock up above?
Yep, looks good, will be awesome to be able to expand "210619" and get all the files for a particular day
that should have read "210619"
bugger the * is not showing
210619
One more try... 210619
Yeah the * is italic (can escape with back slash). I'll put something together and get you to test it first like the other one.
OK @shepjd I have something for you to test:
cd /tmp
git clone https://github.com/gillins/tuiview.git
cd tuiview
git checkout wildcards
python setup.py install
Let me know how it goes. You can either click the button or press Alt+E.
I've only enabled this for rasters. As an aside, for vectors we only ever add the first file they selected - even if they select multiple. I'm guessing this because we have a dialog asking which layer in the vector to add and this would get confusing if there we multiple files. Dunno, maybe it's ok - no one has complained!
As an aside, with this change the Qt File Open dialog will be used on all platforms for opening rasters. Previously, the native File Open would have been used on Windows and OSX.... Any objections to this?
@shepjd did this work for you?
Hi @shepjd I'm keen to do a new release soon... Did you have any luck testing this?
I'm working from home because of lockdown, but have linux on laptop, will give it a go this afternoon
Just tested it, worked great, bloody cool and very useful, thanks
Good to hear it will be useful!
In the file open dialogue allow the user to specify multiple files form the structured filenames though normal globbing (or possibly regular expressions, or both?).
Requested by James Shepherd