Skip to content

Instantly share code, notes, and snippets.

@zuphilip
zuphilip / hocr-printspace
Last active September 3, 2016 16:02
hocr-tools extension finding the print space of a page w/o margin notes
#!/usr/bin/env python
# Find the print space of a page, without margin notes
import sys,os,string,re
from lxml import html
import argparse
from PIL import Image, ImageDraw
def get_prop(node,name):
@zuphilip
zuphilip / 0277-zeitschrift-fur-bibliothekskultur.csl
Created August 19, 2016 20:56
CSL Zitierstil für 027.7 Zeitschrift für Bibliothekskultur
<?xml version="1.0" encoding="utf-8"?>
<style class="in-text" version="1.0" demote-non-dropping-particle="never" default-locale="de-CH" xmlns="http://purl.org/net/xbiblio/csl">
<info>
<title>027.7 Zeitschrift für Bibliothekskultur</title>
<id>http://www.zotero.org/styles/0277-zeitschrift-fur-bibliothekskultur</id>
<link rel="self" href="http://www.zotero.org/styles/0277-zeitschrift-fur-bibliothekskultur"/>
<link href="http://www.zotero.org/styles/deutsche-sprache" rel="template"/>
<link xml:lang="de" href="http://0277.ch/ojs/index.php/cdrs_0277/about/submissions#authorGuidelines" rel="documentation"/>
<author>
<name>Philipp Zumstein</name>
@zuphilip
zuphilip / Embedded Metadata.js
Created August 21, 2016 19:46
EM translator withouth doc.location
{
"translatorID": "951c027d-74ac-47d4-a107-9c3069ab7b48",
"label": "Embedded Metadata",
"creator": "Simon Kornblith and Avram Lyon",
"target": "",
"minVersion": "3.0.4",
"maxVersion": "",
"priority": 400,
"inRepository": true,
"translatorType": 4,
@zuphilip
zuphilip / rvk-suggestions.json
Last active September 15, 2016 15:29
RVK Suggestions from DDC, SW
[
{
"system" : "DDC",
"notation" : "511.6",
"suggestions" : "SK 170",
"confidence" : 1
},
{
"system" : "SW",
"notation" : "Kombinatorik",
@zuphilip
zuphilip / oadoi.xml
Last active October 22, 2016 09:07
oaDOI Open Search Description for Zotero
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>oaDOI</ShortName>
<Description>Alternative Open Access DOI Resolver</Description>
<Image width="64" height="64" type="image/png">http://oadoi.org/static/img/favicon.png</Image>
<Url type="text/html" method="GET"
xmlns:z="http://www.zotero.org/namespaces/openSearch#"
template="http://oadoi.org/{z:DOI}"/>
</OpenSearchDescription>
@zuphilip
zuphilip / advertise-oadoi.html
Last active October 22, 2016 09:08
Link to oaDOI.xml
<!DOCTYPE html>
<html>
<head>
<link rel="search" type="application/x-openurl-opensearchdescription+xml" title="oaDOI Lookup" href="https://gist.githubusercontent.com/zuphilip/ad1264ba10aa79aee5a21daf9b72b574/raw/6e79b7f264e600bc5e2e37b799745379d371cbc4/oadoi.xml">
</head>
<body>
Select "Add oaDOI" from the Locate menu to add the oaDOI lookup engine.
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<link rel="search" type="application/x-openurl-opensearchdescription+xml" title="oaDOI Lookup" href="/zuphilip/ad1264ba10aa79aee5a21daf9b72b574/raw/6e79b7f264e600bc5e2e37b799745379d371cbc4/oadoi.xml">
</head>
<body>
Select "Add oaDOI" from the Locate menu to add the oaDOI lookup engine.
</body>
</html>
@zuphilip
zuphilip / csl-template-details.xq
Created November 19, 2016 13:08
Template structure of CSL styles
for $style in db:open("csl-styles")
for $link in $style//*:link[@rel='template']
return <statement>{data($style//*:info/*:id)} uses {data($link/@href)}</statement>
@zuphilip
zuphilip / csl-template.xq
Created November 21, 2016 06:39
Count the number of times a CSL-style is used as a template of another
for $style in db:open("csl-styles")
group by $href := ($style//*:link[@rel="template"]/@href)[1]
order by -count($style)
return <link count="{ count($style) }" href="{ $href }"/>
@zuphilip
zuphilip / citavi-project.xml
Created November 25, 2016 19:24
Dies ist der Inhalt eines Citavi Projektes als Sicherungskopie (ctv5bak) abgelegt, entpackt und zu einer XML-Datei unbenannt.
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="utf-8"?>
<CitaviExchangeData Version="5.4.0.2" FilePath="C:\Users\zumstein\Desktop\citavi-projekt\citavi-projekt.ctv5" Changeset="170">
<ProjectSettings>
<AutoSave>true</AutoSave>
<AttachmentsFolderPath></AttachmentsFolderPath>
<CacheId>7e60b160-8057-41b1-a8b2-5de485d35353</CacheId>
<ColorScheme>Yellow</ColorScheme>
<CustomFields>
<CustomFieldSettings>
<CompareType>Text</CompareType>