Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
caa279e394 | ||
|
|
bd01e41714 | ||
|
|
32b23a09cb | ||
|
|
4857598324 | ||
|
|
b937874f66 | ||
|
|
69eb4b070c | ||
|
|
8c46b8e545 | ||
|
|
b6ab618154 | ||
|
|
7ab33f66d7 | ||
|
|
83d14ac191 | ||
|
|
aca2333477 | ||
|
|
15c75ff17c | ||
|
|
1e58e20b3c | ||
|
|
51ca4d30f3 | ||
|
|
15b331047c | ||
|
|
81f4a4c3ee | ||
|
|
227a3e2836 | ||
|
|
0688729785 | ||
|
|
8fa7f18ece | ||
|
|
99aff7396f |
@@ -455,6 +455,24 @@
|
||||
"bug",
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "mave2k",
|
||||
"name": "mave2k",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/8629837?v=4",
|
||||
"profile": "https://github.com/mave2k",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "djbeadle",
|
||||
"name": "Daniel Beadle",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/6235378?v=4",
|
||||
"profile": "https://danielbeadle.net",
|
||||
"contributions": [
|
||||
"ideas"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[bumpversion]
|
||||
current_version = 0.56.1
|
||||
current_version = 0.56.5
|
||||
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)
|
||||
serialize = {major}.{minor}.{patch}
|
||||
|
||||
|
||||
@@ -238,7 +238,7 @@ Returns a list of the keywords found in the Photos library
|
||||
albums = photosdb.album_info
|
||||
```
|
||||
|
||||
Returns a list of [AlbumInfo](#AlbumInfo) objects representing albums in the database or empty list if there are no albums. See also [albums](#albums) and [burst_album_info](#burst_album_info).
|
||||
Returns a list of [AlbumInfo](#albuminfo) objects representing albums in the database or empty list if there are no albums. See also [albums](#albums) and [burst_album_info](#burst_album_info).
|
||||
|
||||
#### `albums`
|
||||
|
||||
@@ -278,7 +278,7 @@ Returns the [MomentInfo](#momentinfo) object for the photo or `None` if the pho
|
||||
folders = photosdb.folder_info
|
||||
```
|
||||
|
||||
Returns a list of [FolderInfo](#FolderInfo) objects representing top level folders in the database or empty list if there are no folders. See also [folders](#folders).
|
||||
Returns a list of [FolderInfo](#folderinfo) objects representing top level folders in the database or empty list if there are no folders. See also [folders](#folders).
|
||||
|
||||
**Note**: Currently folder_info is only implemented for Photos 5 (Catalina); will return empty list and output warning if called on earlier database versions.
|
||||
|
||||
@@ -402,6 +402,15 @@ photosdb.db_version
|
||||
|
||||
Returns the version number for Photos library database. You likely won't need this but it's provided in case needed for debugging. PhotosDB will print a warning to `sys.stderr` if you open a database version that has not been tested.
|
||||
|
||||
#### `photos_version`
|
||||
|
||||
```python
|
||||
# assumes photosdb is a PhotosDB object (see above)
|
||||
photosdb.photos_version
|
||||
```
|
||||
|
||||
Returns the version number as int for version of Photos that created the library, e.g. 2, 3, 4, 5...
|
||||
|
||||
#### `get_db_connection()`
|
||||
|
||||
Returns tuple of (connection, cursor) for the working copy of the Photos database. This is useful for debugging or prototyping new features.
|
||||
@@ -428,7 +437,7 @@ conn.close()
|
||||
photos = photosdb.photos([keywords=['keyword',]], [uuid=['uuid',]], [persons=['person',]], [albums=['album',]],[from_date=datetime.datetime],[to_date=datetime.datetime])
|
||||
```
|
||||
|
||||
Returns a list of [PhotoInfo](#PhotoInfo) objects. Each PhotoInfo object represents a photo in the Photos Libary.
|
||||
Returns a list of [PhotoInfo](#photoinfo) objects. Each PhotoInfo object represents a photo in the Photos Libary.
|
||||
|
||||
If called with no parameters, returns a list of every photo in the Photos library.
|
||||
|
||||
@@ -593,7 +602,7 @@ Returns a list of albums the photo is contained in. See also [album_info](#album
|
||||
|
||||
#### `album_info`
|
||||
|
||||
Returns a list of [AlbumInfo](#AlbumInfo) objects representing the albums the photo is contained in or empty list of the photo is not in any albums. See also [albums](#albums).
|
||||
Returns a list of [AlbumInfo](#albuminfo) objects representing the albums the photo is contained in or empty list of the photo is not in any albums. See also [albums](#albums).
|
||||
|
||||
#### `import_info`
|
||||
|
||||
@@ -729,7 +738,7 @@ Returns latitude and longitude as a tuple of floats (latitude, longitude). If l
|
||||
|
||||
#### `place`
|
||||
|
||||
Returns a [PlaceInfo](#PlaceInfo) object with reverse geolocation data or None if there is the photo has no reverse geolocation information.
|
||||
Returns a [PlaceInfo](#placeinfo) object with reverse geolocation data or None if there is the photo has no reverse geolocation information.
|
||||
|
||||
#### `shared`
|
||||
|
||||
@@ -842,7 +851,7 @@ If a burst photo which has unselected burst images (e.g. the burst images are in
|
||||
|
||||
#### `burst_album_info`
|
||||
|
||||
If photo is non-selected burst photo, teturns a list of [AlbumInfo](#AlbumInfo) objects representing the albums any other photos in the same burst set are contained in. Otherwise, returns `PhotoInfo.album_info`. See also [burst_albums](#burst_albums) and [album_info](#album_info).
|
||||
If photo is non-selected burst photo, teturns a list of [AlbumInfo](#albuminfo) objects representing the albums any other photos in the same burst set are contained in. Otherwise, returns `PhotoInfo.album_info`. See also [burst_albums](#burst_albums) and [album_info](#album_info).
|
||||
|
||||
#### `live_photo`
|
||||
|
||||
@@ -1129,7 +1138,7 @@ Returns the title or name of the album.
|
||||
|
||||
#### <a name="albumphotos">`photos`</a>
|
||||
|
||||
Returns a list of [PhotoInfo](#PhotoInfo) objects representing each photo contained in the album sorted in the same order as in Photos. (e.g. if photos were manually sorted in the Photos albums, photos returned by `photos` will be in same order as they appear in the Photos album)
|
||||
Returns a list of [PhotoInfo](#photoinfo) objects representing each photo contained in the album sorted in the same order as in Photos. (e.g. if photos were manually sorted in the Photos albums, photos returned by `photos` will be in same order as they appear in the Photos album)
|
||||
|
||||
#### `creation_date`
|
||||
|
||||
@@ -1145,7 +1154,7 @@ Returns the date of latest photo in the album as a timezone aware datetime.datet
|
||||
|
||||
#### `folder_list`
|
||||
|
||||
Returns a hierarchical list of [FolderInfo](#FolderInfo) objects representing the folders the album is contained in. For example, if album "AlbumInFolder" is in SubFolder2 of Folder1 as illustrated below, would return a list of `FolderInfo` objects representing ["Folder1", "SubFolder2"]
|
||||
Returns a hierarchical list of [FolderInfo](#folderinfo) objects representing the folders the album is contained in. For example, if album "AlbumInFolder" is in SubFolder2 of Folder1 as illustrated below, would return a list of `FolderInfo` objects representing ["Folder1", "SubFolder2"]
|
||||
|
||||
```txt
|
||||
Photos Library
|
||||
@@ -1169,7 +1178,7 @@ Photos Library
|
||||
|
||||
#### `parent`
|
||||
|
||||
Returns a [FolderInfo](#FolderInfo) object representing the albums parent folder or `None` if album is not a in a folder.
|
||||
Returns a [FolderInfo](#folderinfo) object representing the albums parent folder or `None` if album is not a in a folder.
|
||||
|
||||
#### `owner`
|
||||
|
||||
@@ -1189,7 +1198,7 @@ Returns the universally unique identifier (uuid) of the import session. This is
|
||||
|
||||
#### <a name="importphotos">`photos`</a>
|
||||
|
||||
Returns a list of [PhotoInfo](#PhotoInfo) objects representing each photo contained in the import session.
|
||||
Returns a list of [PhotoInfo](#photoinfo) objects representing each photo contained in the import session.
|
||||
|
||||
#### `creation_date`
|
||||
|
||||
@@ -1219,7 +1228,7 @@ Returns the title or name of the project.
|
||||
|
||||
#### <a name="projectphotos">`photos`</a>
|
||||
|
||||
Returns a list of [PhotoInfo](#PhotoInfo) objects representing each photo contained in the project.
|
||||
Returns a list of [PhotoInfo](#photoinfo) objects representing each photo contained in the project.
|
||||
|
||||
#### `creation_date`
|
||||
|
||||
@@ -1283,21 +1292,21 @@ Returns the title or name of the folder.
|
||||
|
||||
#### `album_info`
|
||||
|
||||
Returns a list of [AlbumInfo](#AlbumInfo) objects representing each album contained in the folder.
|
||||
Returns a list of [AlbumInfo](#albuminfo) objects representing each album contained in the folder.
|
||||
|
||||
#### `album_info_shared`
|
||||
|
||||
Returns a list of [AlbumInfo](#AlbumInfo) objects for each shared album in the photos database.
|
||||
Returns a list of [AlbumInfo](#albuminfo) objects for each shared album in the photos database.
|
||||
|
||||
**Note**: Only valid for Photos 5+; on Photos <= 4, prints warning and returns empty list.
|
||||
|
||||
#### `subfolders`
|
||||
|
||||
Returns a list of [FolderInfo](#FolderInfo) objects representing the sub-folders of the folder.
|
||||
Returns a list of [FolderInfo](#folderinfo) objects representing the sub-folders of the folder.
|
||||
|
||||
#### `parent`
|
||||
|
||||
Returns a [FolderInfo](#FolderInfo) object representing the folder's parent folder or `None` if album is not a in a folder.
|
||||
Returns a [FolderInfo](#folderinfo) object representing the folder's parent folder or `None` if album is not a in a folder.
|
||||
|
||||
#### `sort_order`
|
||||
|
||||
@@ -2016,7 +2025,7 @@ cog.out(get_template_field_table())
|
||||
|{cr}|A carriage return: '\r'|
|
||||
|{crlf}|A carriage return + line feed: '\r\n'|
|
||||
|{tab}|:A tab: '\t'|
|
||||
|{osxphotos_version}|The osxphotos version, e.g. '0.56.1'|
|
||||
|{osxphotos_version}|The osxphotos version, e.g. '0.56.5'|
|
||||
|{osxphotos_cmd_line}|The full command line used to run osxphotos|
|
||||
|{album}|Album(s) photo is contained in|
|
||||
|{folder_album}|Folder path + album photo is contained in. e.g. 'Folder/Subfolder/Album' or just 'Album' if no enclosing folder|
|
||||
|
||||
60
CHANGELOG.md
60
CHANGELOG.md
@@ -4,6 +4,44 @@ All notable changes to this project will be documented in this file. Dates are d
|
||||
|
||||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
|
||||
#### [v0.56.4](https://github.com/RhetTbull/osxphotos/compare/v0.56.3...v0.56.4)
|
||||
|
||||
> 21 January 2023
|
||||
|
||||
- Updated release files for v0.56.4 [`#944`](https://github.com/RhetTbull/osxphotos/pull/944)
|
||||
- Updated search info for Ventura, #937 [`#943`](https://github.com/RhetTbull/osxphotos/pull/943)
|
||||
- Bug slow import 934 [`#942`](https://github.com/RhetTbull/osxphotos/pull/942)
|
||||
|
||||
#### [v0.56.3](https://github.com/RhetTbull/osxphotos/compare/v0.56.2...v0.56.3)
|
||||
|
||||
> 16 January 2023
|
||||
|
||||
- Release files for 0.56.3 [`#933`](https://github.com/RhetTbull/osxphotos/pull/933)
|
||||
- Feature add locations 929 [`#932`](https://github.com/RhetTbull/osxphotos/pull/932)
|
||||
- Fixed handling of shared albums in sync [`aca2333`](https://github.com/RhetTbull/osxphotos/commit/aca233347792827d0d6b63bbeccd242c6741b354)
|
||||
|
||||
#### [v0.56.2](https://github.com/RhetTbull/osxphotos/compare/v0.56.1...v0.56.2)
|
||||
|
||||
> 15 January 2023
|
||||
|
||||
- Release 0.56.2 [`#928`](https://github.com/RhetTbull/osxphotos/pull/928)
|
||||
- On import consider GPS Location from XMP if EXIF is not available. [`#912`](https://github.com/RhetTbull/osxphotos/pull/912)
|
||||
- Added score info to inspect, #899 [`#927`](https://github.com/RhetTbull/osxphotos/pull/927)
|
||||
- Updated PhotoScript version to use faster folder/album code [`#926`](https://github.com/RhetTbull/osxphotos/pull/926)
|
||||
- Fixed 'Photos 5 only' text, #916 [`#925`](https://github.com/RhetTbull/osxphotos/pull/925)
|
||||
- Update README.md [`#923`](https://github.com/RhetTbull/osxphotos/pull/923)
|
||||
- add mave2k as a contributor for doc [`#924`](https://github.com/RhetTbull/osxphotos/pull/924)
|
||||
- add mave2k as a contributor for doc [`#924`](https://github.com/RhetTbull/osxphotos/pull/924)
|
||||
|
||||
#### [v0.56.1](https://github.com/RhetTbull/osxphotos/compare/v0.56.0...v0.56.1)
|
||||
|
||||
> 14 January 2023
|
||||
|
||||
- Release 0.56.1 [`#922`](https://github.com/RhetTbull/osxphotos/pull/922)
|
||||
- Feature add sync command 887 [`#921`](https://github.com/RhetTbull/osxphotos/pull/921)
|
||||
- Updated docs [`2aa8099`](https://github.com/RhetTbull/osxphotos/commit/2aa80996bf2934c8b7e72ec491c8877e4d3b4d5f)
|
||||
- Updated docs [`c36610a`](https://github.com/RhetTbull/osxphotos/commit/c36610ab622cfb3051f43280c715aa65855b1715)
|
||||
|
||||
#### [v0.56.0](https://github.com/RhetTbull/osxphotos/compare/v0.55.7...v0.56.0)
|
||||
|
||||
> 13 January 2023
|
||||
@@ -1471,7 +1509,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
> 17 April 2021
|
||||
|
||||
- Fixed bug for multi-field templates and --xattr-template, #422 [`6a28867`](https://github.com/RhetTbull/osxphotos/commit/6a288676a14ce23380181d43db19128afdda7731)
|
||||
- Add @ubrandes as a contributor [`874ad2f`](https://github.com/RhetTbull/osxphotos/commit/874ad2fa34d8306c071cd479625a9aa97f6488b2)
|
||||
- Add @ubrandes as a contributor [`874ad2f`](https://github.com/RhetTbull/osxphotos/commit/874ad2fa34d8306c071cd479625a9aa97f6488b2)
|
||||
|
||||
#### [v0.42.1](https://github.com/RhetTbull/osxphotos/compare/v0.41.11...v0.42.1)
|
||||
|
||||
@@ -1654,7 +1692,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
|
||||
> 2 February 2021
|
||||
|
||||
- Add @davidjroos as a contributor [`8dbedef`](https://github.com/RhetTbull/osxphotos/commit/8dbedef1874882815afb4a885184249aae73bf9f)
|
||||
- Add @davidjroos as a contributor [`8dbedef`](https://github.com/RhetTbull/osxphotos/commit/8dbedef1874882815afb4a885184249aae73bf9f)
|
||||
- Fixed documentation, #359 [`77371b6`](https://github.com/RhetTbull/osxphotos/commit/77371b6e5d8a9b8662b7b7d540378beb897f6988)
|
||||
|
||||
#### [v0.40.5](https://github.com/RhetTbull/osxphotos/compare/v0.40.3...v0.40.5)
|
||||
@@ -1706,7 +1744,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
> 18 January 2021
|
||||
|
||||
- Beta fix for Digikam reading XMP [`3799594`](https://github.com/RhetTbull/osxphotos/commit/379959447373f951ffca372598ea8f1d5834fe52)
|
||||
- Add @martinhrpi as a contributor [`db43017`](https://github.com/RhetTbull/osxphotos/commit/db430173b59732f944ca52b53c928370684580df)
|
||||
- Add @martinhrpi as a contributor [`db43017`](https://github.com/RhetTbull/osxphotos/commit/db430173b59732f944ca52b53c928370684580df)
|
||||
|
||||
#### [v0.39.21](https://github.com/RhetTbull/osxphotos/compare/v0.39.20...v0.39.21)
|
||||
|
||||
@@ -1742,8 +1780,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
|
||||
- Fixed test for M1, added about command, closes #315 [`#315`](https://github.com/RhetTbull/osxphotos/issues/315)
|
||||
- Fixed time zone for tests [`165f9b0`](https://github.com/RhetTbull/osxphotos/commit/165f9b08f5056d1f0b2ca7c74cec84d42b635663)
|
||||
- Add @narensankar0529 as a contributor [`039118c`](https://github.com/RhetTbull/osxphotos/commit/039118c1aaa217f46354b351ea36b0729e3e1c35)
|
||||
- Update @narensankar0529 as a contributor [`61f649e`](https://github.com/RhetTbull/osxphotos/commit/61f649e59d53a3e3011602476b72cc64951d38c0)
|
||||
- Add @narensankar0529 as a contributor [`039118c`](https://github.com/RhetTbull/osxphotos/commit/039118c1aaa217f46354b351ea36b0729e3e1c35)
|
||||
- Update @narensankar0529 as a contributor [`61f649e`](https://github.com/RhetTbull/osxphotos/commit/61f649e59d53a3e3011602476b72cc64951d38c0)
|
||||
|
||||
#### [v0.39.16](https://github.com/RhetTbull/osxphotos/compare/v0.39.15...v0.39.16)
|
||||
|
||||
@@ -1773,9 +1811,9 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
- Added PhotoInfo.visible, PhotoInfo.date_trashed, closes #333, #334 [`#333`](https://github.com/RhetTbull/osxphotos/issues/333)
|
||||
- Create terminalizer-demo.yml [`5dc2eea`](https://github.com/RhetTbull/osxphotos/commit/5dc2eeaf9a7265873c81db23bbc86d3023189a26)
|
||||
- Force cleanup of objects with autorelease pool [`b67f11a`](https://github.com/RhetTbull/osxphotos/commit/b67f11a3bb95c08a39a185b6d884092870e949f2)
|
||||
- doc: Recorded screencast and updated of readme [`658e8ac`](https://github.com/RhetTbull/osxphotos/commit/658e8ac096d141fce48483dbfc1426bea317d806)
|
||||
- doc: Recorded screencast and updated of readme [`658e8ac`](https://github.com/RhetTbull/osxphotos/commit/658e8ac096d141fce48483dbfc1426bea317d806)
|
||||
- doc: fixed toc in readme [`aba50c5`](https://github.com/RhetTbull/osxphotos/commit/aba50c5c733420dc30f861d866a2c0bdc8933714)
|
||||
- Add @Rott-Apple as a contributor [`71cb015`](https://github.com/RhetTbull/osxphotos/commit/71cb01572d2d946df18dd7b36f95b2f2e5b48f86)
|
||||
- Add @Rott-Apple as a contributor [`71cb015`](https://github.com/RhetTbull/osxphotos/commit/71cb01572d2d946df18dd7b36f95b2f2e5b48f86)
|
||||
|
||||
#### [v0.39.11](https://github.com/RhetTbull/osxphotos/compare/v0.39.10...v0.39.11)
|
||||
|
||||
@@ -1831,7 +1869,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
- doc simplify readme [`02ef0f9`](https://github.com/RhetTbull/osxphotos/commit/02ef0f9a254e83a3729a09cea1ae523407074896)
|
||||
- Added exception handling/capture for convert-to-jpeg, issue #322 [`05f111a`](https://github.com/RhetTbull/osxphotos/commit/05f111a287e882ed6b451a550a87753501316aba)
|
||||
- Cleanup up the readme [`38842ff`](https://github.com/RhetTbull/osxphotos/commit/38842ff9249e6f5b3069a88a759c8df97ddce51c)
|
||||
- Add @synox as a contributor [`83915c6`](https://github.com/RhetTbull/osxphotos/commit/83915c65abb880036f80ebd830eb1e34292f9599)
|
||||
- Add @synox as a contributor [`83915c6`](https://github.com/RhetTbull/osxphotos/commit/83915c65abb880036f80ebd830eb1e34292f9599)
|
||||
|
||||
#### [v0.39.5](https://github.com/RhetTbull/osxphotos/compare/v0.39.4...v0.39.5)
|
||||
|
||||
@@ -1977,7 +2015,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
- Documentation fix for #293. Thanks to @finestream [`#295`](https://github.com/RhetTbull/osxphotos/pull/295)
|
||||
- Patch 1 [`#1`](https://github.com/RhetTbull/osxphotos/pull/1)
|
||||
- Added additional test cases for #286, --ignore-signature [`880a9b6`](https://github.com/RhetTbull/osxphotos/commit/880a9b67a14787ef23ae68ad3164d7eda1af16ec)
|
||||
- Add @finestream as a contributor [`ad860b1`](https://github.com/RhetTbull/osxphotos/commit/ad860b1500dffd846322e05562ba4f2019cd1017)
|
||||
- Add @finestream as a contributor [`ad860b1`](https://github.com/RhetTbull/osxphotos/commit/ad860b1500dffd846322e05562ba4f2019cd1017)
|
||||
- Fixed issue #296 [`a7c688c`](https://github.com/RhetTbull/osxphotos/commit/a7c688cfc2221833e0252d71bbe596eee5f9a6e8)
|
||||
- Updated README.md [`d40b16a`](https://github.com/RhetTbull/osxphotos/commit/d40b16a456c64014674505b7c715c80b977da76a)
|
||||
- Update __main__.py [`e097f3a`](https://github.com/RhetTbull/osxphotos/commit/e097f3aad546b5be5eabab529bd2c35ce3056876)
|
||||
@@ -2099,7 +2137,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
- Fix EXIF GPS format for XMP sidecar, thanks to @jstrine for the fix! [`#270`](https://github.com/RhetTbull/osxphotos/pull/270)
|
||||
- Continue even if the original filename is None, thanks to @jstrine for the fix! [`#268`](https://github.com/RhetTbull/osxphotos/pull/268)
|
||||
- Added test for missing original_filename [`116cb66`](https://github.com/RhetTbull/osxphotos/commit/116cb662fbddf9153f6858c6ea97dc7f65c77705)
|
||||
- Add @jstrine as a contributor [`7460bc8`](https://github.com/RhetTbull/osxphotos/commit/7460bc88fcc5e1e7435c9b9bcdf7ec9c7c5e39ea)
|
||||
- Add @jstrine as a contributor [`7460bc8`](https://github.com/RhetTbull/osxphotos/commit/7460bc88fcc5e1e7435c9b9bcdf7ec9c7c5e39ea)
|
||||
- Escape characters which cause XML parsing issues [`c42050a`](https://github.com/RhetTbull/osxphotos/commit/c42050a10cac40b0b5ac70c587e07f257a9b50dd)
|
||||
- Fix tests for apostrophe [`d0d2e80`](https://github.com/RhetTbull/osxphotos/commit/d0d2e8080096bf66f93a830386800ce713680c51)
|
||||
- Fix test for XMP sidecar with GPS info [`c27cfb1`](https://github.com/RhetTbull/osxphotos/commit/c27cfb1223fa82b9e5549b93c283e9444693270a)
|
||||
@@ -2209,7 +2247,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
|
||||
- Updated --exiftool to set dates/times as Photos does, issue #247 [`11459d1`](https://github.com/RhetTbull/osxphotos/commit/11459d1da4d7d13e36e9db4bdc940b74baad9d11)
|
||||
- Partial fix for issue #247 on Mojave [`6ac3111`](https://github.com/RhetTbull/osxphotos/commit/6ac311199e9f7afe6170cbbd68ceaa1bb9f0682b)
|
||||
- Add @mwort as a contributor [`9cff8e8`](https://github.com/RhetTbull/osxphotos/commit/9cff8e89c6e939d3d371a4f60649f6e5595a55b9)
|
||||
- Add @mwort as a contributor [`9cff8e8`](https://github.com/RhetTbull/osxphotos/commit/9cff8e89c6e939d3d371a4f60649f6e5595a55b9)
|
||||
|
||||
#### [v0.36.2](https://github.com/RhetTbull/osxphotos/compare/v0.36.1...v0.36.2)
|
||||
|
||||
|
||||
15
README.md
15
README.md
@@ -7,7 +7,7 @@
|
||||
[](https://pepy.tech/project/osxphotos)
|
||||
[](https://www.reddit.com/r/osxphotos/)
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||
[](#contributors)
|
||||
[](#contributors)
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||
|
||||
OSXPhotos provides the ability to interact with and query Apple's Photos.app library on macOS. You can query the Photos library database — for example, file name, file path, and metadata such as keywords/tags, persons/faces, albums, etc. You can also easily export both the original and edited photos.
|
||||
@@ -62,6 +62,7 @@ If you aren't familiar with installing python applications, I recommend you inst
|
||||
* Open `Terminal` (search for `Terminal` in Spotlight or look in `Applications/Utilities`)
|
||||
* Install `homebrew` according to instructions at [https://brew.sh/](https://brew.sh/)
|
||||
* Type the following into Terminal: `brew install pipx`
|
||||
* Ensure that pipx installed packages are accessible in your PATH by typing: `pipx ensurepath`
|
||||
* Then type this: `pipx install osxphotos`
|
||||
* Now you should be able to run `osxphotos` by typing: `osxphotos`
|
||||
|
||||
@@ -720,7 +721,7 @@ Options:
|
||||
--no-location Search for photos with no associated location
|
||||
info (e.g. no GPS coordinates)
|
||||
--label LABEL Search for photos with image classification
|
||||
label LABEL (Photos 5 only). If more than one
|
||||
label LABEL (Photos 5+ only). If more than one
|
||||
label, treated as "OR", e.g. find photos
|
||||
matching any label
|
||||
--uti UTI Search for photos whose uniform type
|
||||
@@ -734,9 +735,9 @@ Options:
|
||||
--hidden Search for photos marked hidden.
|
||||
--not-hidden Search for photos not marked hidden.
|
||||
--shared Search for photos in shared iCloud album
|
||||
(Photos 5 only).
|
||||
(Photos 5+ only).
|
||||
--not-shared Search for photos not in shared iCloud album
|
||||
(Photos 5 only).
|
||||
(Photos 5+ only).
|
||||
--burst Search for photos that were taken in a burst.
|
||||
--not-burst Search for photos that are not part of a
|
||||
burst.
|
||||
@@ -2040,7 +2041,7 @@ Substitution Description
|
||||
{cr} A carriage return: '\r'
|
||||
{crlf} A carriage return + line feed: '\r\n'
|
||||
{tab} :A tab: '\t'
|
||||
{osxphotos_version} The osxphotos version, e.g. '0.56.1'
|
||||
{osxphotos_version} The osxphotos version, e.g. '0.56.5'
|
||||
{osxphotos_cmd_line} The full command line used to run osxphotos
|
||||
|
||||
The following substitutions may result in multiple values. Thus if specified
|
||||
@@ -2524,7 +2525,7 @@ The following template field substitutions are availabe for use the templating s
|
||||
|{cr}|A carriage return: '\r'|
|
||||
|{crlf}|A carriage return + line feed: '\r\n'|
|
||||
|{tab}|:A tab: '\t'|
|
||||
|{osxphotos_version}|The osxphotos version, e.g. '0.56.1'|
|
||||
|{osxphotos_version}|The osxphotos version, e.g. '0.56.5'|
|
||||
|{osxphotos_cmd_line}|The full command line used to run osxphotos|
|
||||
|{album}|Album(s) photo is contained in|
|
||||
|{folder_album}|Folder path + album photo is contained in. e.g. 'Folder/Subfolder/Album' or just 'Album' if no enclosing folder|
|
||||
@@ -2635,6 +2636,8 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://wellsaidlabs.com"><img src="https://avatars.githubusercontent.com/u/7424737?v=4?s=75" width="75px;" alt="Michael Petrochuk"/><br /><sub><b>Michael Petrochuk</b></sub></a><br /><a href="https://github.com/RhetTbull/osxphotos/issues?q=author%3APetrochukM" title="Bug reports">🐛</a> <a href="https://github.com/RhetTbull/osxphotos/commits?author=PetrochukM" title="Code">💻</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://qkeddy.github.io/quin-eddy-development-portfolio/"><img src="https://avatars.githubusercontent.com/u/9737814?v=4?s=75" width="75px;" alt="Quin Eddy"/><br /><sub><b>Quin Eddy</b></sub></a><br /><a href="#ideas-qkeddy" title="Ideas, Planning, & Feedback">🤔</a> <a href="#data-qkeddy" title="Data">🔣</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/johnsturgeon"><img src="https://avatars.githubusercontent.com/u/9746310?v=4?s=75" width="75px;" alt="John Sturgeon"/><br /><sub><b>John Sturgeon</b></sub></a><br /><a href="https://github.com/RhetTbull/osxphotos/issues?q=author%3Ajohnsturgeon" title="Bug reports">🐛</a> <a href="https://github.com/RhetTbull/osxphotos/commits?author=johnsturgeon" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://github.com/mave2k"><img src="https://avatars.githubusercontent.com/u/8629837?v=4?s=75" width="75px;" alt="mave2k"/><br /><sub><b>mave2k</b></sub></a><br /><a href="https://github.com/RhetTbull/osxphotos/commits?author=mave2k" title="Documentation">📖</a></td>
|
||||
<td align="center" valign="top" width="14.28%"><a href="https://danielbeadle.net"><img src="https://avatars.githubusercontent.com/u/6235378?v=4?s=75" width="75px;" alt="Daniel Beadle"/><br /><sub><b>Daniel Beadle</b></sub></a><br /><a href="#ideas-djbeadle" title="Ideas, Planning, & Feedback">🤔</a></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Sphinx build info version 1
|
||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 3e2bec5dfe42c55d8ca7fda34955769a
|
||||
config: fb37640e80b399c6b9f2e7d520116e14
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../genindex.html" /><link rel="search" title="Search" href="../search.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>Overview: module code - osxphotos 0.56.1 documentation</title>
|
||||
<title>Overview: module code - osxphotos 0.56.5 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="../_static/copybutton.css" />
|
||||
@@ -123,7 +123,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../index.html"><div class="brand">osxphotos 0.56.1 documentation</div></a>
|
||||
<a href="../index.html"><div class="brand">osxphotos 0.56.5 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -146,7 +146,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.1 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.5 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>osxphotos._constants - osxphotos 0.55.7 documentation</title>
|
||||
<title>osxphotos._constants - osxphotos 0.56.4 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" />
|
||||
@@ -123,7 +123,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../index.html"><div class="brand">osxphotos 0.55.7 documentation</div></a>
|
||||
<a href="../../index.html"><div class="brand">osxphotos 0.56.4 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -146,7 +146,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.55.7 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.4 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
@@ -195,9 +195,9 @@
|
||||
</div>
|
||||
<article role="main">
|
||||
<h1>Source code for osxphotos._constants</h1><div class="highlight"><pre>
|
||||
<span></span><span class="sd">"""</span>
|
||||
<span class="sd">Constants used by osxphotos </span>
|
||||
<span class="sd">"""</span>
|
||||
<span></span><span class="sd">""" Constants used by osxphotos """</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">__future__</span> <span class="kn">import</span> <span class="n">annotations</span>
|
||||
|
||||
<span class="kn">import</span> <span class="nn">os.path</span>
|
||||
<span class="kn">from</span> <span class="nn">datetime</span> <span class="kn">import</span> <span class="n">datetime</span>
|
||||
@@ -335,7 +335,9 @@
|
||||
<span class="n">_PHOTOS_8_SHARED_PHOTO_PATH</span> <span class="o">=</span> <span class="s2">"scopes/cloudsharing/data"</span>
|
||||
|
||||
<span class="c1"># Where are shared iCloud derivatives located?</span>
|
||||
<span class="n">_PHOTOS_5_SHARED_DERIVATIVE_PATH</span> <span class="o">=</span> <span class="s2">"resources/cloudsharing/resources/derivatives/masters"</span>
|
||||
<span class="n">_PHOTOS_5_SHARED_DERIVATIVE_PATH</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="s2">"resources/cloudsharing/resources/derivatives/masters"</span>
|
||||
<span class="p">)</span>
|
||||
<span class="n">_PHOTOS_8_SHARED_DERIVATIVE_PATH</span> <span class="o">=</span> <span class="s2">"scopes/cloudsharing/resources/derivatives/masters"</span>
|
||||
|
||||
<span class="c1"># What type of file? Based on ZGENERICASSET.ZKIND in Photos 5 database</span>
|
||||
@@ -410,11 +412,11 @@
|
||||
<span class="n">TITLE</span> <span class="o">=</span> <span class="mi">2017</span>
|
||||
<span class="n">DESCRIPTION</span> <span class="o">=</span> <span class="mi">2018</span>
|
||||
<span class="n">HOME</span> <span class="o">=</span> <span class="mi">2020</span>
|
||||
<span class="n">WORK</span> <span class="o">=</span> <span class="mi">2036</span>
|
||||
<span class="n">PERSON</span> <span class="o">=</span> <span class="mi">2021</span>
|
||||
<span class="n">ACTIVITY</span> <span class="o">=</span> <span class="mi">2027</span>
|
||||
<span class="n">HOLIDAY</span> <span class="o">=</span> <span class="mi">2029</span>
|
||||
<span class="n">SEASON</span> <span class="o">=</span> <span class="mi">2030</span>
|
||||
<span class="n">WORK</span> <span class="o">=</span> <span class="mi">2036</span>
|
||||
<span class="n">VENUE</span> <span class="o">=</span> <span class="mi">2038</span>
|
||||
<span class="n">VENUE_TYPE</span> <span class="o">=</span> <span class="mi">2039</span>
|
||||
<span class="n">PHOTO_TYPE_VIDEO</span> <span class="o">=</span> <span class="mi">2044</span>
|
||||
@@ -427,6 +429,7 @@
|
||||
<span class="n">PHOTO_TYPE_PORTRAIT</span> <span class="o">=</span> <span class="mi">2053</span>
|
||||
<span class="n">PHOTO_TYPE_SELFIES</span> <span class="o">=</span> <span class="mi">2054</span>
|
||||
<span class="n">PHOTO_TYPE_FAVORITES</span> <span class="o">=</span> <span class="mi">2055</span>
|
||||
<span class="n">PHOTO_TYPE_ANIMATED</span> <span class="o">=</span> <span class="kc">None</span> <span class="c1"># Photos 8+ only</span>
|
||||
<span class="n">MEDIA_TYPES</span> <span class="o">=</span> <span class="p">[</span>
|
||||
<span class="n">PHOTO_TYPE_VIDEO</span><span class="p">,</span>
|
||||
<span class="n">PHOTO_TYPE_SLOMO</span><span class="p">,</span>
|
||||
@@ -441,7 +444,23 @@
|
||||
<span class="p">]</span>
|
||||
<span class="n">PHOTO_NAME</span> <span class="o">=</span> <span class="mi">2056</span>
|
||||
<span class="n">CAMERA</span> <span class="o">=</span> <span class="kc">None</span> <span class="c1"># Photos 8+ only</span>
|
||||
<span class="n">TEXT_FOUND</span> <span class="o">=</span> <span class="kc">None</span> <span class="c1"># Photos 8+ only</span>
|
||||
<span class="n">DETECTED_TEXT</span> <span class="o">=</span> <span class="kc">None</span> <span class="c1"># Photos 8+ only</span>
|
||||
<span class="n">SOURCE</span> <span class="o">=</span> <span class="kc">None</span> <span class="c1"># Photos 8+ only</span>
|
||||
|
||||
<span class="nd">@classmethod</span>
|
||||
<span class="k">def</span> <span class="nf">categories</span><span class="p">(</span><span class="bp">cls</span><span class="p">)</span> <span class="o">-></span> <span class="nb">dict</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">str</span><span class="p">]:</span>
|
||||
<span class="sd">"""Return categories as dict of value: name"""</span>
|
||||
<span class="c1"># a bit of a hack to basically reverse the enum</span>
|
||||
<span class="k">return</span> <span class="p">{</span>
|
||||
<span class="n">value</span><span class="p">:</span> <span class="n">name</span>
|
||||
<span class="k">for</span> <span class="n">name</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="bp">cls</span><span class="o">.</span><span class="vm">__dict__</span><span class="o">.</span><span class="n">items</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="n">name</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span>
|
||||
<span class="ow">and</span> <span class="ow">not</span> <span class="n">name</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">"__"</span><span class="p">)</span>
|
||||
<span class="ow">and</span> <span class="ow">not</span> <span class="n">callable</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
|
||||
<span class="ow">and</span> <span class="n">name</span><span class="o">.</span><span class="n">isupper</span><span class="p">()</span>
|
||||
<span class="ow">and</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="nb">dict</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">))</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
|
||||
<span class="k">class</span> <span class="nc">SearchCategory_Photos8</span><span class="p">(</span><span class="n">SearchCategory</span><span class="p">):</span>
|
||||
@@ -449,6 +468,20 @@
|
||||
|
||||
<span class="c1"># Many of the category values changed in Ventura / Photos 8</span>
|
||||
<span class="c1"># and some new categories were added</span>
|
||||
<span class="n">CITY</span> <span class="o">=</span> <span class="mi">5</span>
|
||||
<span class="n">LOCALITY_4</span> <span class="o">=</span> <span class="mi">4</span>
|
||||
<span class="n">SUB_LOCALITY_5</span> <span class="o">=</span> <span class="kc">None</span>
|
||||
<span class="n">SUB_LOCALITY_6</span> <span class="o">=</span> <span class="mi">6</span>
|
||||
<span class="n">LOCALITY_8</span> <span class="o">=</span> <span class="mi">8</span>
|
||||
<span class="n">NAMED_AREA</span> <span class="o">=</span> <span class="mi">7</span>
|
||||
<span class="n">ALL_LOCALITY</span> <span class="o">=</span> <span class="p">[</span>
|
||||
<span class="n">LOCALITY_4</span><span class="p">,</span>
|
||||
<span class="n">SUB_LOCALITY_6</span><span class="p">,</span>
|
||||
<span class="n">LOCALITY_8</span><span class="p">,</span>
|
||||
<span class="n">NAMED_AREA</span><span class="p">,</span>
|
||||
<span class="p">]</span>
|
||||
<span class="n">HOME</span> <span class="o">=</span> <span class="mi">1000</span>
|
||||
<span class="n">WORK</span> <span class="o">=</span> <span class="mi">1001</span>
|
||||
<span class="n">LABEL</span> <span class="o">=</span> <span class="mi">1500</span>
|
||||
<span class="n">MONTH</span> <span class="o">=</span> <span class="mi">1100</span>
|
||||
<span class="n">YEAR</span> <span class="o">=</span> <span class="mi">1101</span>
|
||||
@@ -458,11 +491,55 @@
|
||||
<span class="n">TITLE</span> <span class="o">=</span> <span class="mi">1201</span>
|
||||
<span class="n">DESCRIPTION</span> <span class="o">=</span> <span class="mi">1202</span>
|
||||
<span class="n">DETECTED_TEXT</span> <span class="o">=</span> <span class="mi">1203</span> <span class="c1"># new in Photos 8</span>
|
||||
<span class="n">TEXT_FOUND</span> <span class="o">=</span> <span class="mi">1205</span> <span class="c1"># new in Photos 8</span>
|
||||
<span class="n">PERSON</span> <span class="o">=</span> <span class="mi">1300</span>
|
||||
<span class="n">ACTIVITY</span> <span class="o">=</span> <span class="mi">1600</span>
|
||||
<span class="n">VENUE</span> <span class="o">=</span> <span class="mi">1700</span>
|
||||
<span class="n">VENUE_TYPE</span> <span class="o">=</span> <span class="mi">1701</span>
|
||||
<span class="n">PHOTO_TYPE_VIDEO</span> <span class="o">=</span> <span class="mi">1901</span>
|
||||
<span class="n">PHOTO_TYPE_SELFIES</span> <span class="o">=</span> <span class="mi">1915</span>
|
||||
<span class="n">PHOTO_TYPE_LIVE</span> <span class="o">=</span> <span class="mi">1906</span>
|
||||
<span class="n">PHOTO_TYPE_PORTRAIT</span> <span class="o">=</span> <span class="mi">1914</span>
|
||||
<span class="n">PHOTO_TYPE_FAVORITES</span> <span class="o">=</span> <span class="mi">2000</span>
|
||||
<span class="n">PHOTO_TYPE_PANORAMA</span> <span class="o">=</span> <span class="mi">1908</span>
|
||||
<span class="n">PHOTO_TYPE_TIMELAPSE</span> <span class="o">=</span> <span class="mi">1909</span>
|
||||
<span class="n">PHOTO_TYPE_SLOMO</span> <span class="o">=</span> <span class="mi">1905</span>
|
||||
<span class="n">PHOTO_TYPE_BURSTS</span> <span class="o">=</span> <span class="mi">1913</span>
|
||||
<span class="n">PHOTO_TYPE_SCREENSHOT</span> <span class="o">=</span> <span class="mi">1907</span>
|
||||
<span class="n">PHOTO_TYPE_ANIMATED</span> <span class="o">=</span> <span class="mi">1912</span>
|
||||
<span class="n">PHOTO_TYPE_RAW</span> <span class="o">=</span> <span class="mi">1902</span>
|
||||
<span class="n">MEDIA_TYPES</span> <span class="o">=</span> <span class="p">[</span>
|
||||
<span class="n">PHOTO_TYPE_VIDEO</span><span class="p">,</span>
|
||||
<span class="n">PHOTO_TYPE_SLOMO</span><span class="p">,</span>
|
||||
<span class="n">PHOTO_TYPE_LIVE</span><span class="p">,</span>
|
||||
<span class="n">PHOTO_TYPE_SCREENSHOT</span><span class="p">,</span>
|
||||
<span class="n">PHOTO_TYPE_PANORAMA</span><span class="p">,</span>
|
||||
<span class="n">PHOTO_TYPE_TIMELAPSE</span><span class="p">,</span>
|
||||
<span class="n">PHOTO_TYPE_BURSTS</span><span class="p">,</span>
|
||||
<span class="n">PHOTO_TYPE_PORTRAIT</span><span class="p">,</span>
|
||||
<span class="n">PHOTO_TYPE_SELFIES</span><span class="p">,</span>
|
||||
<span class="n">PHOTO_TYPE_FAVORITES</span><span class="p">,</span>
|
||||
<span class="n">PHOTO_TYPE_ANIMATED</span><span class="p">,</span>
|
||||
<span class="p">]</span>
|
||||
<span class="n">PHOTO_NAME</span> <span class="o">=</span> <span class="mi">2100</span>
|
||||
<span class="n">CAMERA</span> <span class="o">=</span> <span class="mi">2300</span> <span class="c1"># new in Photos 8</span>
|
||||
<span class="n">SOURCE</span> <span class="o">=</span> <span class="mi">2200</span> <span class="c1"># new in Photos 8, shows the app/software source for the photo, e.g. Messages, Safari, etc.</span>
|
||||
|
||||
<span class="nd">@classmethod</span>
|
||||
<span class="k">def</span> <span class="nf">categories</span><span class="p">(</span><span class="bp">cls</span><span class="p">)</span> <span class="o">-></span> <span class="nb">dict</span><span class="p">[</span><span class="nb">int</span><span class="p">,</span> <span class="nb">str</span><span class="p">]:</span>
|
||||
<span class="sd">"""Return categories as dict of value: name"""</span>
|
||||
<span class="c1"># need to get the categories from the base class and update with the new values</span>
|
||||
<span class="n">classdict</span> <span class="o">=</span> <span class="n">SearchCategory</span><span class="o">.</span><span class="vm">__dict__</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
|
||||
<span class="n">classdict</span> <span class="o">|=</span> <span class="bp">cls</span><span class="o">.</span><span class="vm">__dict__</span><span class="o">.</span><span class="n">copy</span><span class="p">()</span>
|
||||
<span class="k">return</span> <span class="p">{</span>
|
||||
<span class="n">value</span><span class="p">:</span> <span class="n">name</span>
|
||||
<span class="k">for</span> <span class="n">name</span><span class="p">,</span> <span class="n">value</span> <span class="ow">in</span> <span class="n">classdict</span><span class="o">.</span><span class="n">items</span><span class="p">()</span>
|
||||
<span class="k">if</span> <span class="n">name</span> <span class="ow">is</span> <span class="ow">not</span> <span class="kc">None</span>
|
||||
<span class="ow">and</span> <span class="ow">not</span> <span class="n">name</span><span class="o">.</span><span class="n">startswith</span><span class="p">(</span><span class="s2">"__"</span><span class="p">)</span>
|
||||
<span class="ow">and</span> <span class="ow">not</span> <span class="n">callable</span><span class="p">(</span><span class="n">name</span><span class="p">)</span>
|
||||
<span class="ow">and</span> <span class="n">name</span><span class="o">.</span><span class="n">isupper</span><span class="p">()</span>
|
||||
<span class="ow">and</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">value</span><span class="p">,</span> <span class="p">(</span><span class="nb">list</span><span class="p">,</span> <span class="nb">dict</span><span class="p">,</span> <span class="nb">tuple</span><span class="p">))</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
|
||||
<span class="k">def</span> <span class="nf">search_category_factory</span><span class="p">(</span><span class="n">version</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-></span> <span class="n">SearchCategory</span><span class="p">:</span>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>osxphotos.debug - osxphotos 0.56.1 documentation</title>
|
||||
<title>osxphotos.debug - osxphotos 0.56.4 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" />
|
||||
@@ -123,7 +123,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../index.html"><div class="brand">osxphotos 0.56.1 documentation</div></a>
|
||||
<a href="../../index.html"><div class="brand">osxphotos 0.56.4 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -146,7 +146,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.1 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.4 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>osxphotos.exiftool - osxphotos 0.55.6 documentation</title>
|
||||
<title>osxphotos.exiftool - osxphotos 0.56.4 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" />
|
||||
@@ -123,7 +123,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../index.html"><div class="brand">osxphotos 0.55.6 documentation</div></a>
|
||||
<a href="../../index.html"><div class="brand">osxphotos 0.56.4 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -146,7 +146,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.55.6 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.4 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>osxphotos.export_db - osxphotos 0.55.3 documentation</title>
|
||||
<title>osxphotos.export_db - osxphotos 0.56.4 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" />
|
||||
@@ -123,7 +123,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../index.html"><div class="brand">osxphotos 0.55.3 documentation</div></a>
|
||||
<a href="../../index.html"><div class="brand">osxphotos 0.56.4 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -146,7 +146,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.55.3 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.4 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>osxphotos.photoexporter - osxphotos 0.55.6 documentation</title>
|
||||
<title>osxphotos.photoexporter - osxphotos 0.56.4 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" />
|
||||
@@ -123,7 +123,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../index.html"><div class="brand">osxphotos 0.55.6 documentation</div></a>
|
||||
<a href="../../index.html"><div class="brand">osxphotos 0.56.4 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -146,7 +146,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.55.6 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.4 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>osxphotos.photoinfo - osxphotos 0.56.1 documentation</title>
|
||||
<title>osxphotos.photoinfo - osxphotos 0.56.4 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" />
|
||||
@@ -123,7 +123,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../index.html"><div class="brand">osxphotos 0.56.1 documentation</div></a>
|
||||
<a href="../../index.html"><div class="brand">osxphotos 0.56.4 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -146,7 +146,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.1 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.4 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../../genindex.html" /><link rel="search" title="Search" href="../../../search.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>osxphotos.photosdb.photosdb - osxphotos 0.56.1 documentation</title>
|
||||
<title>osxphotos.photosdb.photosdb - osxphotos 0.56.4 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../../_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../../_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="../../../_static/copybutton.css" />
|
||||
@@ -123,7 +123,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../../index.html"><div class="brand">osxphotos 0.56.1 documentation</div></a>
|
||||
<a href="../../../index.html"><div class="brand">osxphotos 0.56.4 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -146,7 +146,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../../index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.1 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.4 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
@@ -521,8 +521,15 @@
|
||||
<span class="c1"># _db_version is set from photos.db</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_db_version</span> <span class="o">=</span> <span class="n">get_db_version</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_tmp_db</span><span class="p">)</span>
|
||||
<span class="c1"># _photos_version is set from Photos.sqlite which only exists for Photos 5+</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_photos_ver</span> <span class="o">=</span> <span class="mi">4</span> <span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_db_version</span> <span class="o">==</span> <span class="mi">4</span> <span class="k">else</span> <span class="mi">5</span>
|
||||
|
||||
<span class="n">db_ver_int</span> <span class="o">=</span> <span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_db_version</span><span class="p">)</span>
|
||||
<span class="k">if</span> <span class="n">db_ver_int</span> <span class="o"><</span> <span class="mi">3000</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_photos_ver</span> <span class="o">=</span> <span class="mi">2</span>
|
||||
<span class="k">elif</span> <span class="n">db_ver_int</span> <span class="o"><</span> <span class="mi">4000</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_photos_ver</span> <span class="o">=</span> <span class="mi">3</span>
|
||||
<span class="k">elif</span> <span class="n">db_ver_int</span> <span class="o"><</span> <span class="mi">5000</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_photos_ver</span> <span class="o">=</span> <span class="mi">4</span>
|
||||
<span class="k">else</span><span class="p">:</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">_photos_ver</span> <span class="o">=</span> <span class="mi">5</span>
|
||||
<span class="c1"># If Photos >= 5, actual data isn't in photos.db but in Photos.sqlite</span>
|
||||
<span class="k">if</span> <span class="nb">int</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_db_version</span><span class="p">)</span> <span class="o">></span> <span class="nb">int</span><span class="p">(</span><span class="n">_PHOTOS_4_VERSION</span><span class="p">):</span>
|
||||
<span class="n">dbpath</span> <span class="o">=</span> <span class="n">pathlib</span><span class="o">.</span><span class="n">Path</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_dbfile</span><span class="p">)</span><span class="o">.</span><span class="n">parent</span>
|
||||
@@ -782,6 +789,11 @@
|
||||
<span class="sd">"""returns path to the Photos library PhotosDB was initialized with"""</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_library_path</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">photos_version</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""returns version of Photos app that created the library"""</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_photos_ver</span>
|
||||
|
||||
<div class="viewcode-block" id="PhotosDB.get_db_connection"><a class="viewcode-back" href="../../../reference.html#osxphotos.PhotosDB.get_db_connection">[docs]</a> <span class="k">def</span> <span class="nf">get_db_connection</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""Get connection to the working copy of the Photos database</span>
|
||||
|
||||
@@ -1029,10 +1041,10 @@
|
||||
<span class="c1"># for compatability with Photos 5 where album kind is ZKIND</span>
|
||||
<span class="s2">"kind"</span><span class="p">:</span> <span class="n">album</span><span class="p">[</span><span class="mi">7</span><span class="p">],</span>
|
||||
<span class="s2">"creation_date"</span><span class="p">:</span> <span class="n">album</span><span class="p">[</span><span class="mi">8</span><span class="p">],</span>
|
||||
<span class="s2">"start_date"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Photos 5 only</span>
|
||||
<span class="s2">"end_date"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Photos 5 only</span>
|
||||
<span class="s2">"customsortascending"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Photos 5 only</span>
|
||||
<span class="s2">"customsortkey"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Photos 5 only</span>
|
||||
<span class="s2">"start_date"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Photos 5+ only</span>
|
||||
<span class="s2">"end_date"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Photos 5+ only</span>
|
||||
<span class="s2">"customsortascending"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Photos 5+ only</span>
|
||||
<span class="s2">"customsortkey"</span><span class="p">:</span> <span class="kc">None</span><span class="p">,</span> <span class="c1"># Photos 5+ only</span>
|
||||
<span class="p">}</span>
|
||||
|
||||
<span class="c1"># get details about folders</span>
|
||||
|
||||
@@ -1,39 +1,203 @@
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="en">
|
||||
<head><meta charset="utf-8"/>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" />
|
||||
|
||||
<!DOCTYPE html>
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>osxphotos.scoreinfo - osxphotos 0.56.4 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
|
||||
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>osxphotos.scoreinfo — osxphotos 0.47.9 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/alabaster.css" />
|
||||
<script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<link rel="index" title="Index" href="../../genindex.html" />
|
||||
<link rel="search" title="Search" href="../../search.html" />
|
||||
|
||||
<link rel="stylesheet" href="../../_static/custom.css" type="text/css" />
|
||||
|
||||
<style>
|
||||
body {
|
||||
--color-code-background: #f8f8f8;
|
||||
--color-code-foreground: black;
|
||||
|
||||
}
|
||||
@media not print {
|
||||
body[data-theme="dark"] {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
body:not([data-theme="light"]) {
|
||||
--color-code-background: #202020;
|
||||
--color-code-foreground: #d0d0d0;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</style></head>
|
||||
<body>
|
||||
|
||||
<script>
|
||||
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||
</script>
|
||||
|
||||
|
||||
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||
<title>Contents</title>
|
||||
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||
<title>Menu</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||
<title>Expand</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||
<polyline points="9 18 15 12 9 6"></polyline>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||
<title>Light mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||
<circle cx="12" cy="12" r="5"></circle>
|
||||
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||
<title>Dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||
</svg>
|
||||
</symbol>
|
||||
<symbol id="svg-sun-half" viewBox="0 0 24 24">
|
||||
<title>Auto light/dark mode</title>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
|
||||
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||
<circle cx="12" cy="12" r="9" />
|
||||
<path d="M13 12h5" />
|
||||
<path d="M13 15h4" />
|
||||
<path d="M13 18h1" />
|
||||
<path d="M13 9h4" />
|
||||
<path d="M13 6h1" />
|
||||
</svg>
|
||||
</symbol>
|
||||
</svg>
|
||||
|
||||
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
||||
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
||||
<label class="overlay sidebar-overlay" for="__navigation">
|
||||
<div class="visually-hidden">Hide navigation sidebar</div>
|
||||
</label>
|
||||
<label class="overlay toc-overlay" for="__toc">
|
||||
<div class="visually-hidden">Hide table of contents sidebar</div>
|
||||
</label>
|
||||
|
||||
|
||||
|
||||
<div class="page">
|
||||
<header class="mobile-header">
|
||||
<div class="header-left">
|
||||
<label class="nav-overlay-icon" for="__navigation">
|
||||
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
||||
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../index.html"><div class="brand">osxphotos 0.56.4 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
<button class="theme-toggle">
|
||||
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-header-icon no-toc" for="__toc">
|
||||
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||
</label>
|
||||
</div>
|
||||
</header>
|
||||
<aside class="sidebar-drawer">
|
||||
<div class="sidebar-container">
|
||||
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
|
||||
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=0.9, maximum-scale=0.9" />
|
||||
|
||||
</head><body>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.4 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
<input type="hidden" name="check_keywords" value="yes">
|
||||
<input type="hidden" name="area" value="default">
|
||||
</form>
|
||||
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../overview.html">OSXPhotos</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../tutorial.html">OSXPhotos Tutorial</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../cli.html">OSXPhotos Command Line Interface (CLI)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../template_help.html">OSXPhotos Template System</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../package_overview.html">OSXPhotos Python Package Overview</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../reference.html">OSXPhotos python API</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="document">
|
||||
<div class="documentwrapper">
|
||||
<div class="bodywrapper">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="body" role="main">
|
||||
|
||||
<h1>Source code for osxphotos.scoreinfo</h1><div class="highlight"><pre>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</aside>
|
||||
<div class="main">
|
||||
<div class="content">
|
||||
<div class="article-container">
|
||||
<a href="#" class="back-to-top muted-link">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||
</svg>
|
||||
<span>Back to top</span>
|
||||
</a>
|
||||
<div class="content-icon-container">
|
||||
<div class="theme-toggle-container theme-toggle-content">
|
||||
<button class="theme-toggle">
|
||||
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||
</button>
|
||||
</div>
|
||||
<label class="toc-overlay-icon toc-content-icon no-toc" for="__toc">
|
||||
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||
</label>
|
||||
</div>
|
||||
<article role="main">
|
||||
<h1>Source code for osxphotos.scoreinfo</h1><div class="highlight"><pre>
|
||||
<span></span><span class="sd">""" ScoreInfo class to expose computed score info from the library """</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">dataclasses</span> <span class="kn">import</span> <span class="n">dataclass</span>
|
||||
<span class="kn">from</span> <span class="nn">dataclasses</span> <span class="kn">import</span> <span class="n">dataclass</span><span class="p">,</span> <span class="n">asdict</span>
|
||||
|
||||
<span class="kn">from</span> <span class="nn">._constants</span> <span class="kn">import</span> <span class="n">_PHOTOS_4_VERSION</span>
|
||||
|
||||
@@ -70,74 +234,53 @@
|
||||
<span class="n">tastefully_blurred</span><span class="p">:</span> <span class="nb">float</span>
|
||||
<span class="n">well_chosen_subject</span><span class="p">:</span> <span class="nb">float</span>
|
||||
<span class="n">well_framed_subject</span><span class="p">:</span> <span class="nb">float</span>
|
||||
<span class="n">well_timed_shot</span><span class="p">:</span> <span class="nb">float</span></div>
|
||||
</pre></div>
|
||||
<span class="n">well_timed_shot</span><span class="p">:</span> <span class="nb">float</span>
|
||||
|
||||
</div>
|
||||
<div class="viewcode-block" id="ScoreInfo.asdict"><a class="viewcode-back" href="../../reference.html#osxphotos.ScoreInfo.asdict">[docs]</a> <span class="k">def</span> <span class="nf">asdict</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""Return ScoreInfo as a dict"""</span>
|
||||
<span class="k">return</span> <span class="n">asdict</span><span class="p">(</span><span class="bp">self</span><span class="p">)</span></div></div>
|
||||
</pre></div>
|
||||
</article>
|
||||
</div>
|
||||
<footer>
|
||||
|
||||
<div class="related-pages">
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
||||
<div class="sphinxsidebarwrapper">
|
||||
<h1 class="logo"><a href="../../index.html">osxphotos</a></h1>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<h3>Navigation</h3>
|
||||
<ul>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../overview.html">osxphotos</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../tutorial.html">Tutorial</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../cli.html">osxphotos command line interface (CLI)</a></li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="../../reference.html">osxphotos package</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="relations">
|
||||
<h3>Related Topics</h3>
|
||||
<ul>
|
||||
<li><a href="../../index.html">Documentation overview</a><ul>
|
||||
<li><a href="../index.html">Module code</a><ul>
|
||||
</ul></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="searchbox" style="display: none" role="search">
|
||||
<h3 id="searchlabel">Quick search</h3>
|
||||
<div class="searchformwrapper">
|
||||
<form class="search" action="../../search.html" method="get">
|
||||
<input type="text" name="q" aria-labelledby="searchlabel" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"/>
|
||||
<input type="submit" value="Go" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>$('#searchbox').show(0);</script>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="bottom-of-page">
|
||||
<div class="left-details">
|
||||
<div class="copyright">
|
||||
Copyright © 2021, Rhet Turnbull
|
||||
</div>
|
||||
Made with <a href="https://www.sphinx-doc.org/">Sphinx</a> and <a class="muted-link" href="https://pradyunsg.me">@pradyunsg</a>'s
|
||||
|
||||
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||
|
||||
</div>
|
||||
<div class="right-details">
|
||||
<div class="icons">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="clearer"></div>
|
||||
|
||||
</footer>
|
||||
</div>
|
||||
<div class="footer">
|
||||
©2021, Rhet Turnbull.
|
||||
<aside class="toc-drawer no-toc">
|
||||
|
||||
|
|
||||
Powered by <a href="http://sphinx-doc.org/">Sphinx 4.4.0</a>
|
||||
& <a href="https://github.com/bitprophet/alabaster">Alabaster 0.7.12</a>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</body>
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script data-url_root="../../" id="documentation_options" src="../../_static/documentation_options.js"></script>
|
||||
<script src="../../_static/jquery.js"></script>
|
||||
<script src="../../_static/underscore.js"></script>
|
||||
<script src="../../_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||
<script src="../../_static/doctools.js"></script>
|
||||
<script src="../../_static/sphinx_highlight.js"></script>
|
||||
<script src="../../_static/scripts/furo.js"></script>
|
||||
<script src="../../_static/clipboard.min.js"></script>
|
||||
<script src="../../_static/copybutton.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="../../genindex.html" /><link rel="search" title="Search" href="../../search.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>osxphotos.searchinfo - osxphotos 0.54.1 documentation</title>
|
||||
<title>osxphotos.searchinfo - osxphotos 0.56.4 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="../../_static/copybutton.css" />
|
||||
@@ -123,7 +123,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="../../index.html"><div class="brand">osxphotos 0.54.1 documentation</div></a>
|
||||
<a href="../../index.html"><div class="brand">osxphotos 0.56.4 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -146,7 +146,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="../../index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.54.1 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.4 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="../../search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
@@ -336,6 +336,13 @@
|
||||
<span class="k">return</span> <span class="p">[]</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_text_for_category</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_categories</span><span class="o">.</span><span class="n">DETECTED_TEXT</span><span class="p">)</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">text_found</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""Returns True if photos has detected text (macOS 13+ / Photos 8+ only)"""</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_photo</span><span class="o">.</span><span class="n">_db</span><span class="o">.</span><span class="n">_photos_ver</span> <span class="o"><</span> <span class="mi">8</span><span class="p">:</span>
|
||||
<span class="k">return</span> <span class="p">[]</span>
|
||||
<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_text_for_category</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_categories</span><span class="o">.</span><span class="n">TEXT_FOUND</span><span class="p">)</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">camera</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""returns camera name (macOS 13+ / Photos 8+ only)"""</span>
|
||||
@@ -344,10 +351,18 @@
|
||||
<span class="n">camera</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_text_for_category</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_categories</span><span class="o">.</span><span class="n">CAMERA</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">camera</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="k">if</span> <span class="n">camera</span> <span class="k">else</span> <span class="s2">""</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">source</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""returns source of the photo (e.g. "Messages", "Safar", etc) (macOS 13+ / Photos 8+ only)"""</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">_photo</span><span class="o">.</span><span class="n">_db</span><span class="o">.</span><span class="n">_photos_ver</span> <span class="o"><</span> <span class="mi">8</span><span class="p">:</span>
|
||||
<span class="k">return</span> <span class="s2">""</span>
|
||||
<span class="n">source</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_get_text_for_category</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">_categories</span><span class="o">.</span><span class="n">SOURCE</span><span class="p">)</span>
|
||||
<span class="k">return</span> <span class="n">source</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="k">if</span> <span class="n">source</span> <span class="k">else</span> <span class="s2">""</span>
|
||||
|
||||
<span class="nd">@property</span>
|
||||
<span class="k">def</span> <span class="nf">all</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""return all search info properties in a single list"""</span>
|
||||
<span class="nb">all</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="n">all_</span> <span class="o">=</span> <span class="p">(</span>
|
||||
<span class="bp">self</span><span class="o">.</span><span class="n">labels</span>
|
||||
<span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">place_names</span>
|
||||
<span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">streets</span>
|
||||
@@ -362,23 +377,23 @@
|
||||
<span class="o">+</span> <span class="bp">self</span><span class="o">.</span><span class="n">detected_text</span>
|
||||
<span class="p">)</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">city</span><span class="p">:</span>
|
||||
<span class="nb">all</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">city</span><span class="p">]</span>
|
||||
<span class="n">all_</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">city</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">state</span><span class="p">:</span>
|
||||
<span class="nb">all</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">state</span><span class="p">]</span>
|
||||
<span class="n">all_</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">state</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">state_abbreviation</span><span class="p">:</span>
|
||||
<span class="nb">all</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">state_abbreviation</span><span class="p">]</span>
|
||||
<span class="n">all_</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">state_abbreviation</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">country</span><span class="p">:</span>
|
||||
<span class="nb">all</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">country</span><span class="p">]</span>
|
||||
<span class="n">all_</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">country</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">month</span><span class="p">:</span>
|
||||
<span class="nb">all</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">month</span><span class="p">]</span>
|
||||
<span class="n">all_</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">month</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">year</span><span class="p">:</span>
|
||||
<span class="nb">all</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">year</span><span class="p">]</span>
|
||||
<span class="n">all_</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">year</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">season</span><span class="p">:</span>
|
||||
<span class="nb">all</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">season</span><span class="p">]</span>
|
||||
<span class="n">all_</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">season</span><span class="p">]</span>
|
||||
<span class="k">if</span> <span class="bp">self</span><span class="o">.</span><span class="n">camera</span><span class="p">:</span>
|
||||
<span class="nb">all</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">camera</span><span class="p">]</span>
|
||||
<span class="n">all_</span> <span class="o">+=</span> <span class="p">[</span><span class="bp">self</span><span class="o">.</span><span class="n">camera</span><span class="p">]</span>
|
||||
|
||||
<span class="k">return</span> <span class="nb">all</span>
|
||||
<span class="k">return</span> <span class="n">all_</span>
|
||||
|
||||
<div class="viewcode-block" id="SearchInfo.asdict"><a class="viewcode-back" href="../../reference.html#osxphotos.SearchInfo.asdict">[docs]</a> <span class="k">def</span> <span class="nf">asdict</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
|
||||
<span class="sd">"""return dict of search info"""</span>
|
||||
@@ -403,6 +418,7 @@
|
||||
<span class="s2">"media_types"</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">media_types</span><span class="p">,</span>
|
||||
<span class="s2">"detected_text"</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">detected_text</span><span class="p">,</span>
|
||||
<span class="s2">"camera"</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">camera</span><span class="p">,</span>
|
||||
<span class="s2">"source"</span><span class="p">:</span> <span class="bp">self</span><span class="o">.</span><span class="n">source</span><span class="p">,</span>
|
||||
<span class="p">}</span></div>
|
||||
|
||||
<span class="k">def</span> <span class="nf">_get_text_for_category</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">category</span><span class="p">):</span>
|
||||
|
||||
@@ -357,7 +357,7 @@ Template Substitutions
|
||||
* - {tab}
|
||||
- :A tab: '\t'
|
||||
* - {osxphotos_version}
|
||||
- The osxphotos version, e.g. '0.56.1'
|
||||
- The osxphotos version, e.g. '0.56.5'
|
||||
* - {osxphotos_cmd_line}
|
||||
- The full command line used to run osxphotos
|
||||
* - {album}
|
||||
|
||||
3
docs/_static/copybutton.css
vendored
3
docs/_static/copybutton.css
vendored
@@ -35,7 +35,8 @@ div.highlight {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.highlight:hover button.copybtn {
|
||||
/* Show the copybutton */
|
||||
.highlight:hover button.copybtn, button.copybtn.success {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
|
||||
42
docs/_static/copybutton.js
vendored
42
docs/_static/copybutton.js
vendored
@@ -102,18 +102,25 @@ const clearSelection = () => {
|
||||
}
|
||||
}
|
||||
|
||||
// Changes tooltip text for two seconds, then changes it back
|
||||
// Changes tooltip text for a moment, then changes it back
|
||||
// We want the timeout of our `success` class to be a bit shorter than the
|
||||
// tooltip and icon change, so that we can hide the icon before changing back.
|
||||
var timeoutIcon = 2000;
|
||||
var timeoutSuccessClass = 1500;
|
||||
|
||||
const temporarilyChangeTooltip = (el, oldText, newText) => {
|
||||
el.setAttribute('data-tooltip', newText)
|
||||
el.classList.add('success')
|
||||
setTimeout(() => el.setAttribute('data-tooltip', oldText), 2000)
|
||||
setTimeout(() => el.classList.remove('success'), 2000)
|
||||
// Remove success a little bit sooner than we change the tooltip
|
||||
// So that we can use CSS to hide the copybutton first
|
||||
setTimeout(() => el.classList.remove('success'), timeoutSuccessClass)
|
||||
setTimeout(() => el.setAttribute('data-tooltip', oldText), timeoutIcon)
|
||||
}
|
||||
|
||||
// Changes the copy button icon for two seconds, then changes it back
|
||||
const temporarilyChangeIcon = (el) => {
|
||||
el.innerHTML = iconCheck;
|
||||
setTimeout(() => {el.innerHTML = iconCopy}, 2000)
|
||||
setTimeout(() => {el.innerHTML = iconCopy}, timeoutIcon)
|
||||
}
|
||||
|
||||
const addCopyButtonToCodeCells = () => {
|
||||
@@ -125,7 +132,8 @@ const addCopyButtonToCodeCells = () => {
|
||||
}
|
||||
|
||||
// Add copybuttons to all of our code cells
|
||||
const codeCells = document.querySelectorAll('div.highlight pre')
|
||||
const COPYBUTTON_SELECTOR = 'div.highlight pre';
|
||||
const codeCells = document.querySelectorAll(COPYBUTTON_SELECTOR)
|
||||
codeCells.forEach((codeCell, index) => {
|
||||
const id = codeCellId(index)
|
||||
codeCell.setAttribute('id', id)
|
||||
@@ -141,10 +149,25 @@ function escapeRegExp(string) {
|
||||
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes excluded text from a Node.
|
||||
*
|
||||
* @param {Node} target Node to filter.
|
||||
* @param {string} exclude CSS selector of nodes to exclude.
|
||||
* @returns {DOMString} Text from `target` with text removed.
|
||||
*/
|
||||
function filterText(target, exclude) {
|
||||
const clone = target.cloneNode(true); // clone as to not modify the live DOM
|
||||
if (exclude) {
|
||||
// remove excluded nodes
|
||||
clone.querySelectorAll(exclude).forEach(node => node.remove());
|
||||
}
|
||||
return clone.innerText;
|
||||
}
|
||||
|
||||
// Callback when a copy button is clicked. Will be passed the node that was clicked
|
||||
// should then grab the text and replace pieces of text that shouldn't be used in output
|
||||
function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") {
|
||||
|
||||
var regexp;
|
||||
var match;
|
||||
|
||||
@@ -199,7 +222,12 @@ function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onl
|
||||
|
||||
var copyTargetText = (trigger) => {
|
||||
var target = document.querySelector(trigger.attributes['data-clipboard-target'].value);
|
||||
return formatCopyText(target.innerText, '', false, true, true, true, '', '')
|
||||
|
||||
// get filtered text
|
||||
let exclude = '.linenos, .gp';
|
||||
|
||||
let text = filterText(target, exclude);
|
||||
return formatCopyText(text, '', false, true, true, true, '', '')
|
||||
}
|
||||
|
||||
// Initialize with a callback so we can modify the text before copy
|
||||
|
||||
17
docs/_static/copybutton_funcs.js
vendored
17
docs/_static/copybutton_funcs.js
vendored
@@ -2,10 +2,25 @@ function escapeRegExp(string) {
|
||||
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes excluded text from a Node.
|
||||
*
|
||||
* @param {Node} target Node to filter.
|
||||
* @param {string} exclude CSS selector of nodes to exclude.
|
||||
* @returns {DOMString} Text from `target` with text removed.
|
||||
*/
|
||||
export function filterText(target, exclude) {
|
||||
const clone = target.cloneNode(true); // clone as to not modify the live DOM
|
||||
if (exclude) {
|
||||
// remove excluded nodes
|
||||
clone.querySelectorAll(exclude).forEach(node => node.remove());
|
||||
}
|
||||
return clone.innerText;
|
||||
}
|
||||
|
||||
// Callback when a copy button is clicked. Will be passed the node that was clicked
|
||||
// should then grab the text and replace pieces of text that shouldn't be used in output
|
||||
export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") {
|
||||
|
||||
var regexp;
|
||||
var match;
|
||||
|
||||
|
||||
2
docs/_static/documentation_options.js
vendored
2
docs/_static/documentation_options.js
vendored
@@ -1,6 +1,6 @@
|
||||
var DOCUMENTATION_OPTIONS = {
|
||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||
VERSION: '0.56.1',
|
||||
VERSION: '0.56.5',
|
||||
LANGUAGE: 'en',
|
||||
COLLAPSE_INDEX: false,
|
||||
BUILDER: 'html',
|
||||
|
||||
571
docs/cli.html
571
docs/cli.html
@@ -6,7 +6,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="OSXPhotos Template System" href="template_help.html" /><link rel="prev" title="OSXPhotos Tutorial" href="tutorial.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>OSXPhotos Command Line Interface (CLI) - osxphotos 0.56.1 documentation</title>
|
||||
<title>OSXPhotos Command Line Interface (CLI) - osxphotos 0.56.5 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||
@@ -124,7 +124,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">osxphotos 0.56.1 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">osxphotos 0.56.5 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -147,7 +147,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.1 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.5 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
@@ -229,6 +229,540 @@
|
||||
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>osxphotos about <span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
</section>
|
||||
<section id="osxphotos-add-locations">
|
||||
<h3>add-locations<a class="headerlink" href="#osxphotos-add-locations" title="Permalink to this heading">#</a></h3>
|
||||
<p>Add missing location data to photos in Photos.app using nearest neighbor.</p>
|
||||
<p>This command will search for photos that are missing location data and look
|
||||
for the nearest neighbor photo within a given window of time that contains
|
||||
location information. If a photo is found within the window of time, the
|
||||
location of the nearest neighbor will be used to update the location of the
|
||||
photo.</p>
|
||||
<p>For example, if you took pictures with your iPhone and also with a camera that
|
||||
doesn’t have location information, you can use this command to add location
|
||||
information to the photos taken with the camera from those taken with the
|
||||
iPhone.</p>
|
||||
<p>If you have many photos with missing location information but no nearest neighbor
|
||||
within the window of time, you could add location information to some photos manually
|
||||
then run this command again to add location information to the remaining photos.</p>
|
||||
<p>You can specify a subset of photos to update using the query options. For example,
|
||||
<cite>–selected</cite> to update only the selected photos, <cite>–added-after 2020-01-01</cite> to update
|
||||
only photos added after Jan 1, 2020, etc.</p>
|
||||
<p>Example:</p>
|
||||
<p>Add location data to all photos with missing location data within a ±2 hour window:</p>
|
||||
<p><cite>osxphotos add-locations –window “2 hr” –verbose</cite></p>
|
||||
<p>The add-locations command assumes that photos already have the correct date and time.
|
||||
If you have photos that are missing both location data and date/time information,
|
||||
you can use <cite>osxphotos timewarp</cite> to add date/time information to the photos and then
|
||||
use <cite>osxphotos add-locations</cite> to add location information.
|
||||
See <cite>osxphotos help timewarp</cite> for more information.</p>
|
||||
<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span>osxphotos add-locations <span class="o">[</span>OPTIONS<span class="o">]</span>
|
||||
</pre></div>
|
||||
</div>
|
||||
<p class="rubric">Options</p>
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-w">
|
||||
<span id="cmdoption-osxphotos-add-locations-window"></span><span class="sig-name descname"><span class="pre">-w</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--window</span></span><span class="sig-prename descclassname"> <span class="pre"><window></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-w" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Window of time to search for nearest neighbor; searches +/- window of time. Default is 1 hour. Format is one of ‘HH:MM:SS’, ‘D days’, ‘H hours’ (or hr), ‘M minutes’ (or min), ‘S seconds’ (or sec), ‘S’ (where S is seconds).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-dry-run">
|
||||
<span class="sig-name descname"><span class="pre">--dry-run</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-dry-run" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Don’t actually add location, just print what would be done. Most useful with –verbose.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-V">
|
||||
<span id="cmdoption-osxphotos-add-locations-v"></span><span id="cmdoption-osxphotos-add-locations-verbose"></span><span class="sig-name descname"><span class="pre">-V</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--verbose</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-V" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Print verbose output.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-T">
|
||||
<span id="cmdoption-osxphotos-add-locations-t"></span><span id="cmdoption-osxphotos-add-locations-timestamp"></span><span class="sig-name descname"><span class="pre">-T</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--timestamp</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-T" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Add time stamp to verbose output.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-keyword">
|
||||
<span class="sig-name descname"><span class="pre">--keyword</span></span><span class="sig-prename descclassname"> <span class="pre"><KEYWORD></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-keyword" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with keyword KEYWORD. If more than one keyword, treated as “OR”, e.g. find photos matching any keyword</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-no-keyword">
|
||||
<span class="sig-name descname"><span class="pre">--no-keyword</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-no-keyword" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with no keyword.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-person">
|
||||
<span class="sig-name descname"><span class="pre">--person</span></span><span class="sig-prename descclassname"> <span class="pre"><PERSON></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-person" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with person PERSON. If more than one person, treated as “OR”, e.g. find photos matching any person</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-album">
|
||||
<span class="sig-name descname"><span class="pre">--album</span></span><span class="sig-prename descclassname"> <span class="pre"><ALBUM></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-album" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos in album ALBUM. If more than one album, treated as “OR”, e.g. find photos matching any album</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-folder">
|
||||
<span class="sig-name descname"><span class="pre">--folder</span></span><span class="sig-prename descclassname"> <span class="pre"><FOLDER></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-folder" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos in an album in folder FOLDER. If more than one folder, treated as “OR”, e.g. find photos in any FOLDER. Only searches top level folders (e.g. does not look at subfolders)</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-name">
|
||||
<span class="sig-name descname"><span class="pre">--name</span></span><span class="sig-prename descclassname"> <span class="pre"><FILENAME></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-name" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with filename matching FILENAME. If more than one –name options is specified, they are treated as “OR”, e.g. find photos matching any FILENAME.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-uuid">
|
||||
<span class="sig-name descname"><span class="pre">--uuid</span></span><span class="sig-prename descclassname"> <span class="pre"><UUID></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-uuid" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with UUID(s). May be repeated to include multiple UUIDs.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-uuid-from-file">
|
||||
<span class="sig-name descname"><span class="pre">--uuid-from-file</span></span><span class="sig-prename descclassname"> <span class="pre"><FILE></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-uuid-from-file" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with UUID(s) loaded from FILE. Format is a single UUID per line. Lines preceded with # are ignored.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-title">
|
||||
<span class="sig-name descname"><span class="pre">--title</span></span><span class="sig-prename descclassname"> <span class="pre"><TITLE></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-title" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for TITLE in title of photo.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-no-title">
|
||||
<span class="sig-name descname"><span class="pre">--no-title</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-no-title" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with no title.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-description">
|
||||
<span class="sig-name descname"><span class="pre">--description</span></span><span class="sig-prename descclassname"> <span class="pre"><DESC></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-description" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for DESC in description of photo.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-no-description">
|
||||
<span class="sig-name descname"><span class="pre">--no-description</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-no-description" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with no description.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-place">
|
||||
<span class="sig-name descname"><span class="pre">--place</span></span><span class="sig-prename descclassname"> <span class="pre"><PLACE></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-place" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for PLACE in photo’s reverse geolocation info</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-no-place">
|
||||
<span class="sig-name descname"><span class="pre">--no-place</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-no-place" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with no associated place name info (no reverse geolocation info)</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-location">
|
||||
<span class="sig-name descname"><span class="pre">--location</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-location" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with associated location info (e.g. GPS coordinates)</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-no-location">
|
||||
<span class="sig-name descname"><span class="pre">--no-location</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-no-location" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with no associated location info (e.g. no GPS coordinates)</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-label">
|
||||
<span class="sig-name descname"><span class="pre">--label</span></span><span class="sig-prename descclassname"> <span class="pre"><LABEL></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-label" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with image classification label LABEL (Photos 5+ only). If more than one label, treated as “OR”, e.g. find photos matching any label</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-uti">
|
||||
<span class="sig-name descname"><span class="pre">--uti</span></span><span class="sig-prename descclassname"> <span class="pre"><UTI></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-uti" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos whose uniform type identifier (UTI) matches UTI</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-i">
|
||||
<span id="cmdoption-osxphotos-add-locations-ignore-case"></span><span class="sig-name descname"><span class="pre">-i</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--ignore-case</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-i" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Case insensitive search for title, description, place, keyword, person, or album.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-edited">
|
||||
<span class="sig-name descname"><span class="pre">--edited</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-edited" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that have been edited.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-external-edit">
|
||||
<span class="sig-name descname"><span class="pre">--external-edit</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-external-edit" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos edited in external editor.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-favorite">
|
||||
<span class="sig-name descname"><span class="pre">--favorite</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-favorite" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos marked favorite.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-favorite">
|
||||
<span class="sig-name descname"><span class="pre">--not-favorite</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-favorite" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos not marked favorite.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-hidden">
|
||||
<span class="sig-name descname"><span class="pre">--hidden</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-hidden" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos marked hidden.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-hidden">
|
||||
<span class="sig-name descname"><span class="pre">--not-hidden</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-hidden" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos not marked hidden.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-shared">
|
||||
<span class="sig-name descname"><span class="pre">--shared</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-shared" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos in shared iCloud album (Photos 5+ only).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-shared">
|
||||
<span class="sig-name descname"><span class="pre">--not-shared</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-shared" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos not in shared iCloud album (Photos 5+ only).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-burst">
|
||||
<span class="sig-name descname"><span class="pre">--burst</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-burst" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that were taken in a burst.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-burst">
|
||||
<span class="sig-name descname"><span class="pre">--not-burst</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-burst" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are not part of a burst.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-live">
|
||||
<span class="sig-name descname"><span class="pre">--live</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-live" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for Apple live photos</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-live">
|
||||
<span class="sig-name descname"><span class="pre">--not-live</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-live" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are not Apple live photos.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-portrait">
|
||||
<span class="sig-name descname"><span class="pre">--portrait</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-portrait" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for Apple portrait mode photos.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-portrait">
|
||||
<span class="sig-name descname"><span class="pre">--not-portrait</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-portrait" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are not Apple portrait mode photos.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-screenshot">
|
||||
<span class="sig-name descname"><span class="pre">--screenshot</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-screenshot" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for screenshot photos.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-screenshot">
|
||||
<span class="sig-name descname"><span class="pre">--not-screenshot</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-screenshot" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are not screenshot photos.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-slow-mo">
|
||||
<span class="sig-name descname"><span class="pre">--slow-mo</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-slow-mo" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for slow motion videos.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-slow-mo">
|
||||
<span class="sig-name descname"><span class="pre">--not-slow-mo</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-slow-mo" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are not slow motion videos.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-time-lapse">
|
||||
<span class="sig-name descname"><span class="pre">--time-lapse</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-time-lapse" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for time lapse videos.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-time-lapse">
|
||||
<span class="sig-name descname"><span class="pre">--not-time-lapse</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-time-lapse" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are not time lapse videos.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-hdr">
|
||||
<span class="sig-name descname"><span class="pre">--hdr</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-hdr" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for high dynamic range (HDR) photos.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-hdr">
|
||||
<span class="sig-name descname"><span class="pre">--not-hdr</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-hdr" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are not HDR photos.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-selfie">
|
||||
<span class="sig-name descname"><span class="pre">--selfie</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-selfie" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for selfies (photos taken with front-facing cameras).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-selfie">
|
||||
<span class="sig-name descname"><span class="pre">--not-selfie</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-selfie" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are not selfies.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-panorama">
|
||||
<span class="sig-name descname"><span class="pre">--panorama</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-panorama" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for panorama photos.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-panorama">
|
||||
<span class="sig-name descname"><span class="pre">--not-panorama</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-panorama" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are not panoramas.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-has-raw">
|
||||
<span class="sig-name descname"><span class="pre">--has-raw</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-has-raw" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with both a jpeg and raw version</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-only-movies">
|
||||
<span class="sig-name descname"><span class="pre">--only-movies</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-only-movies" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search only for movies (default searches both images and movies).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-only-photos">
|
||||
<span class="sig-name descname"><span class="pre">--only-photos</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-only-photos" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search only for photos/images (default searches both images and movies).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-from-date">
|
||||
<span class="sig-name descname"><span class="pre">--from-date</span></span><span class="sig-prename descclassname"> <span class="pre"><from_date></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-from-date" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search by item start date, e.g. 2000-01-12T12:00:00, 2001-01-12T12:00:00-07:00, or 2000-12-31 (ISO 8601 with/without timezone).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-to-date">
|
||||
<span class="sig-name descname"><span class="pre">--to-date</span></span><span class="sig-prename descclassname"> <span class="pre"><to_date></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-to-date" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search by item end date, e.g. 2000-01-12T12:00:00, 2001-01-12T12:00:00-07:00, or 2000-12-31 (ISO 8601 with/without timezone).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-from-time">
|
||||
<span class="sig-name descname"><span class="pre">--from-time</span></span><span class="sig-prename descclassname"> <span class="pre"><from_time></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-from-time" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search by item start time of day, e.g. 12:00, or 12:00:00.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-to-time">
|
||||
<span class="sig-name descname"><span class="pre">--to-time</span></span><span class="sig-prename descclassname"> <span class="pre"><to_time></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-to-time" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search by item end time of day, e.g. 12:00 or 12:00:00.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-year">
|
||||
<span class="sig-name descname"><span class="pre">--year</span></span><span class="sig-prename descclassname"> <span class="pre"><YEAR></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-year" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for items from a specific year, e.g. –year 2022 to find all photos from the year 2022. May be repeated to search multiple years.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-added-before">
|
||||
<span class="sig-name descname"><span class="pre">--added-before</span></span><span class="sig-prename descclassname"> <span class="pre"><DATE></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-added-before" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for items added to the library before a specific date/time, e.g. –added-before e.g. 2000-01-12T12:00:00, 2001-01-12T12:00:00-07:00, or 2000-12-31 (ISO 8601 with/without timezone).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-added-after">
|
||||
<span class="sig-name descname"><span class="pre">--added-after</span></span><span class="sig-prename descclassname"> <span class="pre"><DATE></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-added-after" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for items added to the libray after a specific date/time, e.g. –added-after e.g. 2000-01-12T12:00:00, 2001-01-12T12:00:00-07:00, or 2000-12-31 (ISO 8601 with/without timezone).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-added-in-last">
|
||||
<span class="sig-name descname"><span class="pre">--added-in-last</span></span><span class="sig-prename descclassname"> <span class="pre"><TIME_DELTA></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-added-in-last" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for items added to the library in the last TIME_DELTA, where TIME_DELTA is a string like ‘12 hrs’, ‘1 day’, ‘1d’, ‘1 week’, ‘2weeks’, ‘1 month’, ‘1 year’. for example, <cite>–added-in-last 7d</cite> and <cite>–added-in-last ‘1 week’</cite> are equivalent. months are assumed to be 30 days and years are assumed to be 365 days. Common English abbreviations are accepted, e.g. d, day, days or m, min, minutes.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-has-comment">
|
||||
<span class="sig-name descname"><span class="pre">--has-comment</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-has-comment" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that have comments.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-no-comment">
|
||||
<span class="sig-name descname"><span class="pre">--no-comment</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-no-comment" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with no comments.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-has-likes">
|
||||
<span class="sig-name descname"><span class="pre">--has-likes</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-has-likes" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that have likes.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-no-likes">
|
||||
<span class="sig-name descname"><span class="pre">--no-likes</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-no-likes" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with no likes.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-is-reference">
|
||||
<span class="sig-name descname"><span class="pre">--is-reference</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-is-reference" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that were imported as referenced files (not copied into Photos library).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-reference">
|
||||
<span class="sig-name descname"><span class="pre">--not-reference</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-reference" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are not references, that is, they were copied into the Photos library and are managed by Photos.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-in-album">
|
||||
<span class="sig-name descname"><span class="pre">--in-album</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-in-album" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are in one or more albums.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-in-album">
|
||||
<span class="sig-name descname"><span class="pre">--not-in-album</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-in-album" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are not in any albums.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-duplicate">
|
||||
<span class="sig-name descname"><span class="pre">--duplicate</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-duplicate" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with possible duplicates. osxphotos will compare signatures of photos, evaluating date created, size, height, width, and edited status to find <em>possible</em> duplicates. This does not compare images byte-for-byte nor compare hashes but should find photos imported multiple times or duplicated within Photos.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-min-size">
|
||||
<span class="sig-name descname"><span class="pre">--min-size</span></span><span class="sig-prename descclassname"> <span class="pre"><SIZE></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-min-size" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with size >= SIZE bytes. The size evaluated is the photo’s original size (when imported to Photos). Size may be specified as integer bytes or using SI or NIST units. For example, the following are all valid and equivalent sizes: ‘1048576’ ‘1.048576MB’, ‘1 MiB’.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-max-size">
|
||||
<span class="sig-name descname"><span class="pre">--max-size</span></span><span class="sig-prename descclassname"> <span class="pre"><SIZE></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-max-size" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with size <= SIZE bytes. The size evaluated is the photo’s original size (when imported to Photos). Size may be specified as integer bytes or using SI or NIST units. For example, the following are all valid and equivalent sizes: ‘1048576’ ‘1.048576MB’, ‘1 MiB’.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-missing">
|
||||
<span class="sig-name descname"><span class="pre">--missing</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-missing" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos missing from disk.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-missing">
|
||||
<span class="sig-name descname"><span class="pre">--not-missing</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-missing" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos present on disk (e.g. not missing).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-cloudasset">
|
||||
<span class="sig-name descname"><span class="pre">--cloudasset</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-cloudasset" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are part of an iCloud library</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-cloudasset">
|
||||
<span class="sig-name descname"><span class="pre">--not-cloudasset</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-cloudasset" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are not part of an iCloud library</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-incloud">
|
||||
<span class="sig-name descname"><span class="pre">--incloud</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-incloud" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are in iCloud (have been synched)</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-not-incloud">
|
||||
<span class="sig-name descname"><span class="pre">--not-incloud</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-not-incloud" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos that are not in iCloud (have not been synched)</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-regex">
|
||||
<span class="sig-name descname"><span class="pre">--regex</span></span><span class="sig-prename descclassname"> <span class="pre"><REGEX</span> <span class="pre">TEMPLATE></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-regex" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos where TEMPLATE matches regular expression REGEX. For example, to find photos in an album that begins with ‘Beach’: ‘–regex “^Beach” “{album}”’. You may specify more than one regular expression match by repeating ‘–regex’ with different arguments.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-selected">
|
||||
<span class="sig-name descname"><span class="pre">--selected</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-selected" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Filter for photos that are currently selected in Photos.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-exif">
|
||||
<span class="sig-name descname"><span class="pre">--exif</span></span><span class="sig-prename descclassname"> <span class="pre"><EXIF_TAG</span> <span class="pre">VALUE></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-exif" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos where EXIF_TAG exists in photo’s EXIF data and contains VALUE. For example, to find photos created by Adobe Photoshop: <cite>–exif Software ‘Adobe Photoshop’ `or to find all photos shot on a Canon camera: `–exif Make Canon</cite>. EXIF_TAG can be any valid exiftool tag, with or without group name, e.g. <cite>EXIF:Make</cite> or <cite>Make</cite>. To use –exif, exiftool must be installed and in the path.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-query-eval">
|
||||
<span class="sig-name descname"><span class="pre">--query-eval</span></span><span class="sig-prename descclassname"> <span class="pre"><CRITERIA></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-query-eval" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Evaluate CRITERIA to filter photos. CRITERIA will be evaluated in context of the following python list comprehension: <cite>photos = [photo for photo in photos if CRITERIA]</cite> where photo represents a PhotoInfo object. For example: <cite>–query-eval photo.favorite</cite> returns all photos that have been favorited and is equivalent to –favorite. You may specify more than one CRITERIA by using –query-eval multiple times. CRITERIA must be a valid python expression. See <a class="reference external" href="https://rhettbull.github.io/osxphotos/">https://rhettbull.github.io/osxphotos/</a> for additional documentation on the PhotoInfo class.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-query-function">
|
||||
<span class="sig-name descname"><span class="pre">--query-function</span></span><span class="sig-prename descclassname"> <span class="pre"><filename.py::function></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-query-function" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Run function to filter photos. Use this in format: –query-function filename.py::function where filename.py is a python file you’ve created and function is the name of the function in the python file you want to call. Your function will be passed a list of PhotoInfo objects and is expected to return a filtered list of PhotoInfo objects. You may use more than one function by repeating the –query-function option with a different value. Your query function will be called after all other query options have been evaluated. See https://github.com/RhetTbull/osxphotos/blob/master/examples/query_function.py for example of how to use this option.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-add-locations-theme">
|
||||
<span class="sig-name descname"><span class="pre">--theme</span></span><span class="sig-prename descclassname"> <span class="pre"><THEME></span></span><a class="headerlink" href="#cmdoption-osxphotos-add-locations-theme" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Specify the color theme to use for –verbose output. Valid themes are ‘dark’, ‘light’, ‘mono’, and ‘plain’. Defaults to ‘dark’ or ‘light’ depending on system dark mode setting.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Options<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><p>dark | light | mono | plain</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
</section>
|
||||
<section id="osxphotos-albums">
|
||||
<h3>albums<a class="headerlink" href="#osxphotos-albums" title="Permalink to this heading">#</a></h3>
|
||||
@@ -671,7 +1205,7 @@ to modify this behavior.</p>
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-export-label">
|
||||
<span class="sig-name descname"><span class="pre">--label</span></span><span class="sig-prename descclassname"> <span class="pre"><LABEL></span></span><a class="headerlink" href="#cmdoption-osxphotos-export-label" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with image classification label LABEL (Photos 5 only). If more than one label, treated as “OR”, e.g. find photos matching any label</p>
|
||||
<dd><p>Search for photos with image classification label LABEL (Photos 5+ only). If more than one label, treated as “OR”, e.g. find photos matching any label</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
@@ -725,13 +1259,13 @@ to modify this behavior.</p>
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-export-shared">
|
||||
<span class="sig-name descname"><span class="pre">--shared</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-export-shared" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos in shared iCloud album (Photos 5 only).</p>
|
||||
<dd><p>Search for photos in shared iCloud album (Photos 5+ only).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-export-not-shared">
|
||||
<span class="sig-name descname"><span class="pre">--not-shared</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-export-not-shared" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos not in shared iCloud album (Photos 5 only).</p>
|
||||
<dd><p>Search for photos not in shared iCloud album (Photos 5+ only).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
@@ -2207,7 +2741,7 @@ If the same query option is provided multiple times, they are treated as
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-query-label">
|
||||
<span class="sig-name descname"><span class="pre">--label</span></span><span class="sig-prename descclassname"> <span class="pre"><LABEL></span></span><a class="headerlink" href="#cmdoption-osxphotos-query-label" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with image classification label LABEL (Photos 5 only). If more than one label, treated as “OR”, e.g. find photos matching any label</p>
|
||||
<dd><p>Search for photos with image classification label LABEL (Photos 5+ only). If more than one label, treated as “OR”, e.g. find photos matching any label</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
@@ -2261,13 +2795,13 @@ If the same query option is provided multiple times, they are treated as
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-query-shared">
|
||||
<span class="sig-name descname"><span class="pre">--shared</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-query-shared" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos in shared iCloud album (Photos 5 only).</p>
|
||||
<dd><p>Search for photos in shared iCloud album (Photos 5+ only).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-query-not-shared">
|
||||
<span class="sig-name descname"><span class="pre">--not-shared</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-query-not-shared" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos not in shared iCloud album (Photos 5 only).</p>
|
||||
<dd><p>Search for photos not in shared iCloud album (Photos 5+ only).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
@@ -2738,7 +3272,7 @@ If the same query option is provided multiple times, they are treated as
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-repl-label">
|
||||
<span class="sig-name descname"><span class="pre">--label</span></span><span class="sig-prename descclassname"> <span class="pre"><LABEL></span></span><a class="headerlink" href="#cmdoption-osxphotos-repl-label" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with image classification label LABEL (Photos 5 only). If more than one label, treated as “OR”, e.g. find photos matching any label</p>
|
||||
<dd><p>Search for photos with image classification label LABEL (Photos 5+ only). If more than one label, treated as “OR”, e.g. find photos matching any label</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
@@ -2792,13 +3326,13 @@ If the same query option is provided multiple times, they are treated as
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-repl-shared">
|
||||
<span class="sig-name descname"><span class="pre">--shared</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-repl-shared" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos in shared iCloud album (Photos 5 only).</p>
|
||||
<dd><p>Search for photos in shared iCloud album (Photos 5+ only).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-repl-not-shared">
|
||||
<span class="sig-name descname"><span class="pre">--not-shared</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-repl-not-shared" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos not in shared iCloud album (Photos 5 only).</p>
|
||||
<dd><p>Search for photos not in shared iCloud album (Photos 5+ only).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
@@ -3233,6 +3767,12 @@ two different computers, you can export the metadata to a shared folder.</p>
|
||||
<dd><p>When used with –import, merge metadata in local Photos library with import data. Multiple metadata properties can be specified by repeating the –merge option or by using a comma-separated list. METADATA can be one of: all, keywords, albums, title, description, favorite. For example, to merge keywords and favorite, use <cite>–merge keywords –merge favorite</cite> or <cite>–merge keywords,favorite</cite>. If <cite>–merge all</cite> is specified, all metadata will be merged. Note that using –merge does not overwrite any existing metadata in the local Photos library. For example, if a photo is marked as favorite in the local library but not in the import source, –merge favorite will not change the favorite status in the local library. See also –set.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-sync-U">
|
||||
<span id="cmdoption-osxphotos-sync-u"></span><span id="cmdoption-osxphotos-sync-unmatched"></span><span class="sig-name descname"><span class="pre">-U</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--unmatched</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-sync-U" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>When used with –import, print out a list of photos in the import source that were not matched against the local library. Also prints out a list of photos in the local library that were not matched against the import source.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-sync-R">
|
||||
<span id="cmdoption-osxphotos-sync-r"></span><span id="cmdoption-osxphotos-sync-report"></span><span class="sig-name descname"><span class="pre">-R</span></span><span class="sig-prename descclassname"></span><span class="sig-prename descclassname"><span class="pre">,</span> </span><span class="sig-name descname"><span class="pre">--report</span></span><span class="sig-prename descclassname"> <span class="pre"><REPORT_FILE></span></span><a class="headerlink" href="#cmdoption-osxphotos-sync-R" title="Permalink to this definition">#</a></dt>
|
||||
@@ -3362,7 +3902,7 @@ two different computers, you can export the metadata to a shared folder.</p>
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-sync-label">
|
||||
<span class="sig-name descname"><span class="pre">--label</span></span><span class="sig-prename descclassname"> <span class="pre"><LABEL></span></span><a class="headerlink" href="#cmdoption-osxphotos-sync-label" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos with image classification label LABEL (Photos 5 only). If more than one label, treated as “OR”, e.g. find photos matching any label</p>
|
||||
<dd><p>Search for photos with image classification label LABEL (Photos 5+ only). If more than one label, treated as “OR”, e.g. find photos matching any label</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
@@ -3416,13 +3956,13 @@ two different computers, you can export the metadata to a shared folder.</p>
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-sync-shared">
|
||||
<span class="sig-name descname"><span class="pre">--shared</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-sync-shared" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos in shared iCloud album (Photos 5 only).</p>
|
||||
<dd><p>Search for photos in shared iCloud album (Photos 5+ only).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
<dt class="sig sig-object std" id="cmdoption-osxphotos-sync-not-shared">
|
||||
<span class="sig-name descname"><span class="pre">--not-shared</span></span><span class="sig-prename descclassname"></span><a class="headerlink" href="#cmdoption-osxphotos-sync-not-shared" title="Permalink to this definition">#</a></dt>
|
||||
<dd><p>Search for photos not in shared iCloud album (Photos 5 only).</p>
|
||||
<dd><p>Search for photos not in shared iCloud album (Photos 5+ only).</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="std option">
|
||||
@@ -4118,6 +4658,7 @@ Commands:
|
||||
<li><a class="reference internal" href="#">OSXPhotos Command Line Interface (CLI)</a><ul>
|
||||
<li><a class="reference internal" href="#osxphotos">osxphotos</a><ul>
|
||||
<li><a class="reference internal" href="#osxphotos-about">about</a></li>
|
||||
<li><a class="reference internal" href="#osxphotos-add-locations">add-locations</a></li>
|
||||
<li><a class="reference internal" href="#osxphotos-albums">albums</a></li>
|
||||
<li><a class="reference internal" href="#osxphotos-diff">diff</a></li>
|
||||
<li><a class="reference internal" href="#osxphotos-docs">docs</a></li>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -6,7 +6,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="OSXPhotos" href="overview.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>osxphotos 0.56.1 documentation</title>
|
||||
<title>osxphotos 0.56.5 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||
@@ -124,7 +124,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="#"><div class="brand">osxphotos 0.56.1 documentation</div></a>
|
||||
<a href="#"><div class="brand">osxphotos 0.56.5 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -147,7 +147,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="#">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.1 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.5 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
@@ -236,6 +236,7 @@
|
||||
<li class="toctree-l1"><a class="reference internal" href="cli.html">OSXPhotos Command Line Interface (CLI)</a><ul>
|
||||
<li class="toctree-l2"><a class="reference internal" href="cli.html#osxphotos">osxphotos</a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="cli.html#osxphotos-about">about</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="cli.html#osxphotos-add-locations">add-locations</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="cli.html#osxphotos-albums">albums</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="cli.html#osxphotos-diff">diff</a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="cli.html#osxphotos-docs">docs</a></li>
|
||||
@@ -571,6 +572,7 @@
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.PhotosDB.persons_as_dict"><code class="docutils literal notranslate"><span class="pre">PhotosDB.persons_as_dict</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.PhotosDB.photos"><code class="docutils literal notranslate"><span class="pre">PhotosDB.photos()</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.PhotosDB.photos_by_uuid"><code class="docutils literal notranslate"><span class="pre">PhotosDB.photos_by_uuid()</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.PhotosDB.photos_version"><code class="docutils literal notranslate"><span class="pre">PhotosDB.photos_version</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.PhotosDB.project_info"><code class="docutils literal notranslate"><span class="pre">PhotosDB.project_info</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.PhotosDB.query"><code class="docutils literal notranslate"><span class="pre">PhotosDB.query()</span></code></a></li>
|
||||
</ul>
|
||||
@@ -659,7 +661,10 @@
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.QueryOptions.year"><code class="docutils literal notranslate"><span class="pre">QueryOptions.year</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reference.html#osxphotos.ScoreInfo"><code class="docutils literal notranslate"><span class="pre">ScoreInfo</span></code></a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reference.html#osxphotos.ScoreInfo"><code class="docutils literal notranslate"><span class="pre">ScoreInfo</span></code></a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.ScoreInfo.asdict"><code class="docutils literal notranslate"><span class="pre">ScoreInfo.asdict()</span></code></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="reference.html#osxphotos.SearchInfo"><code class="docutils literal notranslate"><span class="pre">SearchInfo</span></code></a><ul>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.SearchInfo.activities"><code class="docutils literal notranslate"><span class="pre">SearchInfo.activities</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.SearchInfo.all"><code class="docutils literal notranslate"><span class="pre">SearchInfo.all</span></code></a></li>
|
||||
@@ -677,9 +682,11 @@
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.SearchInfo.neighborhoods"><code class="docutils literal notranslate"><span class="pre">SearchInfo.neighborhoods</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.SearchInfo.place_names"><code class="docutils literal notranslate"><span class="pre">SearchInfo.place_names</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.SearchInfo.season"><code class="docutils literal notranslate"><span class="pre">SearchInfo.season</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.SearchInfo.source"><code class="docutils literal notranslate"><span class="pre">SearchInfo.source</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.SearchInfo.state"><code class="docutils literal notranslate"><span class="pre">SearchInfo.state</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.SearchInfo.state_abbreviation"><code class="docutils literal notranslate"><span class="pre">SearchInfo.state_abbreviation</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.SearchInfo.streets"><code class="docutils literal notranslate"><span class="pre">SearchInfo.streets</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.SearchInfo.text_found"><code class="docutils literal notranslate"><span class="pre">SearchInfo.text_found</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.SearchInfo.venue_types"><code class="docutils literal notranslate"><span class="pre">SearchInfo.venue_types</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.SearchInfo.venues"><code class="docutils literal notranslate"><span class="pre">SearchInfo.venues</span></code></a></li>
|
||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#osxphotos.SearchInfo.year"><code class="docutils literal notranslate"><span class="pre">SearchInfo.year</span></code></a></li>
|
||||
|
||||
BIN
docs/objects.inv
BIN
docs/objects.inv
Binary file not shown.
@@ -6,7 +6,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="OSXPhotos Tutorial" href="tutorial.html" /><link rel="prev" title="Welcome to OSXPhotos’s documentation!" href="index.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>OSXPhotos - osxphotos 0.56.1 documentation</title>
|
||||
<title>OSXPhotos - osxphotos 0.56.5 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||
@@ -124,7 +124,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">osxphotos 0.56.1 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">osxphotos 0.56.5 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -147,7 +147,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.1 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.5 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="OSXPhotos python API" href="reference.html" /><link rel="prev" title="OSXPhotos Template System" href="template_help.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>OSXPhotos Python Package Overview - osxphotos 0.56.1 documentation</title>
|
||||
<title>OSXPhotos Python Package Overview - osxphotos 0.56.5 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||
@@ -124,7 +124,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">osxphotos 0.56.1 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">osxphotos 0.56.5 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -147,7 +147,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.1 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.5 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/><title>Python Module Index - osxphotos 0.56.1 documentation</title>
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/><title>Python Module Index - osxphotos 0.56.5 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||
@@ -122,7 +122,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">osxphotos 0.56.1 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">osxphotos 0.56.5 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -145,7 +145,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.1 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.5 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -4,7 +4,7 @@
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="#" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/><title>Search - osxphotos 0.56.1 documentation</title><link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/><title>Search - osxphotos 0.56.5 documentation</title><link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
|
||||
@@ -121,7 +121,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">osxphotos 0.56.1 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">osxphotos 0.56.5 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -144,7 +144,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.1 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.5 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="#" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -6,7 +6,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="OSXPhotos Python Package Overview" href="package_overview.html" /><link rel="prev" title="OSXPhotos Command Line Interface (CLI)" href="cli.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>OSXPhotos Template System - osxphotos 0.56.1 documentation</title>
|
||||
<title>OSXPhotos Template System - osxphotos 0.56.5 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||
@@ -124,7 +124,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">osxphotos 0.56.1 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">osxphotos 0.56.5 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -147,7 +147,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.1 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.5 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
@@ -608,7 +608,7 @@
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="row-even"><td><p>{osxphotos_version}</p></td>
|
||||
<td><p>The osxphotos version, e.g. ‘0.56.1’</p></td>
|
||||
<td><p>The osxphotos version, e.g. ‘0.56.5’</p></td>
|
||||
</tr>
|
||||
<tr class="row-odd"><td><p>{osxphotos_cmd_line}</p></td>
|
||||
<td><p>The full command line used to run osxphotos</p></td>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="OSXPhotos Command Line Interface (CLI)" href="cli.html" /><link rel="prev" title="OSXPhotos" href="overview.html" />
|
||||
|
||||
<meta name="generator" content="sphinx-5.3.0, furo 2022.09.29"/>
|
||||
<title>OSXPhotos Tutorial - osxphotos 0.56.1 documentation</title>
|
||||
<title>OSXPhotos Tutorial - osxphotos 0.56.5 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||
@@ -124,7 +124,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">osxphotos 0.56.1 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">osxphotos 0.56.5 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -147,7 +147,7 @@
|
||||
<div class="sidebar-sticky"><a class="sidebar-brand" href="index.html">
|
||||
|
||||
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.1 documentation</span>
|
||||
<span class="sidebar-brand-text">osxphotos 0.56.5 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||
|
||||
@@ -357,7 +357,7 @@ Template Substitutions
|
||||
* - {tab}
|
||||
- :A tab: '\t'
|
||||
* - {osxphotos_version}
|
||||
- The osxphotos version, e.g. '0.56.1'
|
||||
- The osxphotos version, e.g. '0.56.5'
|
||||
* - {osxphotos_cmd_line}
|
||||
- The full command line used to run osxphotos
|
||||
* - {album}
|
||||
|
||||
@@ -3,9 +3,15 @@
|
||||
import typing as t
|
||||
import photoscript
|
||||
import pathlib
|
||||
from osxphotos.cli.import_cli import ReportRecord
|
||||
|
||||
|
||||
def post_function(
|
||||
photo: photoscript.Photo, filepath: pathlib.Path, verbose: t.Callable, **kwargs
|
||||
photo: photoscript.Photo,
|
||||
filepath: pathlib.Path,
|
||||
verbose: t.Callable,
|
||||
report_record: ReportRecord,
|
||||
**kwargs,
|
||||
):
|
||||
"""Call this with osxphotos import /file/to/import --post-function post_function.py::post_function
|
||||
This will get called immediately after the photo has been imported into Photos
|
||||
@@ -15,6 +21,7 @@ def post_function(
|
||||
photo: photoscript.Photo instance for the photo that's just been imported
|
||||
filepath: pathlib.Path to the file that was imported (this is the path to the source file, not the path inside the Photos library)
|
||||
verbose: A function to print verbose output if --verbose is set; if --verbose is not set, acts as a no-op (nothing gets printed)
|
||||
report_record: ReportRecord instance for the photo that's just been imported; update this if you want to change the report output
|
||||
**kwargs: reserved for future use; recommend you include **kwargs so your function still works if additional arguments are added in future versions
|
||||
|
||||
Notes:
|
||||
@@ -25,4 +32,16 @@ def post_function(
|
||||
|
||||
# add a note to the photo's description
|
||||
verbose("Adding note to description")
|
||||
photo.description = f"{photo.description} (imported with osxphotos)"
|
||||
description = photo.description
|
||||
description = (
|
||||
f"{description} (imported with osxphotos)"
|
||||
if description
|
||||
else "(imported with osxphotos)"
|
||||
)
|
||||
|
||||
# update report_record if you modify the photo and want the report to reflect the change
|
||||
# the report_record object passed to the function is mutable so you can update it directly
|
||||
report_record.description = description
|
||||
|
||||
# update the photo's description via the Photo object
|
||||
photo.description = description
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
"""
|
||||
Constants used by osxphotos
|
||||
"""
|
||||
""" Constants used by osxphotos """
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import os.path
|
||||
from datetime import datetime
|
||||
@@ -138,7 +138,9 @@ _PHOTOS_5_SHARED_PHOTO_PATH = "resources/cloudsharing/data"
|
||||
_PHOTOS_8_SHARED_PHOTO_PATH = "scopes/cloudsharing/data"
|
||||
|
||||
# Where are shared iCloud derivatives located?
|
||||
_PHOTOS_5_SHARED_DERIVATIVE_PATH = "resources/cloudsharing/resources/derivatives/masters"
|
||||
_PHOTOS_5_SHARED_DERIVATIVE_PATH = (
|
||||
"resources/cloudsharing/resources/derivatives/masters"
|
||||
)
|
||||
_PHOTOS_8_SHARED_DERIVATIVE_PATH = "scopes/cloudsharing/resources/derivatives/masters"
|
||||
|
||||
# What type of file? Based on ZGENERICASSET.ZKIND in Photos 5 database
|
||||
@@ -213,11 +215,11 @@ class SearchCategory:
|
||||
TITLE = 2017
|
||||
DESCRIPTION = 2018
|
||||
HOME = 2020
|
||||
WORK = 2036
|
||||
PERSON = 2021
|
||||
ACTIVITY = 2027
|
||||
HOLIDAY = 2029
|
||||
SEASON = 2030
|
||||
WORK = 2036
|
||||
VENUE = 2038
|
||||
VENUE_TYPE = 2039
|
||||
PHOTO_TYPE_VIDEO = 2044
|
||||
@@ -230,6 +232,7 @@ class SearchCategory:
|
||||
PHOTO_TYPE_PORTRAIT = 2053
|
||||
PHOTO_TYPE_SELFIES = 2054
|
||||
PHOTO_TYPE_FAVORITES = 2055
|
||||
PHOTO_TYPE_ANIMATED = None # Photos 8+ only
|
||||
MEDIA_TYPES = [
|
||||
PHOTO_TYPE_VIDEO,
|
||||
PHOTO_TYPE_SLOMO,
|
||||
@@ -244,7 +247,23 @@ class SearchCategory:
|
||||
]
|
||||
PHOTO_NAME = 2056
|
||||
CAMERA = None # Photos 8+ only
|
||||
TEXT_FOUND = None # Photos 8+ only
|
||||
DETECTED_TEXT = None # Photos 8+ only
|
||||
SOURCE = None # Photos 8+ only
|
||||
|
||||
@classmethod
|
||||
def categories(cls) -> dict[int, str]:
|
||||
"""Return categories as dict of value: name"""
|
||||
# a bit of a hack to basically reverse the enum
|
||||
return {
|
||||
value: name
|
||||
for name, value in cls.__dict__.items()
|
||||
if name is not None
|
||||
and not name.startswith("__")
|
||||
and not callable(name)
|
||||
and name.isupper()
|
||||
and not isinstance(value, (list, dict, tuple))
|
||||
}
|
||||
|
||||
|
||||
class SearchCategory_Photos8(SearchCategory):
|
||||
@@ -252,6 +271,20 @@ class SearchCategory_Photos8(SearchCategory):
|
||||
|
||||
# Many of the category values changed in Ventura / Photos 8
|
||||
# and some new categories were added
|
||||
CITY = 5
|
||||
LOCALITY_4 = 4
|
||||
SUB_LOCALITY_5 = None
|
||||
SUB_LOCALITY_6 = 6
|
||||
LOCALITY_8 = 8
|
||||
NAMED_AREA = 7
|
||||
ALL_LOCALITY = [
|
||||
LOCALITY_4,
|
||||
SUB_LOCALITY_6,
|
||||
LOCALITY_8,
|
||||
NAMED_AREA,
|
||||
]
|
||||
HOME = 1000
|
||||
WORK = 1001
|
||||
LABEL = 1500
|
||||
MONTH = 1100
|
||||
YEAR = 1101
|
||||
@@ -261,11 +294,55 @@ class SearchCategory_Photos8(SearchCategory):
|
||||
TITLE = 1201
|
||||
DESCRIPTION = 1202
|
||||
DETECTED_TEXT = 1203 # new in Photos 8
|
||||
TEXT_FOUND = 1205 # new in Photos 8
|
||||
PERSON = 1300
|
||||
ACTIVITY = 1600
|
||||
VENUE = 1700
|
||||
VENUE_TYPE = 1701
|
||||
PHOTO_TYPE_VIDEO = 1901
|
||||
PHOTO_TYPE_SELFIES = 1915
|
||||
PHOTO_TYPE_LIVE = 1906
|
||||
PHOTO_TYPE_PORTRAIT = 1914
|
||||
PHOTO_TYPE_FAVORITES = 2000
|
||||
PHOTO_TYPE_PANORAMA = 1908
|
||||
PHOTO_TYPE_TIMELAPSE = 1909
|
||||
PHOTO_TYPE_SLOMO = 1905
|
||||
PHOTO_TYPE_BURSTS = 1913
|
||||
PHOTO_TYPE_SCREENSHOT = 1907
|
||||
PHOTO_TYPE_ANIMATED = 1912
|
||||
PHOTO_TYPE_RAW = 1902
|
||||
MEDIA_TYPES = [
|
||||
PHOTO_TYPE_VIDEO,
|
||||
PHOTO_TYPE_SLOMO,
|
||||
PHOTO_TYPE_LIVE,
|
||||
PHOTO_TYPE_SCREENSHOT,
|
||||
PHOTO_TYPE_PANORAMA,
|
||||
PHOTO_TYPE_TIMELAPSE,
|
||||
PHOTO_TYPE_BURSTS,
|
||||
PHOTO_TYPE_PORTRAIT,
|
||||
PHOTO_TYPE_SELFIES,
|
||||
PHOTO_TYPE_FAVORITES,
|
||||
PHOTO_TYPE_ANIMATED,
|
||||
]
|
||||
PHOTO_NAME = 2100
|
||||
CAMERA = 2300 # new in Photos 8
|
||||
SOURCE = 2200 # new in Photos 8, shows the app/software source for the photo, e.g. Messages, Safari, etc.
|
||||
|
||||
@classmethod
|
||||
def categories(cls) -> dict[int, str]:
|
||||
"""Return categories as dict of value: name"""
|
||||
# need to get the categories from the base class and update with the new values
|
||||
classdict = SearchCategory.__dict__.copy()
|
||||
classdict |= cls.__dict__.copy()
|
||||
return {
|
||||
value: name
|
||||
for name, value in classdict.items()
|
||||
if name is not None
|
||||
and not name.startswith("__")
|
||||
and not callable(name)
|
||||
and name.isupper()
|
||||
and not isinstance(value, (list, dict, tuple))
|
||||
}
|
||||
|
||||
|
||||
def search_category_factory(version: int) -> SearchCategory:
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
""" version info """
|
||||
|
||||
__version__ = "0.56.1"
|
||||
__version__ = "0.56.5"
|
||||
|
||||
@@ -44,6 +44,7 @@ if args.get("--debug", False):
|
||||
print("Debugging enabled", file=sys.stderr)
|
||||
|
||||
from .about import about
|
||||
from .add_locations import add_locations
|
||||
from .albums import albums
|
||||
from .cli import cli_main
|
||||
from .common import get_photos_db, load_uuid_from_file
|
||||
@@ -73,6 +74,7 @@ install_traceback()
|
||||
|
||||
__all__ = [
|
||||
"about",
|
||||
"add_locations",
|
||||
"albums",
|
||||
"cli_main",
|
||||
"debug_dump",
|
||||
|
||||
190
osxphotos/cli/add_locations.py
Normal file
190
osxphotos/cli/add_locations.py
Normal file
@@ -0,0 +1,190 @@
|
||||
"""Add missing location data to photos in Photos.app using nearest neighbor."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import datetime
|
||||
|
||||
import click
|
||||
import photoscript
|
||||
|
||||
import osxphotos
|
||||
from osxphotos.utils import pluralize
|
||||
|
||||
from .click_rich_echo import (
|
||||
rich_click_echo,
|
||||
rich_echo_error,
|
||||
set_rich_console,
|
||||
set_rich_theme,
|
||||
set_rich_timestamp,
|
||||
)
|
||||
from .color_themes import get_theme
|
||||
from .common import QUERY_OPTIONS, THEME_OPTION, query_options_from_kwargs
|
||||
from .param_types import TimeOffset
|
||||
from .rich_progress import rich_progress
|
||||
from .verbose import get_verbose_console, verbose_print
|
||||
|
||||
|
||||
def get_location(
|
||||
photos: list[osxphotos.PhotoInfo], idx: int, window: datetime.timedelta
|
||||
) -> osxphotos.PhotoInfo | None:
|
||||
"""Find nearest neighbor with location data within window of time.
|
||||
|
||||
Args:
|
||||
photo: PhotoInfo object
|
||||
idx: index of photo in list of photos
|
||||
window: window of time to search for nearest neighbor
|
||||
|
||||
Returns:
|
||||
nearest neighbor PhotoInfo object or None if no neighbor found
|
||||
"""
|
||||
idx_back = None
|
||||
idx_forward = None
|
||||
if idx > 0:
|
||||
# search backwards in time
|
||||
for i in range(idx - 1, -1, -1):
|
||||
if (
|
||||
photos[idx].date - photos[i].date <= window
|
||||
and None not in photos[i].location
|
||||
):
|
||||
idx_back = i
|
||||
break
|
||||
|
||||
if idx < len(photos) - 1:
|
||||
# search forwards in time
|
||||
for i in range(idx + 1, len(photos)):
|
||||
if (
|
||||
photos[i].date - photos[idx].date <= window
|
||||
and None not in photos[i].location
|
||||
):
|
||||
idx_forward = i
|
||||
break
|
||||
|
||||
if idx_back is not None and idx_forward is not None:
|
||||
# found location in both directions
|
||||
# use location closest in time
|
||||
if (
|
||||
photos[idx].date - photos[idx_back].date
|
||||
< photos[idx_forward].date - photos[idx].date
|
||||
):
|
||||
return photos[idx_back]
|
||||
else:
|
||||
return photos[idx_forward]
|
||||
elif idx_back is not None:
|
||||
return photos[idx_back]
|
||||
elif idx_forward is not None:
|
||||
return photos[idx_forward]
|
||||
else:
|
||||
return None
|
||||
|
||||
|
||||
@click.command(name="add-locations")
|
||||
@click.option(
|
||||
"--window",
|
||||
"-w",
|
||||
type=TimeOffset(),
|
||||
default="1 hr",
|
||||
help="Window of time to search for nearest neighbor; "
|
||||
"searches +/- window of time. Default is 1 hour. "
|
||||
"Format is one of 'HH:MM:SS', 'D days', 'H hours' (or hr), 'M minutes' (or min), "
|
||||
"'S seconds' (or sec), 'S' (where S is seconds).",
|
||||
)
|
||||
@click.option(
|
||||
"--dry-run",
|
||||
is_flag=True,
|
||||
help="Don't actually add location, just print what would be done. "
|
||||
"Most useful with --verbose.",
|
||||
)
|
||||
@click.option("--verbose", "-V", "verbose_", is_flag=True, help="Print verbose output.")
|
||||
@click.option(
|
||||
"--timestamp", "-T", is_flag=True, help="Add time stamp to verbose output."
|
||||
)
|
||||
@QUERY_OPTIONS
|
||||
@THEME_OPTION
|
||||
@click.pass_obj
|
||||
@click.pass_context
|
||||
def add_locations(ctx, cli_ob, window, dry_run, verbose_, timestamp, theme, **kwargs):
|
||||
"""Add missing location data to photos in Photos.app using nearest neighbor.
|
||||
|
||||
This command will search for photos that are missing location data and look
|
||||
for the nearest neighbor photo within a given window of time that contains
|
||||
location information. If a photo is found within the window of time, the
|
||||
location of the nearest neighbor will be used to update the location of the
|
||||
photo.
|
||||
|
||||
For example, if you took pictures with your iPhone and also with a camera that
|
||||
doesn't have location information, you can use this command to add location
|
||||
information to the photos taken with the camera from those taken with the
|
||||
iPhone.
|
||||
|
||||
If you have many photos with missing location information but no nearest neighbor
|
||||
within the window of time, you could add location information to some photos manually
|
||||
then run this command again to add location information to the remaining photos.
|
||||
|
||||
You can specify a subset of photos to update using the query options. For example,
|
||||
`--selected` to update only the selected photos, `--added-after 2020-01-01` to update
|
||||
only photos added after Jan 1, 2020, etc.
|
||||
|
||||
Example:
|
||||
|
||||
Add location data to all photos with missing location data within a ±2 hour window:
|
||||
|
||||
`osxphotos add-locations --window "2 hr" --verbose`
|
||||
|
||||
The add-locations command assumes that photos already have the correct date and time.
|
||||
If you have photos that are missing both location data and date/time information,
|
||||
you can use `osxphotos timewarp` to add date/time information to the photos and then
|
||||
use `osxphotos add-locations` to add location information.
|
||||
See `osxphotos help timewarp` for more information.
|
||||
"""
|
||||
color_theme = get_theme(theme)
|
||||
verbose = verbose_print(
|
||||
verbose_, timestamp, rich=True, theme=color_theme, highlight=False
|
||||
)
|
||||
# set console for rich_echo to be same as for verbose_
|
||||
set_rich_console(get_verbose_console())
|
||||
set_rich_theme(color_theme)
|
||||
set_rich_timestamp(timestamp)
|
||||
|
||||
verbose("Searching for photos with missing location data...")
|
||||
|
||||
# load photos database
|
||||
photosdb = osxphotos.PhotosDB(verbose=verbose)
|
||||
query_options = query_options_from_kwargs(**kwargs)
|
||||
photos = photosdb.query(query_options)
|
||||
|
||||
# sort photos by date
|
||||
photos = sorted(photos, key=lambda p: p.date)
|
||||
|
||||
num_photos = len(photos)
|
||||
missing_location = 0
|
||||
found_location = 0
|
||||
verbose(f"Processing {len(photos)} photos, window = ±{window}...")
|
||||
with rich_progress(console=get_verbose_console(), mock=verbose_) as progress:
|
||||
task = progress.add_task(
|
||||
f"Processing [num]{num_photos}[/] {pluralize(len(photos), 'photo', 'photos')}, window = ±{window}",
|
||||
total=num_photos,
|
||||
)
|
||||
for idx, photo in enumerate(photos):
|
||||
if None in photo.location:
|
||||
missing_location += 1
|
||||
verbose(
|
||||
f"Processing [filename]{photo.original_filename}[/] ([uuid]{photo.uuid}[/])"
|
||||
)
|
||||
if neighbor := get_location(photos, idx, window):
|
||||
verbose(
|
||||
f"Adding location {neighbor.location} to [filename]{photo.original_filename}[/] ([uuid]{photo.uuid}[/])"
|
||||
f" from [filename]{neighbor.original_filename}[/] ([uuid]{neighbor.uuid}[/])"
|
||||
)
|
||||
found_location += 1
|
||||
if not dry_run:
|
||||
photoscript.Photo(photo.uuid).location = neighbor.location
|
||||
else:
|
||||
verbose(
|
||||
f"No location found for [filename]{photo.original_filename}[/] ([uuid]{photo.uuid}[/])"
|
||||
)
|
||||
progress.advance(task)
|
||||
rich_click_echo(
|
||||
f"Done. Processed: [num]{num_photos}[/] photos, "
|
||||
f"missing location: [num]{missing_location}[/], "
|
||||
f"found location: [num]{found_location}[/] "
|
||||
)
|
||||
@@ -11,6 +11,7 @@ from osxphotos._constants import PROFILE_SORT_KEYS
|
||||
from osxphotos._version import __version__
|
||||
|
||||
from .about import about
|
||||
from .add_locations import add_locations
|
||||
from .albums import albums
|
||||
from .common import DB_OPTION, JSON_OPTION, OSXPHOTOS_HIDDEN
|
||||
from .debug_dump import debug_dump
|
||||
@@ -105,6 +106,7 @@ def cli_main(ctx, db, json_, profile, profile_sort, **kwargs):
|
||||
# install CLI commands
|
||||
for command in [
|
||||
about,
|
||||
add_locations,
|
||||
albums,
|
||||
debug_dump,
|
||||
diff,
|
||||
|
||||
@@ -272,7 +272,7 @@ def QUERY_OPTIONS(f):
|
||||
"--label",
|
||||
metavar="LABEL",
|
||||
multiple=True,
|
||||
help="Search for photos with image classification label LABEL (Photos 5 only). "
|
||||
help="Search for photos with image classification label LABEL (Photos 5+ only). "
|
||||
'If more than one label, treated as "OR", e.g. find photos matching any label',
|
||||
),
|
||||
o(
|
||||
@@ -305,12 +305,12 @@ def QUERY_OPTIONS(f):
|
||||
o(
|
||||
"--shared",
|
||||
is_flag=True,
|
||||
help="Search for photos in shared iCloud album (Photos 5 only).",
|
||||
help="Search for photos in shared iCloud album (Photos 5+ only).",
|
||||
),
|
||||
o(
|
||||
"--not-shared",
|
||||
is_flag=True,
|
||||
help="Search for photos not in shared iCloud album (Photos 5 only).",
|
||||
help="Search for photos not in shared iCloud album (Photos 5+ only).",
|
||||
),
|
||||
o(
|
||||
"--burst",
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
"""import command for osxphotos CLI to import photos into Photos"""
|
||||
|
||||
# Note: the style in this module is a bit different than much of the other osxphotos code
|
||||
# As an experiment, I've used mostly functions instead of classes (e.g. the report writer
|
||||
# functions vs ReportWriter class used by export) and I've kept everything for import
|
||||
# self-contained in this one file
|
||||
from __future__ import annotations
|
||||
|
||||
import csv
|
||||
import datetime
|
||||
@@ -59,6 +56,12 @@ from .common import THEME_OPTION
|
||||
from .rich_progress import rich_progress
|
||||
from .verbose import get_verbose_console, verbose_print
|
||||
|
||||
# Note: the style in this module is a bit different than much of the other osxphotos code
|
||||
# As an experiment, I've used mostly functions instead of classes (e.g. the report writer
|
||||
# functions vs ReportWriter class used by export) and I've kept everything for import
|
||||
# self-contained in this one file
|
||||
|
||||
|
||||
MetaData = namedtuple("MetaData", ["title", "description", "keywords", "location"])
|
||||
|
||||
OSXPHOTOS_ABOUT_STRING = f"Created by osxphotos version {__version__} (https://github.com/RhetTbull/osxphotos) on {datetime.datetime.now()}"
|
||||
@@ -165,7 +168,8 @@ def import_photo(
|
||||
Args:
|
||||
filepath: path to the file to import
|
||||
dup_check: enable or disable Photo's duplicate check on import
|
||||
verbose: Callable"""
|
||||
verbose: Callable
|
||||
"""
|
||||
if imported := PhotosLibrary().import_photos(
|
||||
[filepath], skip_duplicate_check=not dup_check
|
||||
):
|
||||
@@ -207,7 +211,7 @@ def add_photo_to_albums(
|
||||
split_folder: str,
|
||||
exiftool_path: Path,
|
||||
verbose: Callable[..., None],
|
||||
):
|
||||
) -> list[str]:
|
||||
"""Add photo to one or more albums"""
|
||||
albums = []
|
||||
for a in album:
|
||||
@@ -225,6 +229,7 @@ def add_photo_to_albums(
|
||||
a, verbose=verbose, split_folder=split_folder, rich=True
|
||||
)
|
||||
photos_album.add(photo)
|
||||
return albums
|
||||
|
||||
|
||||
def clear_photo_metadata(photo: Photo, filepath: Path, verbose: Callable[..., None]):
|
||||
@@ -319,6 +324,8 @@ def location_from_file(
|
||||
latitude = -latitude
|
||||
elif latitude_ref != "N":
|
||||
latitude = None
|
||||
if latitude is None:
|
||||
latitude = metadata.get("XMP:GPSLatitude")
|
||||
if longitude := metadata.get("EXIF:GPSLongitude"):
|
||||
longitude = float(longitude)
|
||||
longitude_ref = metadata.get("EXIF:GPSLongitudeRef")
|
||||
@@ -326,6 +333,8 @@ def location_from_file(
|
||||
longitude = -longitude
|
||||
elif longitude_ref != "E":
|
||||
longitude = None
|
||||
if longitude is None:
|
||||
longitude = metadata.get("XMP:GPSLongitude")
|
||||
if latitude is None or longitude is None:
|
||||
# maybe it's a video
|
||||
if lat_lon := metadata.get("QuickTime:GPSCoordinates") or metadata.get(
|
||||
@@ -344,7 +353,11 @@ def location_from_file(
|
||||
return latitude, longitude
|
||||
|
||||
|
||||
def set_photo_metadata(photo: Photo, metadata: MetaData, merge_keywords: bool):
|
||||
def set_photo_metadata(
|
||||
photo: Photo,
|
||||
metadata: MetaData,
|
||||
merge_keywords: bool,
|
||||
) -> MetaData:
|
||||
"""Set metadata (title, description, keywords) for a Photo object"""
|
||||
photo.title = metadata.title
|
||||
photo.description = metadata.description
|
||||
@@ -354,6 +367,7 @@ def set_photo_metadata(photo: Photo, metadata: MetaData, merge_keywords: bool):
|
||||
keywords.extend(old_keywords)
|
||||
keywords = list(set(keywords))
|
||||
photo.keywords = keywords
|
||||
return MetaData(metadata.title, metadata.description, keywords, metadata.location)
|
||||
|
||||
|
||||
def set_photo_metadata_from_exiftool(
|
||||
@@ -362,12 +376,12 @@ def set_photo_metadata_from_exiftool(
|
||||
exiftool_path: str,
|
||||
merge_keywords: bool,
|
||||
verbose: Callable[..., None],
|
||||
):
|
||||
) -> MetaData:
|
||||
"""Set photo's metadata by reading metadata form file with exiftool"""
|
||||
verbose(f"Setting metadata and location from EXIF for [filename]{filepath.name}[/]")
|
||||
metadata = metadata_from_file(filepath, exiftool_path)
|
||||
if any([metadata.title, metadata.description, metadata.keywords]):
|
||||
set_photo_metadata(photo, metadata, merge_keywords)
|
||||
metadata = set_photo_metadata(photo, metadata, merge_keywords)
|
||||
verbose(f"Set metadata for [filename]{filepath.name}[/]:")
|
||||
verbose(
|
||||
f"title='{metadata.title}', description='{metadata.description}', keywords={metadata.keywords}"
|
||||
@@ -383,6 +397,7 @@ def set_photo_metadata_from_exiftool(
|
||||
)
|
||||
else:
|
||||
verbose(f"No location to set for [filename]{filepath.name}[/]")
|
||||
return metadata
|
||||
|
||||
|
||||
def set_photo_title(
|
||||
@@ -392,7 +407,7 @@ def set_photo_title(
|
||||
title_template: str,
|
||||
exiftool_path: str,
|
||||
verbose: Callable[..., None],
|
||||
):
|
||||
) -> str:
|
||||
"""Set title of photo"""
|
||||
title_text = render_photo_template(
|
||||
filepath, relative_filepath, title_template, exiftool_path
|
||||
@@ -408,6 +423,9 @@ def set_photo_title(
|
||||
f"Setting title of photo [filename]{filepath.name}[/] to '{title_text[0]}'"
|
||||
)
|
||||
photo.title = title_text[0]
|
||||
return title_text[0]
|
||||
else:
|
||||
return ""
|
||||
|
||||
|
||||
def set_photo_description(
|
||||
@@ -417,7 +435,7 @@ def set_photo_description(
|
||||
description_template: str,
|
||||
exiftool_path: str,
|
||||
verbose: Callable[..., None],
|
||||
):
|
||||
) -> str:
|
||||
"""Set description of photo"""
|
||||
description_text = render_photo_template(
|
||||
filepath, relative_filepath, description_template, exiftool_path
|
||||
@@ -433,6 +451,9 @@ def set_photo_description(
|
||||
f"Setting description of photo [filename]{filepath.name}[/] to '{description_text[0]}'"
|
||||
)
|
||||
photo.description = description_text[0]
|
||||
return description_text[0]
|
||||
else:
|
||||
return ""
|
||||
|
||||
|
||||
def set_photo_keywords(
|
||||
@@ -443,7 +464,7 @@ def set_photo_keywords(
|
||||
exiftool_path: str,
|
||||
merge: bool,
|
||||
verbose: Callable[..., None],
|
||||
):
|
||||
) -> list[str]:
|
||||
"""Set keywords of photo"""
|
||||
keywords = []
|
||||
for keyword in keyword_template:
|
||||
@@ -456,6 +477,7 @@ def set_photo_keywords(
|
||||
keywords = list(set(keywords))
|
||||
verbose(f"Setting keywords of photo [filename]{filepath.name}[/] to {keywords}")
|
||||
photo.keywords = keywords
|
||||
return keywords
|
||||
|
||||
|
||||
def set_photo_location(
|
||||
@@ -463,17 +485,18 @@ def set_photo_location(
|
||||
filepath: Path,
|
||||
location: Tuple[float, float],
|
||||
verbose: Callable[..., None],
|
||||
):
|
||||
) -> tuple[float, float]:
|
||||
"""Set location of photo"""
|
||||
verbose(
|
||||
f"Setting location of photo [filename]{filepath.name}[/] to {location[0]}, {location[1]}"
|
||||
)
|
||||
photo.location = location
|
||||
return location
|
||||
|
||||
|
||||
def set_photo_date_from_filename(
|
||||
photo: Photo, filepath: Path, parse_date: str, verbose: Callable[..., None]
|
||||
):
|
||||
) -> datetime.datetime | None:
|
||||
"""Set date of photo from filename"""
|
||||
# TODO: handle timezone (use code from timewarp), for now convert timezone to local timezone
|
||||
try:
|
||||
@@ -491,11 +514,12 @@ def set_photo_date_from_filename(
|
||||
verbose(
|
||||
f"[warning]Could not parse date from filename [filename]{filepath.name}[/][/]"
|
||||
)
|
||||
return
|
||||
return None
|
||||
verbose(
|
||||
f"Setting date of photo [filename]{filepath.name}[/] to [time]{date.strftime('%Y-%m-%d %H:%M:%S')}[/]"
|
||||
)
|
||||
photo.date = date
|
||||
return date
|
||||
|
||||
|
||||
def get_relative_filepath(filepath: Path, relative_to: Optional[str]) -> Path:
|
||||
@@ -588,6 +612,8 @@ def check_templates_and_exit(
|
||||
|
||||
@dataclass
|
||||
class ReportRecord:
|
||||
"""Dataclass that records metadata on each file imported for writing to report"""
|
||||
|
||||
albums: List[str] = field(default_factory=list)
|
||||
description: str = ""
|
||||
error: bool = False
|
||||
@@ -615,6 +641,13 @@ class ReportRecord:
|
||||
)
|
||||
return cls(**dict_data)
|
||||
|
||||
def update_from_metadata(self, metadata: MetaData):
|
||||
"""Update a ReportRecord with data from a MetaData"""
|
||||
self.title = metadata.title
|
||||
self.description = metadata.description
|
||||
self.keywords = metadata.keywords
|
||||
self.location = metadata.location
|
||||
|
||||
def asdict(self):
|
||||
return asdict(self)
|
||||
|
||||
@@ -628,15 +661,15 @@ class ReportRecord:
|
||||
|
||||
def update_report_record(report_record: ReportRecord, photo: Photo, filepath: Path):
|
||||
"""Update a ReportRecord with data from a Photo"""
|
||||
report_record.albums = [a.title for a in photo.albums]
|
||||
report_record.description = photo.description
|
||||
|
||||
# do not update albums as they are added to the report record as they are imported (#934)
|
||||
report_record.filename = filepath.name
|
||||
report_record.filepath = filepath
|
||||
report_record.imported = True
|
||||
report_record.uuid = photo.uuid
|
||||
report_record.title = photo.title
|
||||
report_record.description = photo.description
|
||||
report_record.keywords = photo.keywords
|
||||
report_record.location = photo.location
|
||||
report_record.title = photo.title
|
||||
report_record.uuid = photo.uuid
|
||||
|
||||
return report_record
|
||||
|
||||
@@ -1473,11 +1506,13 @@ def import_cli(
|
||||
report_data[filepath] = ReportRecord(
|
||||
filepath=filepath, filename=filepath.name
|
||||
)
|
||||
report_record = report_data[filepath]
|
||||
photo, error = import_photo(filepath, dup_check, verbose)
|
||||
if error:
|
||||
error_count += 1
|
||||
report_data[filepath].error = True
|
||||
report_record.error = True
|
||||
continue
|
||||
report_record.imported = True
|
||||
imported_count += 1
|
||||
|
||||
if clear_metadata:
|
||||
@@ -1488,12 +1523,21 @@ def import_cli(
|
||||
|
||||
if exiftool:
|
||||
set_photo_metadata_from_exiftool(
|
||||
photo, filepath, exiftool_path, merge_keywords, verbose
|
||||
photo,
|
||||
filepath,
|
||||
exiftool_path,
|
||||
merge_keywords,
|
||||
verbose,
|
||||
)
|
||||
|
||||
if title:
|
||||
set_photo_title(
|
||||
photo, filepath, relative_filepath, title, exiftool_path, verbose
|
||||
photo,
|
||||
filepath,
|
||||
relative_filepath,
|
||||
title,
|
||||
exiftool_path,
|
||||
verbose,
|
||||
)
|
||||
|
||||
if description:
|
||||
@@ -1522,9 +1566,10 @@ def import_cli(
|
||||
|
||||
if parse_date:
|
||||
set_photo_date_from_filename(photo, filepath, parse_date, verbose)
|
||||
# TODO: ReportRecord doesn't currently record date
|
||||
|
||||
if album:
|
||||
add_photo_to_albums(
|
||||
report_record.albums = add_photo_to_albums(
|
||||
photo,
|
||||
filepath,
|
||||
relative_filepath,
|
||||
@@ -1539,14 +1584,15 @@ def import_cli(
|
||||
# post function is tuple of (function, filename.py::function_name)
|
||||
verbose(f"Calling post-function [bold]{function[1]}")
|
||||
try:
|
||||
function[0](photo, filepath, verbose)
|
||||
function[0](photo, filepath, verbose, report_record)
|
||||
except Exception as e:
|
||||
rich_echo_error(
|
||||
f"[error]Error running post-function [italic]{function[1]}[/italic]: {e}"
|
||||
)
|
||||
|
||||
update_report_record(report_data[filepath], photo, filepath)
|
||||
import_db.set(str(filepath), report_data[filepath])
|
||||
# update report data
|
||||
update_report_record(report_record, photo, filepath)
|
||||
import_db.set(str(filepath), report_record)
|
||||
|
||||
progress.advance(task)
|
||||
|
||||
|
||||
@@ -1,13 +1,15 @@
|
||||
"""Inspect photos selected in Photos """
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import functools
|
||||
import pathlib
|
||||
import re
|
||||
from fractions import Fraction
|
||||
from multiprocessing import Process, Queue
|
||||
from queue import Empty
|
||||
from time import gmtime, sleep, strftime
|
||||
from typing import List, Optional, Tuple
|
||||
import pathlib
|
||||
from typing import Generator, List, Optional, Tuple
|
||||
|
||||
import bitmath
|
||||
import click
|
||||
@@ -19,7 +21,7 @@ from rich.live import Live
|
||||
from rich.panel import Panel
|
||||
|
||||
from osxphotos import PhotoInfo, PhotosDB
|
||||
from osxphotos._constants import _UNKNOWN_PERSON
|
||||
from osxphotos._constants import _UNKNOWN_PERSON, search_category_factory
|
||||
from osxphotos.rich_utils import add_rich_markup_tag
|
||||
from osxphotos.text_detection import detect_text as detect_text_in_photo
|
||||
from osxphotos.utils import dd_to_dms_str
|
||||
@@ -35,6 +37,17 @@ bold = add_rich_markup_tag("bold")
|
||||
dim = add_rich_markup_tag("dim")
|
||||
|
||||
|
||||
def add_cyclic_color_tag(values: list[str]) -> Generator[str, None, None]:
|
||||
"""Add a rich markup tag to each str in values, cycling through a set of colors"""
|
||||
# reuse some colors already in the theme
|
||||
# these are chosen for contrast to easily associate scores and values
|
||||
colors = ["change", "count", "filepath", "filename"]
|
||||
color_tags = [add_rich_markup_tag(color) for color in colors]
|
||||
modidx = len(color_tags)
|
||||
for idx, val in enumerate(values):
|
||||
yield color_tags[idx % modidx](val)
|
||||
|
||||
|
||||
def extract_uuid(text: str) -> str:
|
||||
"""Extract a UUID from a string"""
|
||||
if match := re.search(
|
||||
@@ -52,6 +65,22 @@ def trim(text: str, pad: str = "") -> str:
|
||||
return text if len(text) <= width else f"{text[: width- 3]}..."
|
||||
|
||||
|
||||
def format_search_info(photo: PhotoInfo) -> str:
|
||||
"""Format search info for photo"""
|
||||
categories = sorted(list(photo._db._db_searchinfo_categories.keys()))
|
||||
search_info = photo.search_info
|
||||
if not search_info:
|
||||
return ""
|
||||
search_info_strs = []
|
||||
category_dict = search_category_factory(photo._db.photos_version).categories()
|
||||
for category in categories:
|
||||
if text := search_info._get_text_for_category(category):
|
||||
text = ", ".join(t for t in text if t) if isinstance(text, list) else text
|
||||
category_name = str(category_dict.get(category, category)).lower()
|
||||
search_info_strs.append(f"{bold(category_name)}: {text}")
|
||||
return ", ".join(search_info_strs)
|
||||
|
||||
|
||||
def inspect_photo(
|
||||
photo: PhotoInfo,
|
||||
detected_text: Optional[str] = None,
|
||||
@@ -125,8 +154,10 @@ def inspect_photo(
|
||||
+ f"{', '.join(dd_to_dms_str(*photo.location)) if photo.location[0] else '-'}",
|
||||
bold("Place: ") + f"{photo.place.name if photo.place else '-'}",
|
||||
bold("Categories/Labels: ") + f"{', '.join(photo.labels) or '-'}",
|
||||
bold("Search Info: ") + format_search_info(photo),
|
||||
]
|
||||
)
|
||||
|
||||
properties.append(format_flags(photo))
|
||||
properties.append(format_albums(photo))
|
||||
|
||||
@@ -191,9 +222,15 @@ def format_templates(photo: PhotoInfo, templates: List[str]) -> str:
|
||||
|
||||
def format_score_info(photo: PhotoInfo) -> str:
|
||||
"""Format score_info"""
|
||||
score_str = bold("Score: ")
|
||||
score_str = bold("Scores: ")
|
||||
if photo.score:
|
||||
score_str += f"[num]{photo.score.overall}[/]" if photo.score else "-"
|
||||
# add color tags to each key: value pair to easily associate keys/values
|
||||
score_values = add_cyclic_color_tag(
|
||||
[f"{k}: {float(v):.2f}" for k, v in photo.score.asdict().items()]
|
||||
)
|
||||
score_str += ", ".join(score_values)
|
||||
else:
|
||||
score_str += "-"
|
||||
return score_str
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ from osxphotos.photoinfo import PhotoInfoNone
|
||||
from osxphotos.photosalbum import PhotosAlbum
|
||||
from osxphotos.photosdb.photosdb_utils import get_db_version
|
||||
from osxphotos.phototemplate import PhotoTemplate, RenderOptions
|
||||
from osxphotos.queryoptions import QueryOptions
|
||||
from osxphotos.sqlitekvstore import SQLiteKVStore
|
||||
from osxphotos.utils import pluralize
|
||||
|
||||
@@ -255,6 +256,7 @@ def import_metadata(
|
||||
set_: tuple[str, ...],
|
||||
merge: tuple[str, ...],
|
||||
dry_run: bool,
|
||||
unmatched: bool,
|
||||
verbose: Callable[..., None],
|
||||
) -> SyncResults:
|
||||
"""Import metadata from metadata_db"""
|
||||
@@ -278,7 +280,9 @@ def import_metadata(
|
||||
# create an in memory database of the import library
|
||||
# so that the rest of the comparison code can be the same
|
||||
photosdb = PhotosDB(import_path, verbose=verbose)
|
||||
photos = photosdb.photos()
|
||||
# filter out shared photos which don't have a fingerprint and
|
||||
# whose metadata can't be set
|
||||
photos = photosdb.query(QueryOptions(not_shared=True))
|
||||
import_db = SQLiteKVStore(":memory:")
|
||||
verbose(f"Loading metadata from import library: [filepath]{import_path}[/]")
|
||||
export_metadata_to_db(photos, import_db, progress=False)
|
||||
@@ -295,24 +299,25 @@ def import_metadata(
|
||||
if key in import_db:
|
||||
# import metadata from import_db
|
||||
for photo in key_photos:
|
||||
rich_click_echo(
|
||||
verbose(
|
||||
f"Importing metadata for [filename]{photo.original_filename}[/] ([uuid]{photo.uuid}[/])"
|
||||
)
|
||||
metadata = import_db[key]
|
||||
results += import_metadata_for_photo(
|
||||
photo, metadata, set_, merge, dry_run, verbose
|
||||
)
|
||||
else:
|
||||
elif unmatched:
|
||||
# unable to find metadata for photo in import_db
|
||||
for photo in key_photos:
|
||||
rich_click_echo(
|
||||
f"Unable to find metadata for [filename]{photo.original_filename}[/] ([uuid]{photo.uuid}[/]) in [filepath]{import_path}[/]"
|
||||
)
|
||||
|
||||
# find any keys in import_db that don't match keys in photos
|
||||
for key in import_db.keys():
|
||||
if key not in key_to_photo:
|
||||
rich_click_echo(f"Unable to find [uuid]{key}[/] in current library.")
|
||||
if unmatched:
|
||||
# find any keys in import_db that don't match keys in photos
|
||||
for key in import_db.keys():
|
||||
if key not in key_to_photo:
|
||||
rich_click_echo(f"Unable to find [uuid]{key}[/] in selected photos.")
|
||||
|
||||
return results
|
||||
|
||||
@@ -596,6 +601,14 @@ def print_import_summary(results: SyncResults):
|
||||
"See also --set.",
|
||||
type=SyncImportType(),
|
||||
)
|
||||
@click.option(
|
||||
"--unmatched",
|
||||
"-U",
|
||||
is_flag=True,
|
||||
help="When used with --import, print out a list of photos in the import source that "
|
||||
"were not matched against the local library. Also prints out a list of photos "
|
||||
"in the local library that were not matched against the import source. ",
|
||||
)
|
||||
@click.option(
|
||||
"--report",
|
||||
"-R",
|
||||
@@ -643,6 +656,7 @@ def sync(
|
||||
set_,
|
||||
theme,
|
||||
timestamp,
|
||||
unmatched,
|
||||
verbose_,
|
||||
**kwargs, # query options
|
||||
):
|
||||
@@ -710,6 +724,17 @@ def sync(
|
||||
rich_echo_error("--set and --merge can only be used with --import")
|
||||
ctx.exit(1)
|
||||
|
||||
# filter out photos in shared albums as these cannot be updated
|
||||
# Not elegant but works for now without completely refactoring QUERY_OPTIONS
|
||||
if kwargs.get("shared"):
|
||||
rich_echo_error(
|
||||
"[warning]--shared cannot be used with --import/--export "
|
||||
"as photos in shared iCloud albums cannot be updated; "
|
||||
"--shared will be ignored[/]"
|
||||
)
|
||||
kwargs["shared"] = False
|
||||
kwargs["not_shared"] = True
|
||||
|
||||
set_ = parse_set_merge(set_)
|
||||
merge = parse_set_merge(merge)
|
||||
|
||||
@@ -733,7 +758,9 @@ def sync(
|
||||
query_options = query_options_from_kwargs(**kwargs)
|
||||
photosdb = PhotosDB(dbfile=db, verbose=verbose)
|
||||
photos = photosdb.query(query_options)
|
||||
results = import_metadata(photos, import_path, set_, merge, dry_run, verbose)
|
||||
results = import_metadata(
|
||||
photos, import_path, set_, merge, dry_run, unmatched, verbose
|
||||
)
|
||||
if report:
|
||||
report_path = render_and_validate_report(report)
|
||||
verbose(f"Writing report to {report_path}")
|
||||
|
||||
Binary file not shown.
@@ -142,7 +142,7 @@ def _process_faceinfo_4(photosdb):
|
||||
face["facetype"] = row[26]
|
||||
face["quality"] = row[27]
|
||||
|
||||
# Photos 5 only
|
||||
# Photos 5+ only
|
||||
face["agetype"] = None
|
||||
face["eyemakeuptype"] = None
|
||||
face["eyestate"] = None
|
||||
|
||||
@@ -324,8 +324,15 @@ class PhotosDB:
|
||||
# _db_version is set from photos.db
|
||||
self._db_version = get_db_version(self._tmp_db)
|
||||
# _photos_version is set from Photos.sqlite which only exists for Photos 5+
|
||||
self._photos_ver = 4 if self._db_version == 4 else 5
|
||||
|
||||
db_ver_int = int(self._db_version)
|
||||
if db_ver_int < 3000:
|
||||
self._photos_ver = 2
|
||||
elif db_ver_int < 4000:
|
||||
self._photos_ver = 3
|
||||
elif db_ver_int < 5000:
|
||||
self._photos_ver = 4
|
||||
else:
|
||||
self._photos_ver = 5
|
||||
# If Photos >= 5, actual data isn't in photos.db but in Photos.sqlite
|
||||
if int(self._db_version) > int(_PHOTOS_4_VERSION):
|
||||
dbpath = pathlib.Path(self._dbfile).parent
|
||||
@@ -585,6 +592,11 @@ class PhotosDB:
|
||||
"""returns path to the Photos library PhotosDB was initialized with"""
|
||||
return self._library_path
|
||||
|
||||
@property
|
||||
def photos_version(self):
|
||||
"""returns version of Photos app that created the library"""
|
||||
return self._photos_ver
|
||||
|
||||
def get_db_connection(self):
|
||||
"""Get connection to the working copy of the Photos database
|
||||
|
||||
@@ -832,10 +844,10 @@ class PhotosDB:
|
||||
# for compatability with Photos 5 where album kind is ZKIND
|
||||
"kind": album[7],
|
||||
"creation_date": album[8],
|
||||
"start_date": None, # Photos 5 only
|
||||
"end_date": None, # Photos 5 only
|
||||
"customsortascending": None, # Photos 5 only
|
||||
"customsortkey": None, # Photos 5 only
|
||||
"start_date": None, # Photos 5+ only
|
||||
"end_date": None, # Photos 5+ only
|
||||
"customsortascending": None, # Photos 5+ only
|
||||
"customsortkey": None, # Photos 5+ only
|
||||
}
|
||||
|
||||
# get details about folders
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
# Ensure you have a backup before using!
|
||||
# You have been warned.
|
||||
|
||||
import datetime
|
||||
import pathlib
|
||||
import sqlite3
|
||||
from typing import Callable, Optional, Tuple
|
||||
@@ -147,6 +148,12 @@ class PhotoTimeZoneUpdater:
|
||||
c = conn.cursor()
|
||||
c.execute(sql_update)
|
||||
conn.commit()
|
||||
|
||||
# now need to update some other property in the photo via Photos API or
|
||||
# changes won't be synced to the cloud (#946)
|
||||
photo.date = photo.date + datetime.timedelta(seconds=1)
|
||||
photo.date = photo.date - datetime.timedelta(seconds=1)
|
||||
|
||||
self.verbose(
|
||||
f"Updated timezone for photo [filename]{photo.filename}[/filename] ([uuid]{photo.uuid}[/uuid]) "
|
||||
+ f"from [tz]{tz_name}[/tz], offset=[tz]{tz_offset}[/tz] "
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
""" ScoreInfo class to expose computed score info from the library """
|
||||
|
||||
from dataclasses import dataclass
|
||||
from dataclasses import dataclass, asdict
|
||||
|
||||
from ._constants import _PHOTOS_4_VERSION
|
||||
|
||||
@@ -38,3 +38,7 @@ class ScoreInfo:
|
||||
well_chosen_subject: float
|
||||
well_framed_subject: float
|
||||
well_timed_shot: float
|
||||
|
||||
def asdict(self):
|
||||
"""Return ScoreInfo as a dict"""
|
||||
return asdict(self)
|
||||
|
||||
@@ -139,6 +139,13 @@ class SearchInfo:
|
||||
return []
|
||||
return self._get_text_for_category(self._categories.DETECTED_TEXT)
|
||||
|
||||
@property
|
||||
def text_found(self):
|
||||
"""Returns True if photos has detected text (macOS 13+ / Photos 8+ only)"""
|
||||
if self._photo._db._photos_ver < 8:
|
||||
return []
|
||||
return self._get_text_for_category(self._categories.TEXT_FOUND)
|
||||
|
||||
@property
|
||||
def camera(self):
|
||||
"""returns camera name (macOS 13+ / Photos 8+ only)"""
|
||||
@@ -147,10 +154,18 @@ class SearchInfo:
|
||||
camera = self._get_text_for_category(self._categories.CAMERA)
|
||||
return camera[0] if camera else ""
|
||||
|
||||
@property
|
||||
def source(self):
|
||||
"""returns source of the photo (e.g. "Messages", "Safar", etc) (macOS 13+ / Photos 8+ only)"""
|
||||
if self._photo._db._photos_ver < 8:
|
||||
return ""
|
||||
source = self._get_text_for_category(self._categories.SOURCE)
|
||||
return source[0] if source else ""
|
||||
|
||||
@property
|
||||
def all(self):
|
||||
"""return all search info properties in a single list"""
|
||||
all = (
|
||||
all_ = (
|
||||
self.labels
|
||||
+ self.place_names
|
||||
+ self.streets
|
||||
@@ -165,23 +180,23 @@ class SearchInfo:
|
||||
+ self.detected_text
|
||||
)
|
||||
if self.city:
|
||||
all += [self.city]
|
||||
all_ += [self.city]
|
||||
if self.state:
|
||||
all += [self.state]
|
||||
all_ += [self.state]
|
||||
if self.state_abbreviation:
|
||||
all += [self.state_abbreviation]
|
||||
all_ += [self.state_abbreviation]
|
||||
if self.country:
|
||||
all += [self.country]
|
||||
all_ += [self.country]
|
||||
if self.month:
|
||||
all += [self.month]
|
||||
all_ += [self.month]
|
||||
if self.year:
|
||||
all += [self.year]
|
||||
all_ += [self.year]
|
||||
if self.season:
|
||||
all += [self.season]
|
||||
all_ += [self.season]
|
||||
if self.camera:
|
||||
all += [self.camera]
|
||||
all_ += [self.camera]
|
||||
|
||||
return all
|
||||
return all_
|
||||
|
||||
def asdict(self):
|
||||
"""return dict of search info"""
|
||||
@@ -206,6 +221,7 @@ class SearchInfo:
|
||||
"media_types": self.media_types,
|
||||
"detected_text": self.detected_text,
|
||||
"camera": self.camera,
|
||||
"source": self.source,
|
||||
}
|
||||
|
||||
def _get_text_for_category(self, category):
|
||||
|
||||
@@ -8,7 +8,7 @@ objexplore>=1.6.3,<2.0.0
|
||||
osxmetadata>=1.2.0,<2.0.0
|
||||
packaging>=21.3
|
||||
pathvalidate>=2.4.1,<2.5.0
|
||||
photoscript>=0.2.1,<0.3.0
|
||||
photoscript>=0.3.0,<0.4.0
|
||||
ptpython>=3.0.20,<3.1.0
|
||||
pyobjc-core>=9.0,<10.0
|
||||
pyobjc-framework-AVFoundation>=9.0,<10.0
|
||||
|
||||
2
setup.py
2
setup.py
@@ -83,7 +83,7 @@ setup(
|
||||
"osxmetadata>=1.2.0,<2.0.0",
|
||||
"packaging>=21.3",
|
||||
"pathvalidate>=2.4.1,<3.0.0",
|
||||
"photoscript>=0.2.1,<0.3.0",
|
||||
"photoscript>=0.3.0,<0.4.0",
|
||||
"ptpython>=3.0.20,<4.0.0",
|
||||
"pyobjc-core>=9.0,<=10.0",
|
||||
"pyobjc-framework-AVFoundation>=9.0,<10.0",
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>LibrarySchemaVersion</key>
|
||||
<integer>5001</integer>
|
||||
<key>MetaSchemaVersion</key>
|
||||
<integer>3</integer>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
tests/TestTimeWarp-13.1.0.photoslibrary/database/Photos.sqlite
Normal file
BIN
tests/TestTimeWarp-13.1.0.photoslibrary/database/Photos.sqlite
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>hostname</key>
|
||||
<string>Mac-mini.local</string>
|
||||
<key>hostuuid</key>
|
||||
<string>8E774325-0506-5746-9991-6B8189271107</string>
|
||||
<key>pid</key>
|
||||
<integer>61681</integer>
|
||||
<key>processname</key>
|
||||
<string>photolibraryd</string>
|
||||
<key>uid</key>
|
||||
<integer>501</integer>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
tests/TestTimeWarp-13.1.0.photoslibrary/database/metaSchema.db
Normal file
BIN
tests/TestTimeWarp-13.1.0.photoslibrary/database/metaSchema.db
Normal file
Binary file not shown.
BIN
tests/TestTimeWarp-13.1.0.photoslibrary/database/photos.db
Normal file
BIN
tests/TestTimeWarp-13.1.0.photoslibrary/database/photos.db
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,188 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BlacklistedMeaningsByMeaning</key>
|
||||
<dict/>
|
||||
<key>MePersonUUID</key>
|
||||
<string>39488755-78C0-40B2-B378-EDA280E1823C</string>
|
||||
<key>SceneWhitelist</key>
|
||||
<array>
|
||||
<string>Graduation</string>
|
||||
<string>Aquarium</string>
|
||||
<string>Food</string>
|
||||
<string>Ice Skating</string>
|
||||
<string>Mountain</string>
|
||||
<string>Cliff</string>
|
||||
<string>Basketball</string>
|
||||
<string>Tennis</string>
|
||||
<string>Jewelry</string>
|
||||
<string>Cheese</string>
|
||||
<string>Softball</string>
|
||||
<string>Football</string>
|
||||
<string>Circus</string>
|
||||
<string>Jet Ski</string>
|
||||
<string>Playground</string>
|
||||
<string>Carousel</string>
|
||||
<string>Paint Ball</string>
|
||||
<string>Windsurfing</string>
|
||||
<string>Sailboat</string>
|
||||
<string>Sunbathing</string>
|
||||
<string>Dam</string>
|
||||
<string>Fireplace</string>
|
||||
<string>Flower</string>
|
||||
<string>Scuba</string>
|
||||
<string>Hiking</string>
|
||||
<string>Cetacean</string>
|
||||
<string>Pier</string>
|
||||
<string>Bowling</string>
|
||||
<string>Snowboarding</string>
|
||||
<string>Zoo</string>
|
||||
<string>Snowmobile</string>
|
||||
<string>Theater</string>
|
||||
<string>Boat</string>
|
||||
<string>Casino</string>
|
||||
<string>Car</string>
|
||||
<string>Diving</string>
|
||||
<string>Cycling</string>
|
||||
<string>Musical Instrument</string>
|
||||
<string>Board Game</string>
|
||||
<string>Castle</string>
|
||||
<string>Sunset Sunrise</string>
|
||||
<string>Martial Arts</string>
|
||||
<string>Motocross</string>
|
||||
<string>Submarine</string>
|
||||
<string>Cat</string>
|
||||
<string>Snow</string>
|
||||
<string>Kiteboarding</string>
|
||||
<string>Squash</string>
|
||||
<string>Geyser</string>
|
||||
<string>Music</string>
|
||||
<string>Archery</string>
|
||||
<string>Desert</string>
|
||||
<string>Blackjack</string>
|
||||
<string>Fireworks</string>
|
||||
<string>Sportscar</string>
|
||||
<string>Feline</string>
|
||||
<string>Soccer</string>
|
||||
<string>Museum</string>
|
||||
<string>Baby</string>
|
||||
<string>Fencing</string>
|
||||
<string>Railroad</string>
|
||||
<string>Nascar</string>
|
||||
<string>Sky Surfing</string>
|
||||
<string>Bird</string>
|
||||
<string>Games</string>
|
||||
<string>Baseball</string>
|
||||
<string>Dressage</string>
|
||||
<string>Snorkeling</string>
|
||||
<string>Pyramid</string>
|
||||
<string>Kite</string>
|
||||
<string>Rowboat</string>
|
||||
<string>Golf</string>
|
||||
<string>Watersports</string>
|
||||
<string>Lightning</string>
|
||||
<string>Canyon</string>
|
||||
<string>Auditorium</string>
|
||||
<string>Night Sky</string>
|
||||
<string>Karaoke</string>
|
||||
<string>Skiing</string>
|
||||
<string>Parade</string>
|
||||
<string>Forest</string>
|
||||
<string>Hot Air Balloon</string>
|
||||
<string>Dragon Parade</string>
|
||||
<string>Easter Egg</string>
|
||||
<string>Monument</string>
|
||||
<string>Jungle</string>
|
||||
<string>Thanksgiving</string>
|
||||
<string>Jockey Horse</string>
|
||||
<string>Stadium</string>
|
||||
<string>Airplane</string>
|
||||
<string>Ballet</string>
|
||||
<string>Yoga</string>
|
||||
<string>Coral Reef</string>
|
||||
<string>Skating</string>
|
||||
<string>Wrestling</string>
|
||||
<string>Bicycle</string>
|
||||
<string>Tattoo</string>
|
||||
<string>Amusement Park</string>
|
||||
<string>Canoe</string>
|
||||
<string>Cheerleading</string>
|
||||
<string>Ping Pong</string>
|
||||
<string>Fishing</string>
|
||||
<string>Magic</string>
|
||||
<string>Reptile</string>
|
||||
<string>Winter Sport</string>
|
||||
<string>Waterfall</string>
|
||||
<string>Train</string>
|
||||
<string>Bonsai</string>
|
||||
<string>Surfing</string>
|
||||
<string>Dog</string>
|
||||
<string>Cake</string>
|
||||
<string>Sledding</string>
|
||||
<string>Sandcastle</string>
|
||||
<string>Glacier</string>
|
||||
<string>Lighthouse</string>
|
||||
<string>Equestrian</string>
|
||||
<string>Rafting</string>
|
||||
<string>Shore</string>
|
||||
<string>Hockey</string>
|
||||
<string>Santa Claus</string>
|
||||
<string>Formula One Car</string>
|
||||
<string>Sport</string>
|
||||
<string>Vehicle</string>
|
||||
<string>Boxing</string>
|
||||
<string>Rollerskating</string>
|
||||
<string>Underwater</string>
|
||||
<string>Orchestra</string>
|
||||
<string>Carnival</string>
|
||||
<string>Rocket</string>
|
||||
<string>Skateboarding</string>
|
||||
<string>Helicopter</string>
|
||||
<string>Performance</string>
|
||||
<string>Oktoberfest</string>
|
||||
<string>Water Polo</string>
|
||||
<string>Skate Park</string>
|
||||
<string>Animal</string>
|
||||
<string>Nightclub</string>
|
||||
<string>String Instrument</string>
|
||||
<string>Dinosaur</string>
|
||||
<string>Gymnastics</string>
|
||||
<string>Cricket</string>
|
||||
<string>Volcano</string>
|
||||
<string>Lake</string>
|
||||
<string>Aurora</string>
|
||||
<string>Dancing</string>
|
||||
<string>Concert</string>
|
||||
<string>Rock Climbing</string>
|
||||
<string>Hang Glider</string>
|
||||
<string>Rodeo</string>
|
||||
<string>Fish</string>
|
||||
<string>Art</string>
|
||||
<string>Motorcycle</string>
|
||||
<string>Volleyball</string>
|
||||
<string>Wake Boarding</string>
|
||||
<string>Badminton</string>
|
||||
<string>Motor Sport</string>
|
||||
<string>Sumo</string>
|
||||
<string>Parasailing</string>
|
||||
<string>Skydiving</string>
|
||||
<string>Kickboxing</string>
|
||||
<string>Pinata</string>
|
||||
<string>Foosball</string>
|
||||
<string>Go Kart</string>
|
||||
<string>Poker</string>
|
||||
<string>Kayak</string>
|
||||
<string>Swimming</string>
|
||||
<string>Atv</string>
|
||||
<string>Beach</string>
|
||||
<string>Dartboard</string>
|
||||
<string>Athletics</string>
|
||||
<string>Camping</string>
|
||||
<string>Tornado</string>
|
||||
<string>Billiards</string>
|
||||
<string>Rugby</string>
|
||||
<string>Airshow</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,26 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>insertAlbum</key>
|
||||
<array/>
|
||||
<key>insertAsset</key>
|
||||
<array/>
|
||||
<key>insertHighlight</key>
|
||||
<array/>
|
||||
<key>insertMemory</key>
|
||||
<array/>
|
||||
<key>insertMoment</key>
|
||||
<array/>
|
||||
<key>removeAlbum</key>
|
||||
<array/>
|
||||
<key>removeAsset</key>
|
||||
<array/>
|
||||
<key>removeHighlight</key>
|
||||
<array/>
|
||||
<key>removeMemory</key>
|
||||
<array/>
|
||||
<key>removeMoment</key>
|
||||
<array/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>embeddingVersion</key>
|
||||
<string>1</string>
|
||||
<key>localeIdentifier</key>
|
||||
<string>en_US</string>
|
||||
<key>sceneTaxonomySHA</key>
|
||||
<string>87914a047c69fbe8013fad2c70fa70c6c03b08b56190fe4054c880e6b9f57cc3</string>
|
||||
<key>searchIndexVersion</key>
|
||||
<string>10</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
After Width: | Height: | Size: 2.1 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 2.6 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.5 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.6 MiB |
Binary file not shown.
|
After Width: | Height: | Size: 3.6 MiB |
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CollapsedSidebarSectionIdentifiers</key>
|
||||
<array/>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>FaceProcessingInternalVersion</key>
|
||||
<integer>11</integer>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user