logseq-citation-manager icon indicating copy to clipboard operation
logseq-citation-manager copied to clipboard

[Enhancement] parse zotero's {date} to extract {year}

Open kerim opened this issue 2 years ago • 6 comments

Testing Zotero, everything worked pretty well, except I had to change {year} to {date}. This makes sense, since that is what the file has (the Paperpile Bibtex has {year}), but it would be nice if one could just use {year} when the metadata in Zotero contains a full date, the same way you extracted {author lastname}.

For instance, with {date} I get

Friedman (2015-09-15) Exceptional States: Chinese Immigrants and Taiwanese Sovereignty

instead of

Friedman (2015) Exceptional States: Chinese Immigrants and Taiwanese Sovereignty

Which is what I'd want.

kerim avatar Jul 15 '22 23:07 kerim

+1 for this. I also had this issue. I figured out that you can add year manually to the bibtex file using custom post-scripting in BetterBibTex, but that's a lot of fussing around that many folks probably won't want to mess with.

jacobtfisher avatar Jul 26 '22 22:07 jacobtfisher

{year} already seems to work for me in my template. Give it a try?

carljoseph avatar Sep 26 '22 03:09 carljoseph

So I finally fixed this problem by switching from "Better BibLaTex" export to "Better BibTex" export. The latter includes "year" by default. Not sure if this will create any other problems, but at least I can have year without messing around, which is really important for my workflow.

kerim avatar Jan 15 '23 16:01 kerim

Any progress on extracting {year} from BibLaTex files that only have {date}?

kerim avatar Mar 12 '23 01:03 kerim

So I finally fixed this problem by switching from "Better BibLaTex" export to "Better BibTex" export. The latter includes "year" by default. Not sure if this will create any other problems, but at least I can have year without messing around, which is really important for my workflow.

Although the BibTex file has a field named 'year', citation manager still doesn't read it (field 'journal' as well)

tartakis avatar Oct 15 '23 21:10 tartakis

@jacobtfisher Would you mind sharing your post-processing script? I would like to fix this (and others as well) but I do not have the time to dig into Zotero's properties at the moment.

dazu89 avatar Jul 04 '24 21:07 dazu89