stefanopagliari / bibnotes

360 stars 30 forks source link

Selecting: "Update Library" does nothing #58

Closed aeluabik closed 2 years ago

aeluabik commented 2 years ago

This is what appears whenever I try to update my folder with the Update library command. Path is correct, create new notes when missing is selected. What could it be? The path to my vault is in my iCloud folder, notes are updated, the file is a betterbibtex.json constantly updated. The plugin is amazing and it is the only thing remaining for my workflow to be flawless 👌🏻

update library
stefanopagliari commented 2 years ago

@arthurfraor sorry for getting back to you only now. Is the "update library" command working as expected beyond that box remaining open?

aeluabik commented 2 years ago

@arthurfraor sorry for getting back to you only now. Is the "update library" command working as expected beyond that box remaining open?

No worries, you're the one doing a favor for the community. No, it doesn't work, notes are not created. I decided to wait for a while to check if it would work, but it didn't. I haven't got many plugins and I wouldn't mind removing them if it would mean bibnotes working. I use a M1 Mac btw.

Deeoon commented 2 years ago

Same problem for me, also with a Mac M1 and the Obsidian Vault on iCloud. I have the same menu that appears, with the info box at the top right: "update 0 entries". And then nothing happens.

Deeoon commented 2 years ago

Same problem for me, also with a Mac M1 and the Obsidian Vault on iCloud. I have the same menu that appears, with the info box at the top right: "update 0 entries". And then nothing happens.

I am so stupid, just open a note with the keyboard shortcut and it works.

fengyelai commented 2 years ago

I also encountered the same problem. I can't create it through Bibnotes in Obsidian from Zotero

aeluabik commented 2 years ago

issue solved, just set the RELATIVE PATH, not the absolute path like the citations plugin. Maybe you should point this out in capital letters at the plugins page so no-one would commit the same mistake (just a suggestion)

fengyelai commented 2 years ago

issue solved, just set the RELATIVE PATH, not the absolute path like the citations plugin. Maybe you should point this out in capital letters at the plugins page so no-one would commit the same mistake (just a suggestion)

Yes, I also found this problem by trying. Thank you very much for your help! Thanks for such a wonderful plug-in

krillin666 commented 2 years ago

For me, the command BibNotes Formatter: Create/Update Literature Note works without problems for both creating and updating a given Zotero entry. However, the Update Library does nothing when I for example add new highlights to a Zotero entry

aeluabik commented 2 years ago

For me, the command BibNotes Formatter: Create/Update Literature Note works without problems for both creating and updating a given Zotero entry. However, the Update Library does nothing when I for example add new highlights to a Zotero entry

Guess I found another issue as well. Same for me

stefanopagliari commented 2 years ago

Are you referring to adding an highlight to the PDF in Zotero? if so, are you re-exporting the note within Zotero? An highlight in the pdf becomes readable to the plugin only after this is exported as a note within Zotero, so the existing one would need to be updated

jiqianxu commented 2 years ago

Are you referring to adding an highlight to the PDF in Zotero? if so, are you re-exporting the note within Zotero? An highlight in the pdf becomes readable to the plugin only after this is exported as a note within Zotero, so the existing one would need to be updated

Thanks for your plugin. Unfortunately, I also face the same issue. There are nothing items been updated by BibNotes Formatter: Update Literature Note, even though the note in zotero has been modified and the .json file has been updated baed on your suggestion.

aeluabik commented 2 years ago

Are you referring to adding an highlight to the PDF in Zotero? if so, are you re-exporting the note within Zotero? An highlight in the pdf becomes readable to the plugin only after this is exported as a note within Zotero, so the existing one would need to be updated

Sorry for the long time. I was using liquidtext sync with Zotero, and yep, it doesn't export comments automatically, so that was probably the issue. But now I open Zotero and export them manually and it is fine.

krillin666 commented 2 years ago

Are you referring to adding an highlight to the PDF in Zotero? if so, are you re-exporting the note within Zotero? An highlight in the pdf becomes readable to the plugin only after this is exported as a note within Zotero, so the existing one would need to be updated

I've even deleted and recreated annotations but the Bibnotes update Library does nothing. Only works about 1/10 times

pisceswb commented 2 years ago

This is a prefect plugins! Thanks! But I have the same problem, only "creat/update literature note" can work.

pdatlinger commented 2 years ago

Hi Stefano,

First of all, thanks for this amazing plugin. I've been looking for a link between Zotero 6 and Obsidian for a while now and your plugin is the best solution by far.

I've encountered the same limitation mentioned above and think it would be an easy fix.

When I execute 'BibNotes Formatter: Update Library', I get the output ''Updated 0 entries" and an empty floating window appears in Obsidian. However, I can see the updated text in the BetterBibtex JSON file when I search for it, so the changes have been written to this file. At the same time, when I execute 'BibNotes Formatter: Create/Update Literature Note' for the paper with the updated comment it creates the note as expected.

So right now I have to manually update each paper. It would be great to just click 'Update Library' and have everything updated automatically.

Thank you so much and all the best, Paul

aeluabik commented 2 years ago

Hi Stefano,

