Bibtex (bibdesk) import preserve 'Date-Modified' and 'Date-Added'
I've just begun the process of importing a large set of libraries I've been managing with bibdesk to Zotero. The only missing piece seems to be the lack of integration on the fields for 'Date-Modified' and 'Date-Added'. These are really pretty important for my workflow, as I use date to parse out which stage of research I've added items to a library. Has anyone seen work done towards this before? I've trawled github, forums and elsewhere and come up blank. Seems like this could be achieved by modifying a translation file...
Yeah, it'd be possible, but it'd be hella ugly. I'd have to either patch the save methods for translator items, or remember which items I imported, and find and patch them after the import has finished. The latter seems way too fragile, and the former... I'm trying to minimize the number of runtime patches I install these days, as it's way too easy to destabilize Zotero this way. Zotero actively removes these dates from the import items. Preferably that would just be either removed or made optional.
I appreciate the syncing issue but I don't yet have a database to sync. Perhaps the solution would be a separate tool to update the added and modified dates to match the tex.date-added and tex.date-modified extra fields left by the BBT importer?
But now that we have an options window for imports, this should really just be an option there. I've created an issue to track this.
Can I detect in the plugin whether an item has been synced? Back-dating for not-yet-synced items would be safe then I take it?
An item that has been synced before would have a .version > 0.
currently, I am trying to import a Papers 3 library to Zotero for Mac, and I would like to retain the original "date-added" date from my old library.
As recommended by @emailianoeheyns (many thanks!) in this discussion, I have downloaded BBT, then imported my old Papers 3 library and attempted to use the "patchDates" hidden preference to change the "Date Added" info in Zotero to the original date of my old Papers 3 library.
As described at the patchDates hidden preferences info (https://retorque.re/zotero-better-bibtex/installation/preferences/hidden-preferences/#patchdates), I have entered the command "tex.dateadded=dateadded, tex.datemodified=datemodified" (alternatively, I also tried "tex.date-added=dateadded, tex.date-modified=datemodified") at "extensions.zotero.translators.better-bibtex.patchDates" in the Config Editor.
However, when I then select the BetterBibTeX command "Copy date-added/date-modified from extra field" from the BBT menu, I only get the error message "Better BibTeX: could not parse field mapping tex.date-added=dateadded, tex.date-modified=datemodified".
In the extra field from which I want to retrieve the original information, the date-added resp. date-modified info reads as: "tex.date-added: 2020-07-20T15:15:36GMT, tex.date-modified: 2020-07-20T15:34:24GMT", however even if I change the date and time formats (e.g. DD/MM/YYYY HH:MM:SS, etc.), the error message "could not parse field mapping" remains.
Any help would be greatly appreciated! I have been trying in vain for hours to solve this problem.
patchDates. An upcoming releases eases that requirement. You can also just leave it empty, because
tex.date-added=dateadded,tex.date-modified=datemodifiedis always active.
The date-added/modified" command in the BBT menu worked like a charm after changing "tex.date-added" resp. "tex.date-modified" in the extra field to "tex.dateadded" resp. tex.datemodified" and getting rid of the exact time info.
Yes, I made these edits in the "extra" field before running the "Copy date-added/date-modified from extra field" command.
I now have reported my problems on github. When I hear back from them, I will post it here.
In this case allow me to thank you here for your fast help on github (cf. https://github.com/retorquere/zotero-better-bibtex/issues/2275)!
I briefly tested the test build you provided there, and the "date-added" info from the extra field can be copied without having to make any prior changes.
Sorry to reopen this discussion (again).
I'm having trouble with the solutions described above. I've tried changing the hidden preferences patchDates as stated both above and on your website (https://retorque.re/zotero-better-bibtex/installation/preferences/hidden-preferences/#patchdates). Yet upon import it's still adding with today's date instead of the old one.
Here are the settings I've tried last : tex.date-added=dateadded,tex.date-modified=datemodified
After the import here is an example of the tex infos that goes in extra :
Citation Key: Eysenbach2011
tex.date-added: 2019-12-05 18:50:15 +0100
tex.date-modified: 2019-12-05 18:50:24 +0100
tex.journal: Journal of medical Internet research
I'm not sure what I'm doing wrong here ! May I ask for your assistance ?
PS : out of curiosity, I don't understand the pin symbol next to the generated citation keys. I don't see them when importing from the connector. What do they mean ?
When importing from the connector, no such citation key is present to preserve, so those entries get a dynamic key, which does derive from the item fields. You can pin their key by right-clicking the item and choosing "Better BibTeX -> Pin citation key", or by adding a "citation key: [something]" in the extra field (which "pin citation key" automates for you, but it's the same thing).
Also thanks for all the plugins you've contributed, being almost done with my setup I can see I'm relying on several of yours !