Skip to content
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

Allow user to add to ignore_files list #71

Open
k3vmcd opened this issue Nov 15, 2019 · 5 comments
Open

Allow user to add to ignore_files list #71

k3vmcd opened this issue Nov 15, 2019 · 5 comments

Comments

@k3vmcd
Copy link

k3vmcd commented Nov 15, 2019

Allow the user to append filenames to the ignore_files list.

ignored_files = (".DS_Store", "Thumbs.db")

Should allow the use of a flag, such as -i, to accept both:

  1. Multiple filenames within the command line (as in -i filename1.txt file2.docx or -i filename1.txt -i file2.docx)
  2. Text file with exclusion list on multiple lines (as in -i /path/to/phockupIgnoreList.txt with contents of phockupIgnoreList.txt being:

    filename1.txt
    file2.docx

(The flag may need to differ for these two, such as using -i for in-line filename exclusions and -n for passing an ignore file).

This ignore feature should allow extension-level exclusions, such as *.txt as well as folder level exclusions (particularly for hidden folders), such as ./.hidden/

@k3vmcd
Copy link
Author

k3vmcd commented Nov 15, 2019

Example folders/files to allow user to exclude:

./.stfolder
./.stignore
./Camera/.inflight
./Camera/.inflight_lowres
./.tmp.drivedownload/
./.owncloudsync.log*
./.sync/
./.csync_journal.db
.Spotlight-V100
.Trashes
~*
ehthumbs.db
desktop.ini
._*
.thumbnails

@ivandokov
Copy link
Owner

ivandokov commented Nov 15, 2019

This is a great idea. If you can come up with a PR it will be awesome.

@scubachristopher
Copy link

What would make this really powerful is to invert this enhancement to indicate what files you want to INCLUDE. The reason is there are directories that contain SOME images / movies you want, but you don't want to disturb the rest of the content. Listing what you want excluded will mean iterating on file types you don't want, running the script, seeing it took file types you didn't know were there, repeat.

I propose including extensions that would be processed, and perhaps an option that says it will look for exif data in EVERY file, and if it finds it (regardless of extension), it will process it. Or "include all photo and video media" and your app maintains a config of extensions that encompasses.

Don't know Python else I'd help.

Love the work -- thank you so much.

@unapproachable
Copy link
Contributor

I'm working on this and want to make sure no one has any opposition to leveraging YAML for the configuration file. My intention is to introduce phockup.yaml for this specific feature, but as a general concept for the app. It will be easier to (eventually) added directory and inclusion support in a well-formed(-ish) YAML structure than introducing a collection of configuration files specified on the command line.

I also intend on allowing an alternate configuration file to be specified so we can go with phockup.yaml for a default config and then allowing for an override configuration file for specific runs (e.g. phockup-video.yaml). I also intend for the app to run as it does today if no file exists or is specified on the command line.

Input/opinions welcome before I get too far down this path. Or thumbs up emojis is fine too.

@ivandokov
Copy link
Owner

ivandokov commented Jul 18, 2022

I don't mind having yaml config file. My only suggestion is to use yml file extension or have the option to use both.
I don't see any point in supporting more formats so yaml is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants