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

Problems with the configuration of the plugin #3

Closed
WMAM opened this issue Jan 12, 2022 · 20 comments
Closed

Problems with the configuration of the plugin #3

WMAM opened this issue Jan 12, 2022 · 20 comments
Labels
usage question Configuration or other usage question

Comments

@WMAM
Copy link

WMAM commented Jan 12, 2022

Hi @daeh thank you so much for your support.

According to your request in the forum, I am attaching two MD files from my obsidian notes. One of them (the first one) is an old file, created from notes generated with Acrobat reader some months ago. The other is a newly created one with the latest beta version of Zotero (63).

@nimmoDielsAlderClick2011.md

@lindenmeyerSelfhealingBehaviourFuran2020.md

I am almost sure that this is probably a mistake from my side configuring the setup.

Thank you!

@daeh
Copy link
Owner

daeh commented Jan 12, 2022

hi @WMAM. For these files, you'll need to export your library in the BetterBibTex JSON format (File -> Export library, click Keep updated), and then provide the path to that json file in the ZoteroObsidianCitations preferences. The reason is that this plugin needs to map your BBT citekeys (e.g. nimmoDielsAlderClick2011) to the Zotero Item IDs or Zotero Item Keys.

The other option (supplying a regex in the Zotero Key RegEx setting) only works if the Zotero Item Keys are explicit in your MD notes. These take the form of zotero://select/library/items/ABCD1234, where ABCD1234 is a key that's generated under the hood by Zotero that you can't modify. The links in your MD notes use the BBT keys zotero://select/items/@mycitekey, so you'll need to provide a BBT JSON, which the plugin uses to map mycitekey to ABCD1234.

Have you tried exporting your library as a BBT JSON file?

image

@daeh daeh added the usage question Configuration or other usage question label Jan 12, 2022
@daeh
Copy link
Owner

daeh commented Jan 12, 2022

There is a feature I could add, but it would only work if

(1) you have turned the hidden BBT setting autoPinDelay on

OR

(2) all of the BBT citekeys in your MD notes are 'pinned' in Zotero.

When you pin a citekey, BBT add the citekey to the Extras field of the Zotero item, so I could potentially extract them from a Zotero search.

I recommend you try exporting your library as a BetterBibTex JSON, since it's pretty straight forward, but if (1) or (2) is true for you, and I can also look into adding the Extras field search as a feature.

@daeh
Copy link
Owner

daeh commented Jan 13, 2022

@WMAM I added this v0.0.8. Update the addons (Tools -> Add-ons -> Check for Updates) and see if the Find the BBT citekey in the Extra field option works for you.

@daeh daeh closed this as completed Jan 13, 2022
@WMAM
Copy link
Author

WMAM commented Jan 13, 2022

@daeh Following your suggestions ... After updating to version 0.8, I tried these two options:

  1. Pinning the citekeys in Zotero: it didn't work for me (setting the hidden autoPinDelay option to 2 seconds). Maybe I did not configure it correctly, but the citekeys appeared to be pinned in Zotero.

  2. I generated the BBT.json library, without removing the BBT.bib library (both active and auto-updated). If I only work with the BBT.json library, the obsidian.citation plugin doesn't work. This way your plugin works perfectly!

Thanks a lot!

@daeh
Copy link
Owner

daeh commented Jan 13, 2022

@WMAM So things are working for you now?

yes, for Option # 2, obsidian-citation needs the .bib export and this this plugin needs the .json, so you'll need both of those files.

If you're up for it, I'm curious why Option # 1 (pinning the citekeys) didn't work for you, so if you have a moment, please post the text in the Zotero Extra field of @nimmoDielsAlderClick2011 and @lindenmeyerSelfhealingBehaviourFuran2020 so I can look into it.

Thanks

@daeh daeh reopened this Jan 13, 2022
@daeh daeh closed this as completed Jan 13, 2022
@WMAM
Copy link
Author

WMAM commented Jan 13, 2022

