Open chriscz opened 8 years ago
I'm interested. Is there any kind of convention in naming destination directories?
Hi Kayvan. The only preference I have right now is: lowercase, and use underscores instead of spaces.
I'm considering contributing a PR that will hook up the mimetypes module to your rules. Would you be interested in such functionality, or would you prefer more manually-curated file types?
Hi Stefan,
Thanks for your interest in the project!
Hooking up the mimetypes module will be better than the current default behaviour, which is to move
unrecognised files to the other/
directory.
Ideally I would like to group various mimetypes under a common banner, for example zip
, tar.gz
etc, under archives
. But for now just adding mimetypes as the default behaviour would be great.
You can look in the filetypes.py file, near the end of the RULES dictionary, there are two default entries -- one for files and one for directories. Yours should be inserted right before the current default file behaviour.
Thanks for the quick reply! I hope the PR is to your liking, of course feel free to discard / edit any of my changes to make it fit into your project's vision better.
The current filetypes.txt contains some really archaic types. Consider updating it to contain more filetype definitions.