emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Re: CSL-JSON support for =parsebib=
@ 2021-05-08 11:57 Denis Maier
  0 siblings, 0 replies; 11+ messages in thread
From: Denis Maier @ 2021-05-08 11:57 UTC (permalink / raw)
  To: andras.simonyi, emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 125 bytes --]

Hi,well, this is what I asked Joost in the first place. Adjusting parsebib is part of the efforts to make that possible.Denis

[-- Attachment #2: Type: text/html, Size: 334 bytes --]

^ permalink raw reply	[flat|nested] 11+ messages in thread
* CSL-JSON support for =parsebib=
@ 2021-05-07  9:17 Joost Kremers
  2021-05-07 11:52 ` Bruce D'Arcus
  2021-05-07 12:29 ` Titus von der Malsburg
  0 siblings, 2 replies; 11+ messages in thread
From: Joost Kremers @ 2021-05-07  9:17 UTC (permalink / raw)
  To: Org Mode List; +Cc: malsburg

Hi,

[Cc-ing Theo von der Malsburg]

Now that Org is getting support for Citeproc, it could be useful to add support
for the CSL-JSON format for bibliographic data to Emacs. Therefore, after a
friendly request from Denis Maier, I have added support for this format to the
=parsebib= library.

Since =parsebib= is used by =bibtex-completions=, which in turn is used by
=bibtex-actions=, =helm-bibtex=, =ivy-bibtex=, =org-ref= and =org-roam-bibtex=,
this is a first step in making bibliographic data in =.json= format directly
available to Org users, without the need of any BibTeX conversion.

[Boy, look at me doing the marketing speak! :D ]

Anyway, this really is the first step. =bibtex-completion= will need to be
modified in order to make use of the new functionality, and the same may be true
of the packages based on it.

At this point, the new code isn't merged into =master= yet. It is available in
the =wip/csl= branch of =parsebib='s Github repo:

https://github.com/joostkremers/parsebib/tree/wip/csl

The README has most of the details. I appreciate any and all comments,
suggestions and tips.

For those maintaining packages based on =parsebib=, I have at least one
question: currently, =parsebib= returns a BibTeX entry in the form of an alist
of =(<field> . <value>)= pairs, where both =<field>= and =<value>= are strings.
A CSL-JSON entry is returned as an alist, but the =<field>= names are symbols,
not strings.

It would be extremely impractical to return the JSON data with strings as field
names, because the JSON parsing libraries in Emacs return symbols, so converting
them would take time. Plus, those libraries also expect symbols when serialising
Elisp data to JSON. (Which I intend to make use of in Ebib later on.)

It would be easier to modify the BibTeX output to return field names as symbols.
I originally chose strings, because that's what =bibtex.el= uses, making it a
little easier to integrate with it.

So the question: would it be helpful to make this change to the BibTeX data, so
that the data from both sources uses the same format? Or would it be better to
keep it as it is, even if that means that BibTeX data and JSON data isn't
compatible?

TIA

Joost


-- 
Joost Kremers
Life has its moments


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-05-08 15:54 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08 11:57 CSL-JSON support for =parsebib= Denis Maier
  -- strict thread matches above, loose matches on Subject: below --
2021-05-07  9:17 Joost Kremers
2021-05-07 11:52 ` Bruce D'Arcus
2021-05-07 12:29 ` Titus von der Malsburg
2021-05-07 12:34   ` Joost Kremers
2021-05-07 13:33     ` Titus von der Malsburg
2021-05-07 14:47       ` Joost Kremers
2021-05-07 16:22         ` Titus von der Malsburg
2021-05-08  9:51           ` András Simonyi
2021-05-08 15:51             ` Joost Kremers
2021-05-07 13:03   ` Bruce D'Arcus

Code repositories for project(s) associated with this inbox:

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).