-
Notifications
You must be signed in to change notification settings - Fork 109
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
Adde from_date and to_date options to limit the processed files #202
Conversation
phockup.py
Outdated
@@ -296,6 +296,28 @@ def parse_args(args=sys.argv[1:]): | |||
files by an additional level after sorting by date. | |||
""" | |||
) | |||
|
|||
parser.add_argument( | |||
'--from_date', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace _
with -
phockup.py
Outdated
) | ||
|
||
parser.add_argument( | ||
'--to_date', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace _
with -
src/phockup.py
Outdated
if type(file_date) is dict: | ||
file_date = file_date["date"] | ||
if self.from_date is not None and file_date < self.from_date: | ||
progress = f"{progress} => {filename} skipped: date {file_date} is older than from_date {self.from_date}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace _
with -
for option name and maybe add --
to the option name (--from-date
)
…he arguments names
…dokov#202) * Added from_date and to_date options to limit the processed files * Removed a leftover debug print * Added info for this feature in the readme. Replaced "_" with "-" in the arguments names --------- Co-authored-by: Marco Dondero <[email protected]> Co-authored-by: Ivan Dokov <[email protected]>
This PR adds
from_date
andto_date
command line options to limit the file processing based on the calculated data. Files with unknown date are unfiltered.This is useful to me because I have a sync folder where the phones keep dumping the data so deleted pictures will be recreated.
I use phockup to copy the pics to a nice structure and then select the ones that I want to keep, so reprocessing all the source folder would replace the photos that I deleted.