Thanks! Sorry in advance for the long reply! Hope the minor headers make sense.
Re: Troubleshooting tropy://
in Linux
Just a heads up, there might be some additional trickiness to get it to work in Linux (this might be related). At the moment, it doesn’t work for me in Ubuntu 18.04 with v1.8.0.
Some additional things Linux users might need to do:
xdg-mime default tropy.desktop x-scheme-handler/tropy
sudo update-desktop-database
To verify that the tropy://
URL works, the following commands should output tropy.desktop
:
xdg-mime query default x-scheme-handler/tropy
xdg-settings get default-url-scheme-handler tropy
In addition, tropy should appear under Default applications in ~/.config/mimeapps.list
:
[Default Applications]
...
x-scheme-handler/tropy=tropy.desktop
Given that I followed all the steps above, I’m not sure what else could be missing.
Re: tropy://
API
I believe you could look into Todoist’s projects for that. I’m pretty new to Tropy, but I believe you could do something similar:
todoist://project?id=128501470
Obsidian has a similar scheme with vaults
, which just refer to two different folders in your laptop (but from what I understand would be equivalent to the projects here).
For Tropy, it really depends on how you want to perform the search to the specific item you want to open, but I could see something like
tropy://open?project=<id> # Opens a specific project
tropy://open?project=<id>&item=<itemid> # Opens a specific item in a project
tropy://open?project=<id>&list=<listid> # Opens Tropy on the specified list
tropy://open?project=<id>&list=<listid>&tag=<tag> # Opens a specific list filtered by the given tag(s)
In my opinion, using the project ID with this precondition is a reasonable assumption. If a link containing an id that has not been seen or remembered by Tropy is clicked, you could just default back to opening en empty Tropy instance.
Another alternative would be to support two variations of the URI… one with actions like open
where the IDs are used, and a simpler “project” URL that could open the destination path as a Tropy library, but without the option to perform actions, e.g. tropy://tropy-project/path/to/my/photos
. This would let the users have an “absolute” link to the vault (so tropy can remember it), and some action-based links once Tropy is aware of the project.
Re: Use cases
For me the main use case right now would be “linking” between applications, so opening to a specific item and/or photo would already serve 90% of what I’d like to do. My main goal is not so much to automate stuff through the URL scheme, but to easily switch between contexts. Adding tags or links (e.g. an obsidian link) to an item from other apps would be a second great step for me!
Keep in mind that I’m only starting with Tropy, and that I’m mostly using it for my genealogy hobby. Other academic users might have other more complex use cases that I haven’t thought about.