promnesia icon indicating copy to clipboard operation
promnesia copied to clipboard

Zotero source

Open krillin666 opened this issue 4 years ago • 5 comments

Hi, Amazing project here !

I saw that you have a source in your HPI for zotero. Would it be possible have it for Promnesia also ? It would be really helpful for when opening an url of an article and knowing if it is already in the Zotero database without the friction of having to open Zotero and search for the article !

In your HPI zotero source you have something like:

    item = Item(
        file=Path(path),  # path is a bit misleading... could mean some internal DOM path?
        title=r['title'],
        url=r['url'],
        tags=r['top_tags']
    )

Maybe this could be enough to extract the relevant info for Promnesia ? In my opinion just the title or something would be enough to serve the purpose of letting one know if you have a certain url in the database.

Thank you !

krillin666 avatar Oct 19 '21 18:10 krillin666

Hey, yeah that would be useful! And yeah, a basic promnesia module could be very simple, e.g. similar to instapaper https://github.com/karlicoss/promnesia/blob/master/src/promnesia/sources/instapaper.py

It would be also cool to somehow support modules from HPI 'automatically', won't be as nice as a handwritten Promnesia module in general, but at least possible to get some value from the data straightaway

Also if we figure out this https://github.com/zotero/zotero-standalone-build/issues/81, it could also work for opening highlights/books in Zotero directly from Promnesia sidebar

karlicoss avatar Oct 27 '21 23:10 karlicoss

Hey, yeah that would be useful! And yeah, a basic promnesia module could be very simple, e.g. similar to instapaper master/src/promnesia/sources/instapaper.py

It would be also cool to somehow support modules from HPI 'automatically', won't be as nice as a handwritten Promnesia module in general, but at least possible to get some value from the data straightaway

@karlicoss That's amazing and would be really helpful for all academics out here if this is ported to Promnesia.

Also if we figure out this zotero/zotero-standalone-build#81, it could also work for opening highlights/books in Zotero directly from Promnesia sidebar

In relation to this, I think I might be of help here. I was able to make this work in Logseq to open directly Zotero links on the exact page my annotations were made (in the video I enter edit mode first just so you can see that the links in blue are zotero://open-pdf/library/items.... links):

https://user-images.githubusercontent.com/60305303/139236885-040fd9b7-2978-4505-a78e-6d224bd1a405.mp4

When I click zotero://open-pdf/library/items/CLDGE8D2?page=3 It automatically opens Zotero first and then opens immediately the pdf of item CLDGE8D2 in page 3.

For this to work I had to do the following (note I will explain for Zotero installed through Flatpak, if you have Zotero installed through yours system's repo its much easier and can skip the first step):

  • Copy the zotero .desktop file from the Flatpak location to ".local/share/applications/" or symlink it ln -s source cp /var/lib/flatpak/exports/share/applications/org.zotero.Zotero.desktop .local/share/applications/
  • Change the file name to 🠖 zotero-link.desktop
  • Edit the Exec entry of the .desktop file to accept urls: Exec=/usr/bin/flatpak run --branch=stable --arch=x86_64 --command=zotero org.zotero.Zotero --url %u
    • For non-flatpak users its just: Exec=zotero --url %u
  • Add the entry to the mimetype's list:
  • echo "x-scheme-handler/zotero=zotero-link.desktop" >> .config/mimeapps.list

krillin666 avatar Oct 28 '21 10:10 krillin666

@krillin666 Oh nice, this is super useful! Will try to give it a go! Btw, you seem interested in knowledge management tools, you'll be very welcome to join and participate in https://memex.zulipchat.com :) (no need to register, you can use github login).

karlicoss avatar Oct 28 '21 22:10 karlicoss

+1

it would be really helpful to have zotero source, thanks a lot!

emacsbliss avatar Jun 09 '22 02:06 emacsbliss