Help writing a export translator
I am writing a translator to export a few item fields in a format that would work with a Dataview plugin in Obsidian. I'm not an expert and can only work from existing examples. I have two problems:
1. I am converting the Date field like this:
For items with year/month/day date, I end up with YYYY-MM-DD (this is what I need). But for books I get only YYYY. How do I get from YYYY to YYYY-MM-DD? For example, I need to get from 1996 to 1996-01-01
2. I can only export the first author because I modified the code included here: https://github.com/silentdot/zotero-markdown-translator/releases
But I need to export all authors for each item. Where can I get the code for the loop to get all authors?
Thanks!
1. I am converting the Date field like this:
var date = "Date:: " + Zotero.Utilities.strToISO(item.date) + "\n";
For items with year/month/day date, I end up with YYYY-MM-DD (this is what I need). But for books I get only YYYY. How do I get from YYYY to YYYY-MM-DD? For example, I need to get from 1996 to 1996-01-01
2. I can only export the first author because I modified the code included here: https://github.com/silentdot/zotero-markdown-translator/releases
But I need to export all authors for each item. Where can I get the code for the loop to get all authors?
Thanks!
let isodate = ZU.strToISO(item.date);
if (isodate.length == 4) {
isodate += "-01-01"
} else if (isodate.length == 7) {
isodate += "-01"
}
"Date:: " + isodate + "\n";
Tbc