alarmz / boar

Automatically exported from code.google.com/p/boar
0 stars 0 forks source link

Negation syntax or "include" syntax for new import "ignore" feature #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This might just be a matter of me having trouble with the appropriate syntax to 
accomplish what I'd like, but ultimately, I'd like to be able to say "ignore 
all files *except* .xyz".

For instance, if I wanted to only import video files or image files from.

The only solution I was able to find about doing this in svn (as you mentioned 
it uses similar syntax) was here: http://www.thoughtspark.org/node/38

The syntax seemed rather clunky. Is there any chance you could perhaps 
implement a "+/-" syntax for inclusion / exclusion of a file mask. The idea 
being someone could type:

-*
+*.xyz

The masks get in sequential order, so first you "exclude" everything and then 
you "include" files ending in ".xyz". This is just an example of a way the 
inclusion/exclusion filter might work (this is how HTTRACK implements file 
masks, but again, it's just one possible way to implement it).

Thanks 

Original issue reported on code.google.com by in...@vittorio.me on 23 Jun 2011 at 2:53

GoogleCodeExporter commented 9 years ago
The masks get applied* in sequential... 

Original comment by in...@vittorio.me on 23 Jun 2011 at 8:44

GoogleCodeExporter commented 9 years ago
Agreed. Possibly, this is even more useful for boar than an ignore list. I'd 
expect most users to really just want to store *.jpg or *.raw in a session, and 
ignore all other files. Luckily, this feature is easy to implement now that the 
ignore basics are in place. 

I think the most intuitive way to implement this would be to have an additional 
session property named "include". And if it is set, boar will ignore all other 
types of files. If both "include" and "ignore" is set, then "ignore" will have 
priority. That is, you include "*.jpg" but you ignore "tmp/*", it behaves as 
you would expect. Intuitively it feels like that system would fit most users. 
Any thoughts about this before I implement it?

Original comment by ekb...@gmail.com on 26 Jun 2011 at 2:33

GoogleCodeExporter commented 9 years ago
Implemented in changeset d32306c81251.

Original comment by ekb...@gmail.com on 27 Jun 2011 at 7:26

GoogleCodeExporter commented 9 years ago
Sounds good to me. And yes, as you do, I expect in most cases people want to 
process only a certain type(s) of files to the exclusion of all else (just 
images, just videos, etc). That said, keeping the ignore parameter for things 
such as tmp files and the like is important as well, so in other words, your 
implementation seems just fine.

Original comment by in...@vittorio.me on 28 Jun 2011 at 2:23