Skip to content

Instantly share code, notes, and snippets.

print('zotero-live-citations 7569117')
local mt, latest = pandoc.mediabag.fetch('https://retorque.re/zotero-better-bibtex/exporting/zotero.lua.revision')
latest = string.sub(latest, 1, 10)
if '7569117' ~= latest then
print('new version "' .. latest .. '" available at https://retorque.re/zotero-better-bibtex/exporting')
end
do
local _ENV = _ENV
print('zotero-live-citations bc894b4')
local mt, latest = pandoc.mediabag.fetch('https://retorque.re/zotero-better-bibtex/exporting/zotero.lua.revision')
latest = string.sub(latest, 1, 10)
if 'bc894b4' ~= latest then
print('new version "' .. latest .. '" available at https://retorque.re/zotero-better-bibtex/exporting')
end
do
local _ENV = _ENV
print('zotero-live-citations 4b9705e')
local mt, latest = pandoc.mediabag.fetch('https://retorque.re/zotero-better-bibtex/exporting/zotero.lua.revision')
latest = string.sub(latest, 1, 10)
if '4b9705e' ~= latest then
print('new version "' .. latest .. '" available at https://retorque.re/zotero-better-bibtex/exporting')
end
do
local _ENV = _ENV
print('zotero-live-citations 4b9705e')
local mt, latest = pandoc.mediabag.fetch('https://retorque.re/zotero-better-bibtex/exporting/zotero.lua.revision')
latest = string.sub(latest, 1, 10)
if '4b9705e' ~= latest then
print('new version "' .. latest .. '" available at https://retorque.re/zotero-better-bibtex/exporting')
end
do
local _ENV = _ENV
declare const Zotero: any
declare const location: any
export const is7 = (typeof location !== 'undefined' && location.search) ? ((new URLSearchParams(location.search)).get('is7') === 'true') : Zotero.platformMajorVersion >= 102
function clientname(): string {
if (typeof location !== 'undefined' && location.search) return (new URLSearchParams(location.search)).get('clientName')
// if (process.versions.node) return 'Zotero' // testing
if (Zotero.clientName) return Zotero.clientName as string
if (Zotero.BetterBibTeX?.clientName) return Zotero.BetterBibTeX.clientName as string
// class from https://gist.github.com/lentschi/3fcbf7f6894b11bee1eb3d6a832a84e6
/**
* Asyncronous iterable iterator for IndexedDB object stores or indexes
*
* @author Florian Lentsch <office@florian-lentsch.at>
* @license MIT
*
* ____________________________________________________________________________
* REQUIREMENTS: You may have to add "lib": ["esnext.asynciterable"] to
* your tsconfig.json - see https://stackoverflow.com/questions/43694281/ts2318-cannot-find-global-type-asynciterableiterator-async-generator?answertab=votes#tab-top
var CSL = require('citeproc')
var styleAsText = <contents of style.csl>
// Load your list of references
const references = {
item1: {
id: 'item1',
type: 'book',
title: 'Stuff',
{
"name": "tt",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "tap && echo success"
},
"author": "",
"license": "ISC",
import { createDB, createTable, insertMany, many } from "blinkdb";
import loki from "lokijs";
import { Bench } from "tinybench";
import charsJson from "./config2.json";
charsJson.forEach((char, i) => char.id = i)
interface Char {
id: number;
u: string;
import { createDB, createTable, insertMany, many } from "blinkdb";
import loki from "lokijs";
import { Bench } from "tinybench";
import charsJson from "./config2.json";
charsJson.forEach((char, i) => char.id = i)
interface Char {
id: number;
u: string;