Closed marckcolina closed 1 year ago
Hi @marckcolina! It might be that you are trying to print the entire tag object which consists of the tag name and the type. You should be able to map over them to extract the names, for example, you might try something like this:
n += '\n\nTags: ' + data.tags.map(t => '#' + t.tag).join(', ') + '\n';
If that does not work, could you share the code example and data?
Hi frthjf. That worked perfectly.
I've tried something a lot more complicated, even if it worked at the end, but not pretty at all. It was something like that :
if (data.tags && data.tags.length == 1) { n += '#'+data.tags[0]['tag']; }
and to repeat for number of tags...
Have to say, that i know nothing at all in java language, i'm a social sciences researcher !
thank you very much
would you kindly help me with the necessary code to import the abstract as well ? Thanks in advance...
Fair enough!
You can find out how to access the data by switching to the View JSON data
option (see screenshot below).
For example, for the abstract you'll likely want abstractNote
, so something like this:
n += '\n\nAbstract: ' + data.abstractNote + '\n\n'
Dear frthjf, sorry to disturb you again. Do you know why some references from the same author don't get imported into Obsidian ? I'm having this issue with several articles. For exemple, in these images you'll see that i have two publications from "Motta" in Zotero, but in obsidian i only get one of them... Thank you in advance !
I am not sure, do both articles appear in the plugin settings?
As I can see, only one of them appears... The other one, (Motta, 2015) doesn't appear at all. And it is not the only case. You'll find the two articles in CSV attached in the case it helps... and thanks again...
I've added the reference, but I am afraid I can't reproduce the issue as it appears in my list.
One thing you could try is to write return data.key;
above everything else in the top-left editor and check if the key JWNW5RMY
and 45P2GC8J
are part of the list. If they are, then check the JSON view to see if data.creators
field is empty. The if (data.creators) {
means that any entries with a missing data.creators
are omitted.
Thanks ! Well, i've done all that. I found the issue. If the creator is not an "author" and at the top of the list in Zotero, the plugin omite it (in this case, first where the editors than the author).
I changed that in zotero and the reference came effectively into Obsidian...
Thanks again !
Ok great, glad you've found the issue.
Instead, there's another one. Institutional Authors are not imported (those with no difference between first and last name)... But i'll change them to normal author with no first name, that will fix the issue as well.
Hello ! I have tried to modify the template so the tags could be imported as the notes.
even if the number of tags come ok (i had 7 tags in a document and the number of references were ok in obsidian) the tags came empty, showing only « object » as reference for each… have you tried this before ? Any ideas ? Thanks !