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 |
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 MARC::Batch; | |
use Template; | |
use Modern::Perl; | |
my $batch = MARC::Batch->new('USMARC', 'test.mrc'); | |
my $record = $batch->next(); | |
# Set up Template Toolkit |
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 | |
cd /home/user/kohaclone | |
git checkout master | |
git pull | |
export PERL5LIB=/home/user/kohaclone; export KOHA_CONF=/home/user/koha-dev/etc/koha-conf.xml | |
export HARNESS_PERL_SWITCHES=-MDevel::Cover | |
prove -l | |
cover | |
archive_devel_cover.pl --from cover_db/ --to /var/www/coverage_reports/koha/ |
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
#!/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
#!/bin/bash | |
# Read a directory of image files with names on this form: | |
# 20110113_001.jpg | |
# 20110113_002.jpg | |
# 20110113_003.jpg | |
# | |
# Create folders as needed and move the images into them, in this way | |
# 2011 | |
# |__01 |
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 | |
# Read through a file and pick out lines that contain one of a number of | |
# "trigger" strings. Print the lines grouped by the string they matched, then | |
# print the remaining lines. | |
# | |
# Usage: linesort.pl myfile.txt | |
use File::Slurp; | |
use Array::Each qw( rewind ); |
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/"); |
NewerOlder