changed interface for export, prepped for exiftool_json_sidecar
This commit is contained in:
Binary file not shown.
@@ -5,7 +5,7 @@
|
||||
<key>LithiumMessageTracer</key>
|
||||
<dict>
|
||||
<key>LastReportedDate</key>
|
||||
<date>2019-08-24T02:50:48Z</date>
|
||||
<date>2019-12-08T16:44:38Z</date>
|
||||
</dict>
|
||||
<key>PXPeopleScreenUnlocked</key>
|
||||
<true/>
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>PhotoAnalysisGraphLastBackgroundGraphRebuildJobDate</key>
|
||||
<date>2019-12-07T16:40:40Z</date>
|
||||
<date>2019-12-16T02:55:50Z</date>
|
||||
<key>PhotoAnalysisGraphLastBackgroundMemoryGenerationJobDate</key>
|
||||
<date>2019-12-07T16:40:41Z</date>
|
||||
<date>2019-12-16T02:55:50Z</date>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -11,6 +11,6 @@
|
||||
<key>PLLastRevGeoForcedProviderOutOfDateCheckVersionKey</key>
|
||||
<integer>1</integer>
|
||||
<key>PLLastRevGeoVerFileFetchDateKey</key>
|
||||
<date>2019-12-07T16:40:32Z</date>
|
||||
<date>2019-12-13T18:43:07Z</date>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -7,7 +7,7 @@
|
||||
<key>hostuuid</key>
|
||||
<string>9575E48B-8D5F-5654-ABAC-4431B1167324</string>
|
||||
<key>pid</key>
|
||||
<integer>423</integer>
|
||||
<integer>1794</integer>
|
||||
<key>processname</key>
|
||||
<string>photolibraryd</string>
|
||||
<key>uid</key>
|
||||
|
||||
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.
Binary file not shown.
@@ -3,24 +3,24 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BackgroundHighlightCollection</key>
|
||||
<date>2019-12-14T18:19:30Z</date>
|
||||
<date>2019-12-15T18:49:56Z</date>
|
||||
<key>BackgroundHighlightEnrichment</key>
|
||||
<date>2019-12-14T18:19:29Z</date>
|
||||
<date>2019-12-15T18:49:35Z</date>
|
||||
<key>BackgroundJobAssetRevGeocode</key>
|
||||
<date>2019-12-14T18:19:30Z</date>
|
||||
<date>2019-12-15T20:55:19Z</date>
|
||||
<key>BackgroundJobSearch</key>
|
||||
<date>2019-12-14T18:19:30Z</date>
|
||||
<date>2019-12-15T18:49:56Z</date>
|
||||
<key>BackgroundPeopleSuggestion</key>
|
||||
<date>2019-12-14T18:19:28Z</date>
|
||||
<date>2019-12-15T18:49:35Z</date>
|
||||
<key>BackgroundUserBehaviorProcessor</key>
|
||||
<date>0000-12-30T00:00:00Z</date>
|
||||
<date>2019-12-15T18:49:56Z</date>
|
||||
<key>PhotoAnalysisGraphLastBackgroundGraphConsistencyUpdateJobDateKey</key>
|
||||
<date>2019-12-14T18:19:28Z</date>
|
||||
<date>2019-12-15T20:55:19Z</date>
|
||||
<key>PhotoAnalysisGraphLastBackgroundGraphRebuildJobDate</key>
|
||||
<date>2019-12-14T18:19:28Z</date>
|
||||
<date>2019-12-15T18:49:35Z</date>
|
||||
<key>PhotoAnalysisGraphLastBackgroundMemoryGenerationJobDate</key>
|
||||
<date>2019-12-10T06:45:58Z</date>
|
||||
<date>2019-12-15T20:55:19Z</date>
|
||||
<key>SiriPortraitDonation</key>
|
||||
<date>0000-12-30T00:00:00Z</date>
|
||||
<date>2019-12-15T18:49:56Z</date>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
Binary file not shown.
@@ -3,8 +3,8 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>FaceIDModelLastGenerationKey</key>
|
||||
<date>2019-12-10T06:45:58Z</date>
|
||||
<date>2019-12-15T18:49:56Z</date>
|
||||
<key>LastContactClassificationKey</key>
|
||||
<date>2019-12-10T06:46:00Z</date>
|
||||
<date>2019-12-15T18:49:58Z</date>
|
||||
</dict>
|
||||
</plist>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IncrementalPersonProcessingStage</key>
|
||||
<integer>6</integer>
|
||||
<integer>0</integer>
|
||||
<key>PersonBuilderLastMinimumFaceGroupSizeForCreatingMergeCandidates</key>
|
||||
<integer>15</integer>
|
||||
<key>PersonBuilderMergeCandidatesEnabled</key>
|
||||
|
||||
Binary file not shown.
@@ -57,6 +57,7 @@ UUID_DICT = {
|
||||
"export": "D79B8D77-BFFC-460B-9312-034F2877D35B", # "Pumkins2.jpg"
|
||||
}
|
||||
|
||||
|
||||
def test_export_1():
|
||||
# test basic export
|
||||
# get an unedited image and export it using default filename
|
||||
@@ -390,3 +391,75 @@ def test_export_13():
|
||||
with pytest.raises(Exception) as e:
|
||||
assert photos[0].export(dest)
|
||||
assert e.type == type(FileNotFoundError())
|
||||
|
||||
|
||||
def test_dd_to_dms_str_1():
|
||||
import osxphotos
|
||||
|
||||
lat_str, lon_str = osxphotos.dd_to_dms_str(
|
||||
34.559331096, 69.206499174
|
||||
) # Kabul, 34°33'33.59" N 69°12'23.40" E
|
||||
|
||||
assert lat_str == "34 deg 33' 33.59\" N"
|
||||
assert lon_str == "69 deg 12' 23.40\" E"
|
||||
|
||||
|
||||
def test_dd_to_dms_str_2():
|
||||
import osxphotos
|
||||
|
||||
lat_str, lon_str = osxphotos.dd_to_dms_str(
|
||||
-34.601997592, -58.375665164
|
||||
) # Buenos Aires, 34°36'7.19" S 58°22'32.39" W
|
||||
|
||||
assert lat_str == "34 deg 36' 7.19\" S"
|
||||
assert lon_str == "58 deg 22' 32.39\" W"
|
||||
|
||||
|
||||
def test_dd_to_dms_str_3():
|
||||
import osxphotos
|
||||
|
||||
lat_str, lon_str = osxphotos.dd_to_dms_str(
|
||||
-1.2666656, 36.7999968
|
||||
) # Nairobi, 1°15'60.00" S 36°47'59.99" E
|
||||
|
||||
assert lat_str == "1 deg 15' 60.00\" S"
|
||||
assert lon_str == "36 deg 47' 59.99\" E"
|
||||
|
||||
|
||||
def test_dd_to_dms_str_4():
|
||||
import osxphotos
|
||||
|
||||
lat_str, lon_str = osxphotos.dd_to_dms_str(
|
||||
38.889248, -77.050636
|
||||
) # DC: 38° 53' 21.2928" N, 77° 3' 2.2896" W
|
||||
|
||||
assert lat_str == "38 deg 53' 21.29\" N"
|
||||
assert lon_str == "77 deg 3' 2.29\" W"
|
||||
|
||||
|
||||
def test_exiftool_json_sidecar():
|
||||
import osxphotos
|
||||
import json
|
||||
|
||||
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
|
||||
photos = photosdb.photos(uuid=[UUID_DICT["location"]])
|
||||
|
||||
json_expected = json.loads(
|
||||
"""
|
||||
[{"FileName": "DC99FBDD-7A52-4100-A5BB-344131646C30.jpeg",
|
||||
"Title": "St. James\'s Park",
|
||||
"TagsList": ["London 2018", "St. James\'s Park", "England", "United Kingdom", "UK", "London"],
|
||||
"Keywords": ["London 2018", "St. James\'s Park", "England", "United Kingdom", "UK", "London"],
|
||||
"GPSLatitude": "51 deg 30\' 12.86\\" N",
|
||||
"GPSLongitude": "0 deg 7\' 54.50\\" W",
|
||||
"GPSPosition": "51 deg 30\' 12.86\\" N, 0 deg 7\' 54.50\\" W",
|
||||
"GPSLatitudeRef": "North", "GPSLongitudeRef": "West",
|
||||
"DateTimeOriginal": "2018:10:13 09:18:12", "OffsetTimeOriginal": "-04:00"}]
|
||||
"""
|
||||
)
|
||||
|
||||
json_got = photos[0]._exiftool_json_sidecar()
|
||||
json_got = json.loads(json_got)
|
||||
|
||||
assert sorted(json_got[0].items()) == sorted(json_expected[0].items())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user