Skip to content

Instantly share code, notes, and snippets.

@retorquere
retorquere / xul.js
Last active December 1, 2022 07:27
module.exports = function(doc, root, tr) {
const prefpane1 = root.appendChild(doc.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', "prefpane"));
prefpane1.setAttribute("id", 'zotero-prefpane-better-bibtex');
prefpane1.setAttribute("label", tr["better-bibtex.Preferences.prefpane.better-bibtex"] || "better-bibtex.Preferences.prefpane.better-bibtex");
prefpane1.setAttribute("image", "chrome://zotero-better-bibtex/skin/bibtex.svg");
prefpane1.setAttribute("helpTopic", "BetterBibTeX");
const popupset1 = prefpane1.appendChild(doc.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', "popupset"));
const tooltip1 = popupset1.appendChild(doc.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', "tooltip"));
tooltip1.setAttribute("id", 'tooltip-bibtexURL');
const description1 = tooltip1.appendChild(doc.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', "descript
<prefwindow id="zotero-prefs" title="Sync" onload="Zotero_Preferences.init()" onunload="Zotero_Preferences.onUnload()" ondialoghelp="Zotero_Preferences.openHelpLink()" windowtype="zotero:pref" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" lastSelected="zotero-prefpane-sync" screenX="594" screenY="127" chromehidden="menubar location directories status extrachrome " dlgbuttons="accept,cancel" persist="lastSelected screenX screenY" closebuttonlabel="Close" closebuttonaccesskey="C" role="dialog" defaultButton="accept" animated="false"><prefpane id="zotero-prefpane-general" label="General" image="chrome://zotero/skin/prefs-general.png" src="chrome://zotero/content/preferences/preferences_general.xul"/><prefpane id="zotero-prefpane-sync" label="Sync" image="chrome://zotero/skin/prefs-sync.png" src="chrome://zotero/content/preferences/preferences_sync.xul" onpaneload="Zotero_Preferences.Sync.init()" helpTopic="sync" selected="false"><preferences><preference id="pref-sync-autosync" name="exte
@retorquere
retorquere / merge
Created March 2, 2022 16:53
merge CSL styles
#!/usr/bin/env python3
import sys
from pathlib import Path
import xml.etree.ElementTree as ET
namespaces = {'csl': 'http://purl.org/net/xbiblio/csl'}
ET.register_namespace('', namespaces['csl'])
inline = ET.parse(sys.argv[1])
{
"translatorID": "f4a4148e-990c-45fb-a25f-579e90dfbcd7",
"label": "BlaBla Export",
"creator": "Emiliano Heyns",
"target": "xml",
"minVersion": "5.0.0",
"maxVersion": null,
"priority": 50,
"inRepository": false,
"translatorType": 2,
{
"translatorID": "f4a4148e-990c-45fb-a25f-579e90dfbcd7",
"label": "BlaBla Export",
"creator": "Emiliano Heyns",
"target": "xml",
"minVersion": "5.0.0",
"maxVersion": null,
"priority": 50,
"inRepository": false,
"translatorType": 2,
<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="in-text" version="1.0" demote-non-dropping-particle="never" page-range-format="expanded">
<!-- This style was edited with the Visual CSL Editor (https://editor.citationstyles.org/visualEditor/) -->
<info>
<title>Zotero Citation Columns</title>
<id>http://www.zotero.org/styles/zotero-cite-columns</id>
<!-- link href="http://www.zotero.org/styles/zotero-cite-columns" rel="self"/>
<link href="https://github.com/retorquere/zotero-citation-columns" rel="documentation"/ -->
<author>
<name>Brenton M. Wiernik</name>
This file has been truncated, but you can view the full file.
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE itemTypes ( itemTypeID INTEGER PRIMARY KEY, typeName TEXT, templateItemTypeID INT, display INT DEFAULT 1 );
INSERT INTO itemTypes VALUES(1,'note',NULL,0);
INSERT INTO itemTypes VALUES(2,'book',NULL,2);
INSERT INTO itemTypes VALUES(3,'bookSection',2,2);
INSERT INTO itemTypes VALUES(4,'journalArticle',NULL,2);
INSERT INTO itemTypes VALUES(5,'magazineArticle',NULL,2);
INSERT INTO itemTypes VALUES(6,'newspaperArticle',NULL,2);
INSERT INTO itemTypes VALUES(7,'thesis',NULL,1);
{
"translatorID": "25f4c5e2-d790-4daa-a667-797619c7e2f2",
"label": "CSV",
"creator": "Philipp Zumstein and Aurimas Vinckevicius",
"target": "csv",
"minVersion": "3.0",
"maxVersion": "",
"priority": 100,
"displayOptions": {
"exportCharset": "UTF-8xBOM",
#!/usr/bin/env python3
import scrapy
from scrapy.pipelines.files import FilesPipeline
from scrapy.exceptions import CloseSpider
import sys
import os
ITEM_PIPELINES = {'SoundZipPipeline': 1}
@preamble{
\newcommand{\mnras}{Monthly Notices of the Royal Astronomical Society}
}
@ARTICLE{2019MNRAS.489..962H,
author = {{Howard}, A.~D.~P. and {Whitworth}, A.~P. and {Marsh}, K.~A. and {Clarke}, S.~D. and {Griffin}, M.~J. and {Smith}, M.~W.~L. and {Lomax}, O.~D.},
title = "{L1495 revisited: a PPMAP view of a star-forming filament}",
journal = {\mnras},
keywords = {stars: formation, dust, extinction, ISM: structure, submillimetre: ISM, Astrophysics - Astrophysics of Galaxies},
year = 2019,