Updated Developer Tools (markdown)

Rhet Turnbull
2022-02-20 16:32:00 -08:00
parent eebda00872
commit 9e2355b1ac

@@ -4,6 +4,7 @@ For those of you interested in extending osxphotos, using osxphotos to build you
- `osxphotos uuid`
- `osxphotos snap`
- `osxphotos diff`
- `osxphotos grep`
- `osxphotos install`
- `osxphotos uninstall`
@@ -42,6 +43,16 @@ Make a change (rename a photo), then:
<img width="1011" alt="Screen Shot 2022-01-14 at 3 58 06 PM" src="https://user-images.githubusercontent.com/41546558/149599687-0fa263a5-dae1-41cf-be27-f2046d18c1e4.png">
# install / uninstall
## grep
Search all columns in all tables in a Photos database to find a value. This is useful for understanding where Photos stores specific information. For example, change a photo title to "Palm Tree" then:
```
[I] ➜ osxphotos grep "Palm Tree"
Using last opened Photos library: /Users/rhet/Pictures/Test-10.15.7.photoslibrary
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.