I might also want to explain what we did about moving from Zotero, where
Morgan originally managed her citations, over to a more
Racket/Scribble-centric approach. This was motivated by Zotero breaking
in some mysterious way between Debian releases and us shrugging our
shoulders and saying "ok, let's just define this in Racket-land".
- I wrote some code that walked through the Zotero XML export to write
out some Racket code that represented the citations instead. It's
pretty gnarly.
- The outputted citations look like:
(define-bibitem Piranomonte2002
(ref-type "Book")
(contributors
(authors
(author "Piranomonte, Marina.")))
(titles (title "Il santuario della musica e il bosco sacro di Anna Perenna"))
(dates (year "2002") (pub-dates (date "2002")))
(pub-location "Milano")
(publisher "Electa")
(isbn "88-370-2126-7 978-88-370-2126-9")
(remote-database-name "
http://worldcat.org")
(language "Italian"))
(define-bibitem Pensabene-et-al2001
(ref-type "Book")
(contributors
(authors
(author "Pensabene, Patrizio.")
(author "Falzone, Stella.")
(author "Angelelli, Claudia.")))
(titles
(title
"Scavi del Palatino I : l'area sud-occidentale del Palatino tra l'età protostorica e il IV secolo a.C., scavi e materiali della struttura ipogea sotto la cella del Tempio della Vittoria"))
(dates (year "2001") (pub-dates (date "2001")))
(pub-location "Roma")
(publisher "\"L'Erma\" di Bretschneider")
(isbn "88-8265-119-3 978-88-8265-119-0")
(remote-database-name "
http://worldcat.org")
(language "Italian"))
So basically we converted the entire Zotero file over like this, and
Morgan then started maintaining this Racket file instead for her
Bibliography instead.
- The above "citations" include a bunch of fields that don't always
exist in Scribble's system (eg "language" or "isbn" above). These
are actually then stored in an sxml-like alist for now (for
historical intermediate purposes of converting from the Zotero stuff
to this) but a different structure would be better.
- I then have utilities like "record-sxml->bib-entry" that convert
these sxml'ish structures over to a bib entry... it's a lossy
conversion, but this allows Morgan to maintain fields she needs that
aren't currently handled by Scribble's bibliography tools.
It's a mess, but it does work and did provide us a path from Zotero ->
maintaining stuff directly in Racket. Of course the main problems right
now are that converting to bib-entry is lossy / doesn't render to the
right format, but the fact that we still have the data before that
conversion means we can just swap out that code once we have something
better.
I'm posing this not as "this is the right way to do it" but as an
opening for a conversation... especially in that right now, the auto-bib
struct makes some very specific assumptions about what fields are
available:
(define-struct auto-bib (author date title location url note is-book? key specific))
The right solution is to provide something more open-ended / extensible
to the needs of the particular domain the user is coming from.
This is what makes me unsure about how to convert scriblib's existing
code... it's making a lot of assumptions. How to un-assume? I'm not
sure yet though.
Thoughts welcome, of course.