CSL YAML import translator
It would be nice if Zotero could import pandoc-style CSL YAML in addition to CSL-JSON. BBT has implemented a CSL YAML export translator. @emilianoeheyns
---
references:
- id: WackernagelTrackingecologicalovershoot2002
accessed:
- year: 2013
month: 12
day: 29
author:
- family: Wackernagel
given: Mathis
- family: Schulz
given: Niels B.
- family: Deumling
given: Diana
- family: Linares
given: Alejandro Callejas
- family: Jenkins
given: Martin
- family: Kapos
given: Valerie
- family: Monfreda
given: Chad
- family: Loh
given: Jonathan
- family: Myers
given: Norman
- family: Norgaard
given: Richard
- family: Randers
given: Jørgen
container-title: Proceedings of the National Academy of Sciences
container-title-short: PNAS
DOI: 10.1073/pnas.142033699
ISSN: 0027-8424, 1091-6490
issue: '14'
issued:
- year: 2002
month: 7
day: 9
language: en
page: 9266-9271
source: www.pnas.org
title: Tracking the ecological overshoot of the human economy
type: article-journal
URL: http://www.pnas.org/content/99/14/9266
volume: '99'
...
https://github.com/zotero/translators/blob/master/CSL JSON.js#L107
I don't know if there's an easy JS way to convert YAML to JSON? If so, that might be a better way to write a translator than to code it from scratch.
- there is a pandoc-specific date format that is slightly different
- the rich-text fields will probably be markdown, although it can be HTML (as HTML is valid markdown)
YAML is a really icky format to parse, you would most def want to use js-yaml. I can probably adjust the BBT CSL YAML translator to import it.