Skip to content

Instantly share code, notes, and snippets.

View cneud's full-sized avatar
🐙

Clemens Neudecker cneud

🐙
View GitHub Profile
@cneud
cneud / fix_sbb.sh
Created March 16, 2016 16:06
Fix for issues with corrupted files and wrong file locations in SBB newspapers
#!/bin/bash
echo "\nCreating missing directories for SBB_NAZ\n"
mkdir SBB_NAZ/1930/
mkdir SBB_NAZ/1929/
mkdir SBB_NAZ/1928/
mkdir SBB_NAZ/1927/
mkdir SBB_NAZ/1926/
mkdir SBB_NAZ/1925/
mkdir SBB_NAZ/1925/
mkdir SBB_NAZ/1924/

Keybase proof

I hereby claim:

  • I am cneud on github.
  • I am cneud (https://keybase.io/cneud) on keybase.
  • I have a public key ASAd6dmUN_e1NQBj1wzhFDYI1KdDf5APrXq83uxsdqiWMwo

To claim this, I am signing this object:

@cneud
cneud / index.html
Last active June 15, 2017 14:26
DFG Zeitungsdigitalisierung Wegweiser Workflow interaktiv
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8">
<meta name=viewport content="width=device-width, initial-scale=1">
<title>Digitalisierung historischer Zeitungen</title>
<style type="text/css">body,button{font-family:Verdana}.tooltip,button{display:inline-block}body{margin:auto;width:90%}p{text-align:justify}button{background-color:#fff;color:#000;width:185px;border:2px solid #87CEEB;padding:16px 32px;margin-left:32px;text-align:center;text-decoration:none;font-size:16px;border-radius:12px;-webkit-transition-duration:.4s;transition-duration:.4s}button:focus,button:hover{background-color:#87CEEB;outline:0!important;color:#fff}.container{width:100%;margin:0 auto}.frame{margin:0 auto;width:1120px;background-color:white}.left_column{float:left;width:23%}.right_column{background-color:#F0F0F0;float:left;width:71%;text-align:left;padding-left:10px;padding-right:10px}.header{text-align:center}.footer{text-align:right;clear:both}.code{font-family:Courier}.tooltip{position:relative;border-bottom:1px
@cneud
cneud / sbb.api.doc.md
Last active October 8, 2018 16:52
SBB API docs

APIs of the Staatsbibliothek zu Berlin - Preußischer Kulturbesitz*

*(to the extent currently implemented)

Programmatic access to the digitised collections and digitised newspapers of the Staatsbibliothek zu Berlin - Preußischer Kulturbesitz (SBB) is currently possible via two distinct APIs.

Retrieval of metadata for objects in the digitised collections is established by use of the The Open Archives Initiative Protocol for Metadata Harvesting (OAI-PMH) standard. A wide range of client applications for OAI-PMH in numerous programming languages are freely available on the web.

The base URL for the OAI-PMH endpoint of the digitised collections of the SBB is

@cneud
cneud / voyant_this.html
Last active November 22, 2017 20:52
Voyant embedder
<html>
<head>
<title>Voyant This!</title>
<style type=text/css>
body {
text-align: center;
}
input[value] {
font-family: Verdana;
@cneud
cneud / ocros.md
Last active August 23, 2019 15:56
@cneud
cneud / hocr2text.bat
Created August 22, 2018 16:28
hocr to text conversion on Windows
FOR /R %%G IN (*.hocr) DO java -jar saxon9he.jar -s:"%%G" -xsl:hocr2text.xsl -o:"%%~nG.txt"
@cneud
cneud / pdf2tif.bat
Created August 22, 2018 16:29
PDF to TIF conversion for OCR on Windows (using imagemagick & ghostscript)
convert -density 300 -depth 8 -alpha Off -limit area 1 foo.pdf foo_%04d.tif
@cneud
cneud / gcvocr.py
Created May 11, 2019 00:38
Google Cloud Vision OCR Python
#!/usr/bin/env python
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
// jQuery arrow keys + escape key + enter key
$(document).keydown(function(e) {
switch(e.which) {
case 13: // enter
break;
case 27: // escape
break;