Hi @daeh !
Sorry for being late with this... I have just tried the first option following these steps:

  1. Deleted these two notes from the vault and sync (just to untag them)
  2. Deleted the json library
  3. Mannually pinned the citekey In Zotero (the pin icon appeared and the citekey in the Extra field)
  4. Modified the setup of your plugin to activate the first option
  5. Syncronized

... and it worked!

@WMAM
Copy link
Author

WMAM commented Jan 13, 2022

I can work on this a little more if you want some other test.
I don't know why yesterday night it didn't work... may be now I have mannually pinned these citekeys?

@WMAM
Copy link
Author

WMAM commented Jan 13, 2022

I forgot to mention that the rest of the notes (not manually pinned), were untagged from the Zotero DB

@daeh
Copy link
Owner

daeh commented Jan 13, 2022

That's good to know! It sounds like the autoPin option isn't doing the same thing as manually pinning the citekeys. Only if you have the time, could you copy the text from the "Extra" field of a Zotero item that isn't manually pinned and paste it here (i.e one of the items that had the tag removed when you switched to Option 1)? I'm guessing that's the source of the issue.

@daeh daeh reopened this Jan 13, 2022
@WMAM
Copy link
Author

WMAM commented Jan 13, 2022

Yes, of course... but, I had deactivated the autoPinDelay from the hidden preferences...
Let me try to manually unpin these two items and reactivate the autoPinDelay

@daeh
Copy link
Owner

daeh commented Jan 14, 2022

only if it's easy -- no need to go out of your way, but it might be informative if I can see the Extra field text.

So it sounds like you can either stick with option 2 (using both the .bib and the .json), or manually pin your citekeys and use option 1. Seems like either way works for you, so it's just up to your preference.

@WMAM
Copy link
Author

WMAM commented Jan 14, 2022

Don't worry, I already did it!

  1. Manually unpinned these citekeys and untagged them
  2. Set the autoPinDelay to 4, and forced to update the library
    ... and nothing appears on the Extra field, even after closing Zotero.

I am suspecting there is something missing to auto update the pins

@daeh
Copy link
Owner

daeh commented Jan 14, 2022

ok. that's very informative, thank you. I'll assume things are working for you now but let me know if you have any more issues.

@daeh daeh closed this as completed Jan 14, 2022
@WMAM
Copy link
Author

WMAM commented Jan 14, 2022

So it sounds like you can either stick with option 2 (using both the .bib and the .json)

yes, I can survive with both archives, ha, ha, ha!

Thank you so much!

@WMAM
Copy link
Author

WMAM commented Jan 14, 2022

Sorry for disturbing you, but maybe this is relevant for you

I restored the .json library, the preferences to option #2, and synchronized (forgot to reset the autoPinDelay)... SURPRISE, I am now looking that all items with the ObsCite tag active have the citekey pinned and included in the Extra field!

imagen

imagen

@daeh
Copy link
Owner

daeh commented Jan 14, 2022

Good to know! I was suspicious that BBT was waiting for the item to be modified in order to update the Extra field. I bet that if you now switch back to option 1, the Citation Key: data will stay in the Extra field and when you add new items to Zotero, BBT will immediately add Citation Key: to the new items. So you might not need the .json from here on out.

@daeh daeh reopened this Jan 14, 2022
@WMAM
Copy link
Author

WMAM commented Jan 14, 2022

@daeh yes, you are right. I was just playing around and 4 seconds after a new item has been added, the citekey is pinned.

For items already in the Zotero library, once something is modified (a letter in any field or even a note is added to the item), the corresponding citekey is automatically pinned.

Yes, I will work with option #1.

BTW, it is interesting to be able to open a MD note from Zotero... Thanks!

@daeh
Copy link
Owner

daeh commented Jan 14, 2022

yep, thanks for confirming. #6 should be available soon.

@daeh daeh closed this as completed Jan 14, 2022
@daeh
Copy link
Owner

daeh commented Jan 14, 2022

fyi @WMAM , v0.0.9 has a contextual item to open the MD notes in obsidian. You can update from Zotero's Add-on menu

@WMAM
Copy link
Author

WMAM commented Jan 14, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
usage question Configuration or other usage question
Projects
None yet
Development

No branches or pull requests

2 participants