int128 / gpup

A command to upload photos and movies to Google Photos Library using the official Google Photos Library API
Apache License 2.0
221 stars 22 forks source link

Feature request: allow only valid file types #28

Open felciano opened 5 years ago

felciano commented 5 years ago

Given that there are upload limits using the Google Photos API, it would be nice to avoid uploading files that are known to be invalid file types. An example of this is .XMP files that are created when exporting a folder or album from Aperture, which one would then like to upload to Google Photos using gpup.

This could either be via an extensible list of file types (suffixes), or a simpler switch (e.g. --only-upload-known-media-types) if it is possible to pre-identify the filetypes that Google Photos accepts.

jpg0 commented 5 years ago

FYI you can use either of the two PRs I made (https://github.com/int128/gpup/pull/30, https://github.com/int128/gpup/pull/31) to achieve this if you need now, by specifying the file types you want, either:

gpup --inc "\.jpg$" my_directory

or

find --name \*.jpg | gpup -

or you could even choose to exclude types that you don't want:

gpup --exc "\.XMP$" my_directory