-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add exclude command line option. Excludes files based on a glob string #56
Conversation
Thanks for the PR. I believe using
|
Sorry, included mktorrent.h. Thanks for your comments, I will change it to use fnmatch instead of glob. |
I rewrote it to use fnmatch, it simplified things and removed the need for second linked list. Edit: Should I enable the FNM_EXTMATCH flag for additional matching options? |
I'm not sure if the first one is a good example, since the shell might expand the pattern before running the program, and then user will be surprised.
I'm not sure about that. |
What would be your suggestion for an example? I haven't ran into that issue with bash. Although I'm mostly using this in a shell script to auto-create torrents.
Ok, I'll leave it disabled. |
Consider the following:
|
Hopefully I didn't miss anything. Thanks again. |
This adds a exclude option to mktorrent. It allows you to exclude files based on a glob string:
example: mktorrent -e *.nfo
You can pass multiple -e flags or separate them by commas
example: mktorrent -e *.nfo,*.jpg