hans / obsidian-citation-plugin

Obsidian plugin which integrates your academic reference manager with the Obsidian editor. Search your references from within Obsidian and automatically create and reference literature notes for papers and books.
MIT License
1.04k stars 76 forks source link

obsidian won't update new entries in Zotero library #225

Open Chiara-toschi opened 1 year ago

Chiara-toschi commented 1 year ago

I have exported the library as described in your guide in the Better BibLaTex format and clicked 'keep updated'. I added the pathway to the Citations database path, however it doesn't actually keep updated, when I add a new entry in the Zotero library it doesn't show up on obsidian. Why?

Obsidian Version 1.1.16 (Installer 1.1.16) Zotero version 6.0.23

orionpilot commented 1 year ago

Have you refreshed the database in obsidian? If obsidian is open and you change the bib file, you are correct that obsidian wont immediately recognize the change. You also need to tell obsidian to reload the file to make it aware of the change(s).

The "keep updated" option you mention is a zotero setting so that the bib file it creates is always up to date. This setting does not make obsidian aware of the changes automatically.

Chiara-toschi commented 1 year ago

I see, how should I refresh the database in obsidian? I tried 'reloading' it but nothing changes, I still cannot find the new references.

orionpilot commented 1 year ago

It's a command for the plugin itself. Access it via the command palette or with a hotkey directly. I think the hotkey that's highlighted here is the default one.

image

Chiara-toschi commented 1 year ago

I see thank you! I tried but it's still not updating :( despite the fact that the zotero local and web library are updating. I also noticed that for some reason Zotero keeps recovering old exported libraries that I had thrown in the bin of my mac, not sure if this is messing up things. Any additional thing that I can try?

Chiara-toschi commented 1 year ago

Ok sorry it did work by refreshing the database but it took quite long: when I add a new reference Zotero seems to be loading for a while and shows a 'scheduled better bibLatex' (see screenshot) and for some weird reason it keeps recovering old libraries that I deleted, not sure why and what this means. See second screenshot

Screenshot 2023-04-09 at 09 26 43 Screenshot 2023-04-09 at 09 28 59
Chiara-toschi commented 1 year ago

could it have to do with the fact that I have a macbook synced to icloud..?

orionpilot commented 1 year ago

Well this is progress! Since the local and web zotero libraries are updating, I think you are on the right track with the cloud idea. What you are saying does sound like a syncing conflict. Do you have your vault completely local? In your screenshot, it looks like part of the vault is in the cloud. See this link from the online help vault for an explanation why this is a bad idea. Are you only syncing with iCloud or with something else too?

Are you manually deleting the old version of the bib file before zotero updates it? Another idea: is your betterbiblatex export set to on change or something else? See here. Just double checking since maybe that's why the refresh is taking so long. When I update my database, its basically automatic to me.

Unfortunately, I don't use iCloud/Zotero so I don't have anything specific to recommend here, just some ideas.

Actually, we can test that could idea. Try setting up a new completely local vault, set up your zotero library with the plugin, and seeing what happens when you add a new entry.

Chiara-toschi commented 1 year ago

Ok so I created a new Vault not synced to the cloud but it didn't change anything, and then I figured out that the problem was in one of the settings of Zotero: i.e. my settings were set up such that Zotero was taking many seconds (more than 6000) to automatically export, I now changed this to 5s, see screenshot below where it says 'Delay auto-export'. I also found out why I had so many copies of the attempts of libraries that I was exporting, i.e. because I had to remove them manually from this same settings page (button remove). Anyway, all is good but other people like me might have this problem so good that we sorted this out. Thank you for your help!

Screenshot 2023-04-11 at 07 43 57
orionpilot commented 1 year ago

Great to hear the problem is solved and thanks for sharing the solution!