diff --git a/Developer-Tools.md b/Developer-Tools.md index 41ce56b..820ae4f 100644 --- a/Developer-Tools.md +++ b/Developer-Tools.md @@ -7,6 +7,7 @@ For those of you interested in extending osxphotos, using osxphotos to build you - `osxphotos grep` - `osxphotos install` - `osxphotos uninstall` +- `osxphotos exportdb` Some of these are hidden commands and can be viewed using the command: @@ -56,3 +57,39 @@ ZADDITIONALASSETATTRIBUTES, ZTITLE, 26, Palm Tree ## install / uninstall The final two commands install or uninstall python packages into the same virtual environment that osxphotos is running in. These are primarily used for developing plugins when you've installed osxphotos via [pipx](https://github.com/pypa/pipx) which is the recommended approach. pipx handles creating a virtual environment for you but if you are developing a custom plugin function to use with the `--query-function`, `--post-function` or `{function}` template, and you need to install an external dependency, you'll need to inject those dependencies into the virtual environment set up by pipx. You can use `pipx inject` for this but many people don't know about that feature so I added the ability for osxphotos to do this itself. + +## exportdb + +Provides utilities for working with or doing maintenance on the sqlite export database used osxphotos for maintaining state information for `--update` and `--force-update`. By default, the export database is located in `/path/to/export/.osxphotos_export.db` though this can be changed with the `--exportdb` option. + +``` +$ osxphotos help exportdb +Usage: osxphotos exportdb [OPTIONS] EXPORT_DATABASE + + Utilities for working with the osxphotos export database + +Options: + --version Print export database version and exit. + --vacuum Run VACUUM to defragment the database. + --check-signatures Check signatures for all exported photos in the + database to find signatures that don't match. + --update-signatures Update signatures for all exported photos in the + database to match on-disk signatures. + --touch-file Touch files on disk to match created date in + Photos library and update export database + signatures + --last-run Show last run osxphotos commands used with this + database. + --save-config CONFIG_FILE Save last run configuration to TOML file for use + by --load-config. + --info FILE_PATH Print information about FILE_PATH contained in + the database. + --migrate Migrate (if needed) export database to current + version. + --export-dir DIRECTORY Optional path to export directory (if not parent + of export database). + -V, --verbose Print verbose output. + --dry-run Run in dry-run mode (don't actually update + files), e.g. for use with --update-signatures. + -h, --help Show this message and exit. +``` \ No newline at end of file