[Gerty] Make Gerty work with other apps using URL schemes
You can get Gerty free on the App Store here.
These URL schemes allow other applications to send commands to Gerty including those to create new journal entries. Before using entry creation commands, it is useful to understand how journal entries work in Gerty.
Unlike general-purpose journaling apps, entries in Gerty must be associated with a book. Gerty supports two types of books: EPUB books stored in Gerty’s eBooks library, and “placeholders” stored in Gerty’s “More books” library. Placeholders are simply virtual publications for any non-EPUB books you’d like to keep a journal for. They could be paper books, books on your Kindle device or an eInk reader, or magazines.
Note: parameter {values} must be URL-encoded. Gerty will take care of decoding them.
Launch Gerty from another app
When called by an app, this command simply launches or switches to Gerty.
gerty://addentry?title={book title}&author={book author}&text={entry text}&prompt=1&callback={url to callback app}
If both the book title and author parameters are specified, a journal entry is created and associated with a placeholder/virtual book having that title and author. If a placeholder book having the specified title and author doesn’t exist, it will be created.
If the book title and/or the author parameter is missing, a journal entry is created and associated with the most recently used eBook or placeholder/virtual book. If you don't have any recently used books, this command is ignored. In this mode, if you pass the prompt parameter with a value of 1, the new entry dialog will prompt you to choose a book to associate the entry with.
If a callback url is specified, Gerty will execute it when the entry creation page is closed.
Creating a journal entry with a photo (paste method)
gerty://pastephoto?text={text}&prompt=1&callback={url to callback app}
Creates a journal entry with a photo that you copied to the clipboard. If the text parameter is specified, that text is included in the new entry. The journal entry is created and associated with the most recently used eBook or placeholder/virtual book.
This command is ignored if:
The clipboard is empty or doesn’t contain a photo.
There is no recently used eBook or placeholder/virtual book.
The prompt parameter is optional. If you set the prompt parameter to 1, the new entry dialog will prompt you to choose a book to associate the entry with.
If a callback url is specified, Gerty will execute it when the entry creation page is closed.
Creating a journal entry with a photo (camera roll method)
gerty://lastphoto?text={text}&prompt=1&callback={url to callback app}
Creates a journal entry with the latest photo you have saved in your camera roll. If the text parameter is specified, that text is included in the new entry. The journal entry is created and associated with the most recent used eBook or placeholder/virtual book.
This command is ignored if:
The camera roll contains no photos.
There is no recently used eBook or placeholder/virtual book.
The prompt parameter is optional. If you set the prompt parameter to 1, the new entry dialog will prompt you to choose a book to associate the entry with.
If a callback url is specified, Gerty will execute it when the entry creation page is closed.