This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<xsl:stylesheet version="1.0" | |
xmlns:marc="http://www.loc.gov/MARC21/slim" | |
xmlns:items="http://www.koha-community.org/items" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:package="info:srw/extension/13/package-v1.0"> | |
<xsl:output method="xml" omit-xml-declaration="yes" indent="yes"/> | |
<xsl:template match="node()|@*"> | |
<xsl:copy> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use Digest::SHA qw( sha512_hex ); | |
use Test::More; | |
use Modern::Perl; | |
use utf8; | |
my $digest1 = uc sha512_hex( 'The quick brown fox jumps over the lazy dog' ); | |
my $truth1 = '07E547D9586F6A73F73FBAC0435ED76951218FB7D0C8D788A309D785436BBB642E93A252A954F23912547D1E8A3B5ED6E1BFD7097821233FA0538F3DB854FEE6'; | |
is( $digest1, $truth1, 'Fox OK' ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# doaj2koha.sh | |
# | |
# Get the DOAJ (http://www.doaj.org/) data in CSV format here: | |
# http://www.doaj.org/doaj?func=csv | |
# Save the data as doaj.csv | |
# | |
# If you are only interested in some of the journals in DOAJ you | |
# can probably use the grep command to extract only the lines that |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Copyright 2015 Magnus Enger Libriotech | |
=head1 NAME | |
dvd.pl - Turn CSV into MARC. | |
=head1 SYNOPSIS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Copyright 2013 Magnus Enger Libriotech | |
=head1 NAME | |
tab2marc.pl - Convert some tab-delimited data to MARCXML. | |
=head1 SYNOPSIS | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Check that the user is root | |
if [ "$(whoami)" != "root" ]; then | |
echo "Sorry, you are not root." | |
exit 1 | |
fi | |
die() { | |
echo "$@" 1>&2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl -w | |
# Prints out the the most recent numbers for each status from: | |
# http://bugs.koha-community.org/cgi-bin/progress.pl?type=json | |
# | |
# Meant to be run hourly from cron during Global Bug Squashing Days: | |
# @hourly perl /path/to/kohastatus.pl >> /path/to/hourlynumbers.txt | |
# | |
# Based on http://beerpla.net/2008/03/27/parsing-json-in-perl-by-example-southparkstudioscom-south-park-episodes/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Get an ISSN from the querystrin and build a URL for the Journal TOCs API | |
// http://www.journaltocs.hw.ac.uk/index.php?action=api | |
$URL = 'http://www.journaltocs.hw.ac.uk/api/journals/' . $_GET['issn'] . '?output=articles'; | |
$xml = simplexml_load_file($URL); | |
$xml->registerXPathNamespace("rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#"); | |
$xml->registerXPathNamespace("prism", "http://prismstandard.org/namespaces/1.2/basic/"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# Copyright 2019 Magnus Enger Libriotech | |
=head1 NAME | |
my_script.pl - Short description. | |
=head1 SYNOPSIS |
OlderNewer