bitrot icon indicating copy to clipboard operation
bitrot copied to clipboard

Ignoring files or directories, or specifying files to be scanned

Open pallinger opened this issue 9 years ago • 14 comments

I know this is quite a big feature, but could be nice to have: I have a lot of small backup files in a directory, and bitrot is progressing really slowly (0.1% in ~20 hours). One simple implementation would be for bitrot to accept a predefined file-list, which could be generated by find or similar, that has already exclude options. I may start to work on it, if I have the time. :)

pallinger avatar Oct 12 '15 08:10 pallinger

Wow, 0.1% in 20 hours is pretty awful. As for a predefined file list, I'm thinking about an ignore list instead. If you really want to track known files, you can easily do it with md5sum and friends.

ambv avatar May 02 '16 18:05 ambv

I do not mean tracking known files, I thought about being able to use bitrot as part of a toolchain. E.g. find -type f -size +1M | grep -v '~$' | bitrot --file-list-from-stdin. So I did not think about using a static file list, but an on-the-fly-generated one. Of course, a --exclude-file-list-from-stdin might also do the same trick.

pallinger avatar May 12 '16 11:05 pallinger

I made a fork of the project to do this: https://github.com/benshep/bitrot

You can use --file-list (accepts a file or stdin) and --exclude-list (accepts files only, including wildcards).

benshep avatar Nov 01 '16 12:11 benshep

@benshep Are you planning to update your fork for bitrot 1.0.0? (I need to exclude some Maildir directories that contain files that get frequently modified by IMAP syncing.)

huyz avatar Jun 08 '20 02:06 huyz

I think it should be fairly straightforward to make a pull request from my fork. I'll try to find some time for that this week.

benshep avatar Jun 08 '20 07:06 benshep

@huyz My fork has been updated to 1.0 now Took me all day! I'd love some help unit testing, if anyone is able to help me test.

@pallinger My fork has both inclusion and exclusion lists

p1r473 avatar Jun 09 '20 23:06 p1r473

Great! I guess we can use your fork @p1r473 - thanks. That saves me a bunch of effort, and I'm certain you'll have done it better than I would ☺

benshep avatar Jun 10 '20 09:06 benshep

@p1r473, wow, you updated the fork to 1.0? That's amazing. If you'd like to submit your support for ignoring files as a pull request, I'll accept it.

ambv avatar Jun 10 '20 09:06 ambv

@p1r473 Great! I can't find the usage instructions for how to include and exclude. How does one do it?

huyz avatar Jun 11 '20 23:06 huyz

@p1r473, wow, you updated the fork to 1.0? That's amazing. If you'd like to submit your support for ignoring files as a pull request, I'll accept it.

There are just so many changes from my fork... I think I've more than doubled the line count

p1r473 avatar Jun 14 '20 20:06 p1r473

@p1r473 Great! I can't find the usage instructions for how to include and exclude. How does one do it?

py bitrot.py --exclude-list exclude.txt --include-list include.txt Include takes precedence over exclude

p1r473 avatar Jun 14 '20 20:06 p1r473

There are just so many changes from my fork... I think I've more than doubled the line count

@p1r473 You have made a lot of changes. Can you describe all the changes you've made? (Maybe add them to your version of the README?)

huyz avatar Jun 15 '20 03:06 huyz

There are just so many changes from my fork... I think I've more than doubled the line count

@p1r473 You have made a lot of changes. Can you describe all the changes you've made? (Maybe add them to your version of the README?)

They are already in my readme

p1r473 avatar Jun 17 '20 18:06 p1r473

@p1r473 You have made a lot of changes. Can you describe all the changes you've made? (Maybe add them to your version of the README?)

They are already in my readme

I meant, as a separate section so that it’s clear what features your fork adds to the original repo

huyz avatar Jun 18 '20 01:06 huyz