605 Commits

Author SHA1 Message Date
Rhet Turnbull
8be71243d5
Refactor ruff (#1155)
* Refactored to make ruff happy

* Refactored tests, fixed bug in Mojave path_raw
2023-08-12 19:24:46 -07:00
Rhet Turnbull
b833cde599
Feature post function return 1136 (#1147)
* Changed return signature for post_function

* Updated post_function.py example

* Added tests for post_function returns ExportResults
2023-08-06 08:47:42 -07:00
Rhet Turnbull
2875b45d6e
Feature post command options 1142 (#1145)
* Added --post-command-break/catch

* Added --post-command-break/catch

* Added --post-command-error and tests

* Fixed help text for --post-command-error
2023-08-05 08:11:47 -07:00
Rhet Turnbull
93e1966607
Feature catch template error (#1141)
* Starting to implement catch_errors for sidecar_template

* Fixed error printing

* Fixed error printing

* Added tests for catch_errors
2023-08-03 06:33:17 -07:00
Rhet Turnbull
e937285a72
Feature keep file 1135 (#1139)
* Added gitignorefile

* Fixed gitignorefile for os.PathLike paths

* --keep now follows .gitignore rules

* Fixed ruff QA error

* Added support for .osxphotos_keep file

* Added reference to .osxphotos_keep

* Added tests for .osxphotos_keep

* Updated help text for --cleanup, --keep
2023-08-02 06:37:29 -07:00
Rhet Turnbull
db6caa5fa4
Feature custom sidecar zero length (#1138)
* Added skip_zero option to --sidecar-template

* Added missing test file
2023-07-29 10:29:16 -07:00
Rhet Turnbull
ed1486fd4b
Refactored --sidecar-template options (#1137) 2023-07-29 08:54:07 -07:00
Rhet Turnbull
3999e54f6c
Feature custom sidecar 1123 cache (#1131)
* Added caching to Template, fixed typos

* Added additional sidecar tests
2023-07-25 06:44:39 -07:00
Rhet Turnbull
02b6698c80
Feature custom sidecar 1123 (#1129)
* Working on custom sidecar, #1123

* Working on custom sidecar, #1123

* Added custom sidecar example

* Added WRITE_SKIPPED argument for --sidecar-template

* Updated report writer for user sidecars

* Added noqa to long lines in report writer

* Initial tests for --sidecar-template

* Initial tests for --sidecar-template

* Initial tests for --sidecar-template

* Completed tests for --sidecar-template

* Added json example for --sidecar-template

* Added json example for --sidecar-template
2023-07-24 06:38:44 -07:00
Rhet Turnbull
c0fa8ef262
alpha support for macOS Sonoma (Photos 9) (#1117) 2023-07-16 15:09:06 -07:00
dvdkon
c63b08694e
Add .AAE adjustment export (fix #97) (#1113)
Implements #97, export of adjustments data
2023-07-15 07:16:56 -07:00
Rhet Turnbull
2190628e82
Implemented --count, #1098 (#1102) 2023-06-24 10:50:34 -07:00
Rhet Turnbull
bb8e164f21
Unicode refactor (#1101)
* Began refactoring for improving unicode handling

* Added platform and unicode modules

* Added tests for unicode utilities

* Added tests for unicode utilities

* Added tests for unicode utilities

* Added tests for unicode utilities

* Fixed unicode tests for linux

* Fixed unicode tests for linux

* Fixed duplicate alubm name with --add-to-album

* Fixed test for linux

* Fix for duplicate unicode kewyords, see #907, #1085
2023-06-24 10:50:10 -07:00
Rhet Turnbull
2c80226ec8
fixed formatting (#1096) 2023-06-18 16:22:46 -07:00
Rhet Turnbull
ee8053d867 Fixed tests for ubuntu 2023-05-07 07:25:48 -07:00
dvdkon
ca3da647f2
Port to non-MacOS platforms (#1026)
* Port to non-MacOS platforms

* Keep NFD normalization on macOS

* Update locale_util.py

Fix lint error from ruff (runs in CI)

* Update query.py

click.Option first arg needs to be a list (different than click.option)

* Dynamically normalize Unicode paths in test

* Fix missing import

---------

Co-authored-by: Rhet Turnbull <rturnbull@gmail.com>
2023-05-07 06:55:56 -07:00
Rhet Turnbull
ed543aa2d0
Feature phototables (#1059)
* Added tables() method to PhotoInfo to get access to underlying tables

* This time with the phototables code...
2023-04-16 09:02:59 -07:00
Rhet Turnbull
956cecfa30
Bug memory leak 1047 (#1052)
* Fix for memory leak, #1047

* Refactored photos_by_uuid, AlbumInfo.asdict for speed optimization

* Fix for huge crash log, #1048

* Fix for error on export #1046

* add rajscode as a contributor for bug (#1049)

* update README.md [skip ci]

* update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* add wernerzj as a contributor for bug (#1050)

* update README.md [skip ci]

* update .all-contributorsrc [skip ci]

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Co-authored-by: Rhet Turnbull <rturnbull@gmail.com>

* Fixed all-contributors badge

---------

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-04-10 16:50:17 -07:00
oPromessa
519a6b0035
Small typo on Development Environment creation instructions (#1043)
Corrections on READNE_DEV.md and  testes/README.md
2023-04-08 21:56:38 -07:00
Rhet Turnbull
a4b4f1c288
Feature help no selection 1036 (#1042)
* Added validation for --selected

* Added test for #999 (project_info) that I missed on last branch
2023-04-08 14:34:08 -07:00
Rhet Turnbull
d2b7783125
Added shallow json() option, #1038 (#1040) 2023-04-08 11:10:29 -07:00
Rhet Turnbull
f4a743468d
Fix for json() failing on photos in projects, #999 (#1039) 2023-04-08 09:49:31 -07:00
Rhet Turnbull
0d31a152be Test fix for Ventura 2023-04-02 22:00:35 -07:00
Rhet Turnbull
36ce86c4a6
Removed file locking, performance improvements (#1032) 2023-04-02 19:42:28 -07:00
Rhet Turnbull
e7099d250b
Concurrency refactor 999 (#1029)
* Working on making export threadsafe, #999

* Working on making export threadsafe, #999

* refactor for concurrent export, #999

* Fixed race condition in ExportRecord context manager
2023-04-01 09:39:08 -07:00
Rhet Turnbull
1d1b69601f
Added --replace-keywords to batch-edit #1018 (#1019) 2023-03-14 11:58:13 -07:00
Rhet Turnbull
cfb623d19b
Feature appends prepends 1010 (#1015)
* Added appends, prepends filters, #1010

* Fixed initialization of field_arg
2023-03-09 06:22:24 -08:00
Rhet Turnbull
94f484e9ec
Feature date added 998 (#1003)
* Implemented --date-added, #998

* Added --date-added-from-photo

* Fixed typehint
2023-02-25 14:38:49 -08:00
Rhet Turnbull
1661cc9f0b
Feature batch edit 949 (#1001)
* Initial implementation of batch-edit, #949

* Added tests for batch-edit, #949
2023-02-25 14:37:26 -08:00
Rhet Turnbull
31212a1daa Added exportdb test for #990 2023-02-19 22:54:13 -08:00
Rhet Turnbull
06b02b4a23
Feature exportdb update 990 (#992)
* Added cloud_guid, #990

* Added fingerprint, cloud_guid to PhotoInfo.json

* Added stub for --migrate-photos-library

* Added --migrate-photos-library option to exportdb, #990
2023-02-19 22:51:25 -08:00
Rhet Turnbull
b03670dc70
Implemented show command, #964 (#982) 2023-02-12 08:11:38 -08:00
Rhet Turnbull
ce297ced0a
Added lock files to export to minimize name collisions (#981) 2023-02-11 18:21:15 -08:00
Rhet Turnbull
97a0a65d8a
Feature UUID from stdin 965 (#979)
* Allow --uuid-from-file to read from stdin, #965

* Load query options before opening the database
2023-02-11 09:26:42 -08:00
Rhet Turnbull
0982d0c548 Fixes regression for #640 2023-02-05 18:00:04 -08:00
Rhet Turnbull
007f0e0960
Feature add query command (#970)
* Added query_command and example

* Refactored QUERY_OPTIONS, added query_command, refactored verbose, #930, #931

* Added query options to debug-dump, #966

* Refactored query, #602

* Added precedence test for --load-config

* Refactored handling of query options

* Refactored export_photo

* Removed extraneous print

* Updated API_README

* Updated examples
2023-02-05 14:48:42 -08:00
Rhet Turnbull
9efb99cbd4
Fixed --dry-run with --finder-tags-keywords and --xattr-template, #958 (#961) 2023-01-28 18:08:19 -08:00
Rhet Turnbull
0c293d0bf5
Refactor verbose 931 (#960)
* Began refactoring verbose code for #931

* Fixed tests for timewarp due to verbose refactor

* Updated test data

* More refactoring for #931

* Refactored queryoptions.py

* Refactored queryoptions.py

* Refactored queryoptions.py

* Refactored echo_error

* Refactored debug

* Refactored debug

* Refactored use of verbose in export

* Refactored use of verbose in export

* Refactred --verbose in add-locations and debug-dump

* Refactored --verbose for

* Refactored --verbose for osxphotos exportdb

* Refactored --verbose for osxphotos import

* Refactored --verbose for osxphotos orphans

* Refactored --verbose for osxphotos snap-diff

* Refactored --verbose for osxphotos sync

* Refactored --verbose for osxphotos timewarp

* Added default verbose() function to verbose
2023-01-28 17:44:20 -08:00
Rhet Turnbull
770d85759d
Implemented {counter} template (#957) 2023-01-25 06:17:06 -08:00
oPromessa
80ee142c7f
Added --not-edited option to query | Added corresponding tests for query and export (#956)
* Added --not-edited option to query

Added --not-edited option to query (exclusive with --edited) to search for photos that have not been edited.

Added test scenarios for --edited and -.-not-edited

* Added --not-edited option to query

Added --not-edited option to query (exclusive with --edited) to search for photos that have not been edited.

Added query test scenarios for --edited and --not-edited

Added export test scenarios for --edited and --not-edited

* Added --not-edited option to query

Added --not-edited option to query (exclusive with --edited) to search for photos that have not been edited.

Added query test scenarios for --edited and --not-edited

Added export test scenarios for --edited and --not-edited

* Made edited/non-edited mutually exclusive in query() to match other filters

Co-authored-by: Rhet Turnbull <rturnbull@gmail.com>
2023-01-24 20:11:47 -08:00
Rhet Turnbull
369fa553e8
Feature timewarp parse date 867 (#951)
* Working on tests for timewarp --parse-date

* Test working for --parse-date

* Refactored date utils out of timewarp.py

* Added timezone to --parse-date, updated tests

* Added cog to README
2023-01-22 22:35:05 -08:00
Rhet Turnbull
29968269ff
Feature person favorite 940 (#950)
* Added person favorite for #940

* Added person.feature_less #940 (but not 100% sure it's right yet)

* Added tests for PersonInfo.favorite, PersonInfo.feature_less
2023-01-22 11:53:08 -08:00
Rhet Turnbull
bd01e41714
Bug timewarp sync 946 (#947)
* Fix --timezone iCloud sync, #946

* ADded tests for timezone fix #946
2023-01-21 14:48:56 -08:00
Rhet Turnbull
69eb4b070c
Updated search info for Ventura, #937 (#943) 2023-01-21 10:29:31 -08:00
Rhet Turnbull
8c46b8e545
Bug slow import 934 (#942)
* Working on slow import, #934

* Tests working for #934

* Removed unnecessary report record updates
2023-01-21 07:44:42 -08:00
Rhet Turnbull
83d14ac191
Feature add locations 929 (#932)
* Initial implementation of add-locations command #929

* Updated help for add-locations

* Fixed handling of shared albums in sync

* Added test for add-locations
2023-01-16 21:26:02 -08:00
Rhet Turnbull
c383212822
Feature add sync command 887 (#921)
* Starting work on sync command, #887

* Added parsing for --set, --merge

* Added query options

* Added --incloud, --not-incloud, --not-missing, --cloudasset, --not-cloudasset to query options, #800 (#902)

* Got basic import logic working

* Got basic set/merge logic working

* add to album now working

* Resolve paths for --import

* Refactored report writer to reuse code from export report

* Removed report_writer_sync.py

* add oPromessa as a contributor for code (#914)

* update README.md [skip ci]

* update .all-contributorsrc [skip ci]

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>

* Added --profile, --watch, --breakpoint, --debug as global options (#917)

* Removed unnecessary import

* Release 0.56.0 (#918)

* Release 0 56 0 (#919)

* Release 0.56.0

* Release 0.56.0

* Updated CHANGELOG.md [skip ci]

* Got CSV reporting, summary results done

* Added json report for sync results

* Added sqlite report for sync

* Basic set/merge working for sync

* sync mvp working

* Added help text for sync

* Added test for sync

* Updated tests for sync

Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
2023-01-14 22:06:20 -08:00
Rhet Turnbull
8caee5a81b
Added --incloud, --not-incloud, --not-missing, --cloudasset, --not-cloudasset to query options, #800 (#902) 2023-01-08 14:53:16 -08:00
Rhet Turnbull
6788f318a2
Added PhotoInfo.fingerprint #900 (#901) 2023-01-06 18:39:12 -08:00
Rhet Turnbull
eb0251b198
Fix for incorrect path for shared photos on Ventura, #883 (#893)
Fixes PhotoInfo.path to return the correct path for shared photos on Ventura (#883)
2023-01-01 08:26:54 -08:00