Added latitude, longitude to cmd_line

This commit is contained in:
Rhet Turnbull
2019-11-27 07:39:48 -08:00
parent aa25c9eab7
commit 27b3469513
3 changed files with 11 additions and 3 deletions

View File

@@ -5,17 +5,17 @@
## What is osxphotos?
OSXPhotos provides the ability to interact with and query Apple's Photos app library database on Mac OS X. Using this module you can query the Photos database for information about the photos stored in a Photos library--for example, file name, file path, and metadata such as keywords/tags, persons/faces, albums, etc.
OSXPhotos provides the ability to interact with and query Apple's Photos app library database on MacOS. Using this module you can query the Photos database for information about the photos stored in a Photos library--for example, file name, file path, and metadata such as keywords/tags, persons/faces, albums, etc.
NOTE: OSXPhotos currently only supports image files -- e.g. it does not handle movies.
## Supported operating systems
Only works on Mac OS X. Tested on Mac OS 10.12.6 / Photos 2.0, 10.13.6 / Photos 3.0 and Mac OS 10.14.5, 10.14.6 / Photos 4.0. Requires python >= 3.6
Only works on MacOS (aka Mac OS X). Tested on MacOS 10.12.6 / Photos 2.0, 10.13.6 / Photos 3.0 and MacOS 10.14.5, 10.14.6 / Photos 4.0. Requires python >= 3.6
NOTE: Alpha support for Mac OS 10.15.0 / Photos 5.0. Photos 5.0 uses a new database format which required rewrite of much of the code for this package. If you find bugs, please open an [issue](https://github.com/RhetTbull/osxphotos/issues/).
This module will read Photos databases for any supported version on any supported OS version. E.g. you can read a database created with Photos 4.0 on Mac OS 10.14 on a machine running Mac OS 10.12
This module will read Photos databases for any supported version on any supported OS version. E.g. you can read a database created with Photos 4.0 on MacOS 10.14 on a machine running MacOS 10.12
## Installation instructions

View File

@@ -1129,6 +1129,8 @@ class PhotoInfo:
"hasadjustments": self.hasadjustments(),
"favorite": self.favorite(),
"hidden": self.hidden(),
"latitude": self._latitude(),
"longitude": self._longitude(),
}
return yaml.dump(info, sort_keys=False)
@@ -1150,6 +1152,8 @@ class PhotoInfo:
"hasadjustments": self.hasadjustments(),
"favorite": self.favorite(),
"hidden": self.hidden(),
"latitude": self._latitude(),
"longitude": self._longitude(),
}
return json.dumps(pic)

View File

@@ -325,6 +325,8 @@ def print_photo_info(photos, json=False):
"hasadjustments",
"favorite",
"hidden",
"latitude",
"longitude",
]
)
for p in photos:
@@ -344,6 +346,8 @@ def print_photo_info(photos, json=False):
p.hasadjustments(),
p.favorite(),
p.hidden(),
p._latitude(),
p._longitude(),
]
)
for row in dump: