Skip to content

Instantly share code, notes, and snippets.

View nichtich's full-sized avatar
🦊
not a fox

Jakob Voß nichtich

🦊
not a fox
View GitHub Profile
@nichtich
nichtich / skosc2csv.pl
Created January 7, 2011 14:54
Create CSV overview of a SKOS classification
#!/usr/bin/perl
use strict;
use warnings;
use utf8;
=head1 NAME
skosc2csv.pl - Create CSV overview of a SKOS classification
@nichtich
nichtich / pica2json.pl
Created January 17, 2011 22:49
Wandelt PICA+ (egal welche Form) nach JSON (ohne Subfield-Ordnung)
#!/usr/bin/perl
use strict;
use warnings;
=head1 NAME
pica2json - Wandelt PICA+ (egal welche Form) nach JSON (ohne Subfield-Ordnung)
=cut
@nichtich
nichtich / colla.owl.n3
Created January 20, 2011 09:54
Quick draft for a collation ontology
#################################################################
# URI Prefixes
#################################################################
@prefix dct: <http://purl.org/dc/terms/> .
@prefix ns: <http://www.w3.org/2003/06/sw-vocab-status/ns#> .
@prefix skos: <http://www.w3.org/2008/05/skos#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@nichtich
nichtich / rdfimport.pl
Created January 25, 2011 12:16
Handy command line script to import RDF data with RDF::Trine
#!/usr/bin/perl
use strict;
no strict 'subs';
use warnings;
=head1 NAME
rdfimport - Import RDF data into some Triple store
@nichtich
nichtich / EDM-v52-100730.ttl
Created March 9, 2011 16:40
Europeana Data Model v5.2 from http://is.gd/4sX8WC
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix : <http://www.europeana.eu/schemas/edm/> .
@prefix dc: <http://purl.org/dc/elements/1.1/> .
@prefix abc: <http://metadata.net/harmony/abc#> .
@prefix DOLCE-Lite: <http://www.loa-cnr.it/ontologies/DOLCE-Lite.owl#> .
@prefix wgs84_pos: <http://www.w3.org/2003/01/geo/wgs84_pos#> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
@prefix ore: <http://www.openarchives.org/ore/terms/> .
@prefix dcmitype: <http://purl.org/dc/dcmitype/> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
// daiaAvailability.js
// -------------------
// Version: 1.0
// Author: Owen Stephens
// Last Edit: 15/03/2011
// Displays availability from DAIA compliant information
/*
* Constructor arguments:
@nichtich
nichtich / TestPlackApp.pm
Created June 14, 2011 08:08
Test PSGI applications with Plack::Test
use strict;
use warnings;
package TestPlackApp;
use Carp;
use parent 'Exporter';
use Plack::Builder;
use HTTP::Request;
use Test::More;
use Plack::Test;
@nichtich
nichtich / Redirect.pm
Created June 16, 2011 15:53
Quick draft of Plack::App::LocalRedirect
use strict;
use warnings;
package Plack::App::LocalRedirect;
use parent 'Plack::Component';
use Plack::Request;
use URI::Escape;
# use Plack::Util::Accessor qw(path);
sub call {
@nichtich
nichtich / Exporter.pm
Created September 6, 2011 13:15
RDF::Trine::Exporter
package RDF::Trine::Exporter;
use strict;
use warnings;
sub serialize_iterator_to_file {
my ($self, $file, $iterator) = @_;
if ( $self->can('_iterator_to_file') ) {
$self->_iterator_to_file( $file, $iterator );
} elsif ( $self->can('_model_to_file') ) {
my $model = RDF::Trine::Model->temporary_model;
@nichtich
nichtich / LivingMyLife.ttl
Created November 1, 2011 21:33
Simplified Ontology for Bibliographic Resources (sobr)
@prefix bibo: <http://purl.org/ontology/bibo/> .
@prefix daia: <http://purl.org/ontology/daia/> .
@prefix dbo: <http://dbpedia.org/ontology/> .
@prefix dcterms: <http://purl.org/dc/terms/> .
@prefix frbr: <http://purl.org/vocab/frbr/core#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix sobr: <http://example.org/sobr/> . # NO URI NAMESPACE YET
# Emma Goldman's biography
<http://www.librarything.com/work/70394>