First of all, thanks for this amazing plugin. I've been looking for a link between Zotero 6 and Obsidian for a while now and your plugin is the best solution by far.

I've encountered the same limitation mentioned above and think it would be an easy fix.

When I execute 'BibNotes Formatter: Update Library', I get the output ''Updated 0 entries" and an empty floating window appears in Obsidian. However, I can see the updated text in the BetterBibtex JSON file when I search for it, so the changes have been written to this file. At the same time, when I execute 'BibNotes Formatter: Create/Update Literature Note' for the paper with the updated comment it creates the note as expected.

So right now I have to manually update each paper. It would be great to just click 'Update Library' and have everything updated automatically.

Thank you so much and all the best, Paul

You have to set the relative path, not absolute path. For example, it should be like: /yourjsonfile.json, if it is inside obsidian folder, or any folder inside it like: /folder/yourjsonfile.json. This should solve your issue. Also, always make sure to export your comments in zotero so they are sent to json file.

pdatlinger commented 2 years ago

Hi, thanks but I'm already using the relative path since this was mentioned in the previous comments. I've just found that it actually works with the command 'BibNotes Formatter: Create/Update Literature Note' and then selecting 'Entire Library: BetterBibTex/LibraryFile.json'. So that works for me now, but is probably not what you originally intended. The command 'BibNotes Formatter: Update Library' still doesn't do anything for me. With this solved I can now start using the amazing plugin, thanks so much for developing it.

XuShenLZ commented 2 years ago

Hi, thanks but I'm already using the relative path since this was mentioned in the previous comments. I've just found that it actually works with the command 'BibNotes Formatter: Create/Update Literature Note' and then selecting 'Entire Library: BetterBibTex/LibraryFile.json'. So that works for me now, but is probably not what you originally intended. The command 'BibNotes Formatter: Update Library' still doesn't do anything for me. With this solved I can now start using the amazing plugin, thanks so much for developing it.

Yes I am also using relative path and this issue is the same for me. As @pdatlinger said:

stefanopagliari commented 2 years ago

@pdatlinger and @XuShenLZ, thanks for raising this issue. What are your settings in "Update Existing/All Notes"? If "Only existing notes" is selected, the command "Update Library" will not create entries that are not already present in your vault.

XuShenLZ commented 2 years ago

@pdatlinger and @XuShenLZ, thanks for raising this issue. What are your settings in "Update Existing/All Notes"? If "Only existing notes" is selected, the command "Update Library" will not create entries that are not already present in your vault.

My setting to Update Existing/All Notes is Only existing notes. Not creating new entries is indeed the desired result. But my problem is that BibNotes Formatter: Update Library doesn't update the current notes as well. See the gif below:

Obsidian_2022-06-19_18-34-18

The only way to update this note in Obsidian is to run the BibNotes Formatter: Create/Update Literature Note and manually select the paper I updated

I am using the latest 0.9.151

stefanopagliari commented 2 years ago

@XuShenLZ does the "Update Library" function fails also if you wait longer? It takes a few seconds for BetterBibTex to export the updated file (depending on the size of the file), so one possibility I would like to rule out is that it had yet to be updated when you ran the "Update Library" command

XuShenLZ commented 2 years ago

Yeah there is nothing new even after I have waited for many minutes. Also nothing is updated after my restart Zotero & Obsidian. My JSON file is only 1MB and there is only one note in Obsidian now.

stefanopagliari commented 2 years ago

@XuShenLZ I wonder if this is related to the other problem and the fact that you were editing notes extracted from a pdf. For instance, what happens if you create a new note for an existing entry (only manual edit or only pdf extraction) and select update?

aeluabik commented 2 years ago

Just a complement, it is required to extract the notes you create on a pdf in zotero. If you just highlight ant make comments, but not extract it, the notes won’t be added.

XuShenLZ commented 2 years ago

@XuShenLZ I wonder if this is related to the other problem and the fact that you were editing notes extracted from a pdf. For instance, what happens if you create a new note for an existing entry (only manual edit or only pdf extraction) and select update?

@stefanopagliari The problem is still there even if I just use a note with plain text. You can observe in this gif that even though the changes are reflected in JSON, BibNotes Formatter: Update Library still does not do anything.

explorer_2022-06-22_19-04-02

stefanopagliari commented 2 years ago

Ok, I have found out what is the problem. The code compares the date when the library was updated the last time with the date when the entry was updated the last time in order to identify those that need to be updated. Zotero provides a different date modified for the metadata and for each of the individual notes. I was looking at the date of the metadata, but this has not changed. I will need to also ask the plugin to check the date when each individual note was modified

stefanopagliari commented 2 years ago

@XuShenLZ I think I have fixed this in 0.9.153. Could you please test whether editing a note and then updating the library works?

Thanks for flagging the problem

XuShenLZ commented 2 years ago

Awesome! Solved. It may not work if you test too quickly (<1min) after making the change. Wait a bit longer will make sure the time comparison returns non-zero.

stefanopagliari commented 2 years ago

Thank you. The time lag is - I think - due to the fact that betterbittex may take a few seconds to start updating the json file