Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zotero source #251

Open
krillin666 opened this issue Oct 19, 2021 · 4 comments
Open

Zotero source #251

krillin666 opened this issue Oct 19, 2021 · 4 comments
Labels
source Related to specific sources/modules/indexers

Comments

@krillin666
Copy link
Contributor

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 !

@karlicoss karlicoss added the source Related to specific sources/modules/indexers label Oct 27, 2021
@karlicoss
Copy link
Owner

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 zotero/zotero-standalone-build#81, it could also work for opening highlights/books in Zotero directly from Promnesia sidebar

@krillin666
Copy link
Contributor Author

krillin666 commented Oct 28, 2021

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):

Kooha-10-28-2021-11-17-33.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

@karlicoss
Copy link
Owner

karlicoss commented Oct 28, 2021

@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).

@emacsbliss
Copy link

+1

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source Related to specific sources/modules/indexers
Projects
None yet
Development

No branches or pull requests

3 participants