From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QEewJ/EklWC0NgEAgWs5BA (envelope-from ) for ; Fri, 07 May 2021 13:30:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id oE9HI/EklWC0CgAAbx9fmQ (envelope-from ) for ; Fri, 07 May 2021 11:30:57 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B89A219A93 for ; Fri, 7 May 2021 13:30:55 +0200 (CEST) Received: from localhost ([::1]:57422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1leyh3-0008Jq-42 for larch@yhetil.org; Fri, 07 May 2021 07:30:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:43172) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leygU-0008Jk-Mp for emacs-orgmode@gnu.org; Fri, 07 May 2021 07:30:19 -0400 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:43489) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1leygR-00084j-KF for emacs-orgmode@gnu.org; Fri, 07 May 2021 07:30:18 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 7201A5C018C; Fri, 7 May 2021 07:30:13 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 07 May 2021 07:30:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= from:to:cc:subject:date:message-id:mime-version:content-type; s= fm3; bh=ZbK9lbu7L+/i9uLEHljSAoVjgOuwqNv9OvZJCvjasiE=; b=hQ/6/YGR fA6dBXFEs2DtGfvxXLieYPSWeeGvblTjKMb7Gd43a6/L9jWQPsggf0muVHZ7dIso wCvlWOFXB1MEq0BMd364l7OxzZKcBtkjI1aRDVxq/2K4XJCXNDzEi/m1XhnFevXH UIfaFS7RW7Sal7iPeYtRVtGtFX//VaB85Cx0jh3/EL+d6dBDxf8++4LJHCjAem5O pKv7nxpMdgJMpIL3OziuaSqIFB7v7veyRLF0X1puilwi6oZLLAlIBH+6sVtwZieC VBN/3nbFeCjkDpYNrWbFleeRLVR8hP5ZVJnLvvkbBrv/yUkboM0rhXFf1PsW7sXQ 1QN6kzoXWs8a5A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:message-id :mime-version:subject:to:x-me-proxy:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm2; bh=ZbK9lbu7L+/i9uLEHljSAoVjgOuwq Nv9OvZJCvjasiE=; b=i/o+eP/gb5TgcBtipTOB6Fjw1WuwNrts0y+mtKQnoBZLZ tIPw10pQqPwjHpBRrDpxBheQzXomvMW7QfcxLbfcqt4KTRtJPxabGojEDrKEKAV4 5HJDgSvMZpsm1peL6bdYEuKJHzRiJHpoH0aT1j0o1FseEW/HirZzm/91ThcTxlms MuafjJclfkPOuLtHjM5Ni7dgORp5Jbaqiq9hn0l8eZZ673d8z//WknnylY+x9hV7 RjoYpCDfw0QoSfm+LByMUSDTZARxDoA9htsio4LP0czXrw3e6maqkFVHmdRJjby5 ibKdwekkb0ralnH1zC1K8lKGTaOghWOTgisH6ucQA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrvdegvddggedtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfgfhvffufffkgggtsehttdertddtredtnecuhfhrohhmpeflohhoshhtucfm rhgvmhgvrhhsuceojhhoohhsthhkrhgvmhgvrhhssehfrghsthhmrghilhdrfhhmqeenuc ggtffrrghtthgvrhhnpeetvdelueehffevvdetjedvieehtddviedvtdfgheehieejhfdt vddufeevudfgjeenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeefuddrud ejrddvhedurdduleelnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghi lhhfrhhomhepjhhoohhsthhkrhgvmhgvrhhssehfrghsthhmrghilhdrfhhm X-ME-Proxy: Received: from Lenovo.fastmail.com (ip1f11fbc7.dynamic.kabel-deutschland.de [31.17.251.199]) by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 7 May 2021 07:30:12 -0400 (EDT) User-agent: mu4e 1.5.12; emacs 27.2 From: Joost Kremers To: Org Mode List Subject: CSL-JSON support for =parsebib= Date: Fri, 07 May 2021 11:17:13 +0200 Message-ID: <87fsyy6at8.fsf@fastmail.fm> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=66.111.4.27; envelope-from=joostkremers@fastmail.fm; helo=out3-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: malsburg@posteo.de Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1620387057; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=ZbK9lbu7L+/i9uLEHljSAoVjgOuwqNv9OvZJCvjasiE=; b=QQrb3vaQRC2Up5khl997CJs5eN5OeXiBsumqJD+Hs/95dbwySnjwxlQ01lDoUICYU1MBVP MRJSeTvn54ew9mofiRKA9j5/dYWfgr6K0B+vlVkp7fBQhvTCfoPWsnc/Z1PVDL+MsMI71T CNJx53A+RC907gMoKsK+YGF/wXRuN6zUrNQxkvHajxIGuhTr+VFleu5NxcFnrNVhuv2zCQ ZxGLK/g8FviyxowJJ3skTwaONWnSGyMQ8s+PDMhYOyRh7kpxdyJBAGAoJSdfEU42Pci/oZ 0qtzdKzdXX9h0K++QZ+eidg//GZ6Od/NjnlO+VZt5oDv85a5jWTtIiCTBGgSvg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1620387057; a=rsa-sha256; cv=none; b=saYt4866cfMXy5tbzVyuKB31ZEItx7KUfnI0Kf1UY2NTAjSWoGbC5Sahfz/WlO9YId49de nUE9/4ovpkjY5xX4PtbodJ5x/C/ewolsa3sl8RJ+jVi3cJYE4XFh0CvZNhAYJ9Vkw7sBSL H8JNlrDDEc7S3VXbfPX7JfkMEKDp/1maRG3VE1Qqx1UZ6joEdMeiYvGSAuDYwu0vy3IDFz XdKqNbrxSV2ufX164BhcQGvkq/HCod7GIxcVC6r/T//4Sf+frQ17EvCs7bOwTc8m3+WkA7 Dps70ILfYEg82mhS/ugrulg9vK/7tDr4IfnZ/qIKrpi/KfbtvVUsTb2e1j3zfw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=fastmail.fm header.s=fm3 header.b="hQ/6/YGR"; dkim=pass header.d=messagingengine.com header.s=fm2 header.b="i/o+eP/g"; dmarc=pass (policy=none) header.from=fastmail.fm; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Spam-Score: -1.65 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=fastmail.fm header.s=fm3 header.b="hQ/6/YGR"; dkim=pass header.d=messagingengine.com header.s=fm2 header.b="i/o+eP/g"; dmarc=pass (policy=none) header.from=fastmail.fm; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Migadu-Queue-Id: B89A219A93 X-Spam-Score: -1.65 X-Migadu-Scanner: scn0.migadu.com X-TUID: 1Vy0mxw8+V3Z 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 =( . )= pairs, where both == and == are strings. A CSL-JSON entry is returned as an alist, but the == 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