@@ -1,3 +1,3 @@
|
||||
""" version info """
|
||||
|
||||
__version__ = "0.51.2"
|
||||
__version__ = "0.51.3"
|
||||
|
||||
Binary file not shown.
@@ -51,6 +51,22 @@ the exported files would be:
|
||||
/path/to/export/Travel/IMG_1234.JPG
|
||||
/path/to/export/Vacation/IMG_1234.JPG
|
||||
|
||||
If your photos are organized in folders and albums in Photos you can preserve this structure on export by using the `{folder_album}` template field with the `--directory` option. For example, if you have a photo in the album `Vacation` which is in the `Travel` folder, the following command would export the photo to the `Travel/Vacation` directory:
|
||||
|
||||
`osxphotos export /path/to/export --directory "{folder_album}"`
|
||||
|
||||
Photos can belong to more than one album. In this case, the template field `{folder_album}` will expand to all the album names that the photo belongs to. For example, if a photo belongs to the albums `Vacation` and `Travel`, the template field `{folder_album}` would expand to `Vacation`, `Travel`. If the photo belongs to no albums, the template field `{folder_album}` would expand to "_" (the default value).
|
||||
|
||||
All template fields including `{folder_album}` can be further filtered using a number of different filters. To convert all directory names to lower case for example, use the `lower` filter:
|
||||
|
||||
`osxphotos export /path/to/export --directory "{folder_album|lower}"`
|
||||
|
||||
If all your photos were organized into various albums under a folder named `Events` but some where also included in other top-level albums and you wanted to export only the `Events` folder, you could use the `filter` option to filter out the other top-level albums by selecting only those folder/album paths that start with `Events`:
|
||||
|
||||
`osxphotos export /path/to/export --directory "{folder_album|filter(startswith Events)}"`
|
||||
|
||||
You can learn more about the other filters using `osxphotos help export`.
|
||||
|
||||
## Specify exported filename
|
||||
|
||||
By default, osxphotos will use the original filename of the photo when exporting. That is, the filename the photo had when it was taken or imported into Photos. This is often something like `IMG_1234.JPG` or `DSC05678.dng`. osxphotos allows you to specify a custom filename template using the `--filename` option in the same way as `--directory` allows you to specify a custom directory name. For example, Photos allows you specify a title or caption for a photo and you can use this in place of the original filename:
|
||||
@@ -230,6 +246,14 @@ You can use the `--report` option to create a report, in comma-separated values
|
||||
|
||||
`osxphotos export /path/to/export --report export.csv`
|
||||
|
||||
You can also create reports in JSON or SQLite format by changing the extension of the report filename. For example, to create a JSON report:
|
||||
|
||||
`osxphotos export /path/to/export --report export.json`
|
||||
|
||||
And to create a SQLite report:
|
||||
|
||||
`osxphotos export /path/to/export --report export.sqlite`
|
||||
|
||||
## Exporting only certain photos
|
||||
|
||||
By default, osxphotos will export your entire Photos library. If you want to export only certain photos, osxphotos provides a rich set of "query options" that allow you to query the Photos database to filter out only certain photos that match your query criteria. The tutorial does not cover all the query options as there are over 50 of them--read the help text (`osxphotos help export`) to better understand the available query options. No matter which subset of photos you would like to export, there is almost certainly a way for osxphotos to filter these. For example, you can filter for only images that contain certain keywords or images without a title, images from a specific time of day or specific date range, images contained in specific albums, etc.
|
||||
|
||||
Reference in New Issue
Block a user