Skip to content

Instantly share code, notes, and snippets.

View josteinaj's full-sized avatar

Jostein Austvik Jacobsen josteinaj

View GitHub Profile
@josteinaj
josteinaj / only-some-scripts-appear-when-starting-gui.log
Created June 3, 2015 09:46
Only some scripts appear when starting gui - log file
➜ bin git:(javafx) ./pipeline2
./pipeline2: 238: [: Illegal number: openjdk version "1.8.0_45-internal"
OpenJDK 64-Bit Server VM warning: ignoring option PermSize=16M; support was removed in 8.0
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
DEBUG [ o.d.common.properties.PropertyTracker] Property tracker up @o.d.c.properties.PropertyTracker:28#activate
DEBUG [ o.d.common.properties.PropertyTracker] property publisher factory up @o.d.c.p.PropertyPublisherFactory:12#activate
Main Module is loaded!
DEBUG [ org.daisy.pipeline.gui.Activator] +++++++++++++++++++ in start @org.daisy.pipeline.gui.Activator:109#start
DEBUG [ org.daisy.pipeline.gui.Activator] +++Setting event bus provider @org.daisy.pipeline.gui.Activator$7:219#addingService
DEBUG [ org.daisy.pipeline.gui.Activator] ++++++++++++++++++++++++++++++Setting script registry @org.daisy.pipeline.gui.Activator$4:116#addingService
@josteinaj
josteinaj / loc-callnumber-parsing.xsl
Created February 2, 2015 23:05
Attempt at parsing (and sorting) LoC callnumbers
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="#all" version="2.0">
<xsl:output method="text"/>
<xsl:param name="callnumber" select="'callnumber.txt'"/>
<xsl:template name="main">
<xsl:variable name="lines" select="tokenize(unparsed-text($callnumber),'[\n\r]+')"/>
<xsl:variable name="lines" select="$lines[not(.=('Bibliographic Call Number','eRDR','iPad')) and not(starts-with(.,'Shelved by'))]"/>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="#all" version="2.0" xmlns="http://www.w3.org/1999/xhtml"
xpath-default-namespace="http://xmlcalabash.com/ns/profile" xmlns:profile="http://xmlcalabash.com/ns/profile" xmlns:f="#">
<xsl:output indent="yes"/>
<!-- input: calabash profiling xml output -->
<!-- output: html view which highlights steps that spends much time -->
<!-- change this URI to point to whatever XProc script you want to compare the profiling output against -->
@josteinaj
josteinaj / checkout.sh
Created January 26, 2015 16:29
A bash script I use to checkout a specific version of the Pipeline 2 modules (master, v1.8, v1.9); makes it easy to switch between them during development.
#!/bin/bash
# WARNING: this will git pull all projects, which may overwrite any unstaged file changes! I've added "git add -A" to the script to avoid this, but try commiting any changes before running this script just to be safe.
# Convenience script that checks out Pipeline 2 module projects for a given minor version (or master)
#
# To checkout:
# ./pipeline-build.sh tag
#
#!/bin/bash -x
SNAPSHOTS="https://dl.dropboxusercontent.com/u/6370535/nordic-epub3-dtbook-migrator"
INSTALLED="`ls ~/daisy-pipeline/modules/ | grep nordic-epub3-dtbook-migrator | grep jar$`"
CURRENT="`curl $SNAPSHOTS/current.txt`"
if [ "$?" -ne "0" ]; then
echo "Could not retrieve filename of current version of the Nordic EPUB3/DTBook Migrator"
@josteinaj
josteinaj / pipeline-watchdog.sh
Created October 16, 2014 09:28
Linux bash script that can be used to keep Pipeline 2 running. It will start Pipeline 2 if it is not running, and kill it if it is not responding. You might need to install curl and screen.
#!/bin/bash -x
# Change APPDATA/ENGINE_HOME/WEBUI_HOME if necessary,
# and set this script up as a cron job, for instance:
# */1 * * * * $HOME/pipeline-watchdog.sh >/tmp/pipeline-watchdog.log 2>&1
PIPELINE_APPDATA="$HOME/.daisy-pipeline"
PIPELINE_ENGINE_HOME="$HOME/daisy-pipeline"
PIPELINE_WEBUI_HOME="$HOME/daisy-pipeline-webui"
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0">
<xsl:output method="text"/>
<xsl:template match="/*">
<xsl:for-each select="/metadata/versioning/versions/version">
<xsl:value-of select="normalize-space(.)"/>
<xsl:text>
</xsl:text>
#!/bin/bash
# DEPENDENCY: xsltproc (easy to install; alternatively modify to use another XSLT processor)
cd /var/packages/debian/conf
if [ ! -f REPOSITORIES ]; then
echo "Please add the URL to at least one repository to the file 'REPOSITORIES' (one repository on each line)'"
exit
fi
#!/bin/sh -e
#Define our target device
export TARGET_ARCH="-march=armv7-a"
export TARGET_TUNE="-mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -mthumb-interwork -mno-thumb"
#Define the cross compilators on your system
export AR="arm-linux-gnueabi-ar"
export CC="arm-linux-gnueabi-gcc"
export CXX="arm-linux-gnueabi-g++"
@josteinaj
josteinaj / 09d64df4-5e80-493c-9782-75dc8d22092d.log
Created May 2, 2014 12:56
Job Summary - 09d64df4-5e80-493c-9782-75dc8d22092d
2014-05-02 14:40:42,690 [INFO ] org.daisy.pipeline.job.Job - Changing job status to: RUNNING
2014-05-02 14:40:42,696 [DEBUG] org.daisy.pipeline.push.Poster - Status changed 09d64df4-5e80-493c-9782-75dc8d22092d->RUNNING
2014-05-02 14:40:42,697 [DEBUG] o.d.p.p.jobs.PersistentJobContext - load script XProcScript[name=HTML to EPUB3]
2014-05-02 14:40:42,699 [DEBUG] o.d.p.p.jobs.PersistentJobContext - load script XProcScript[name=HTML to EPUB3]
2014-05-02 14:40:42,700 [DEBUG] o.d.p.p.jobs.PersistentJobContext - Post loading jobcontext
2014-05-02 14:40:42,700 [DEBUG] o.d.pipeline.job.JobContextFactory - configuring object org.daisy.pipeline.persistence.jobs.PersistentJobContext@554b2083
2014-05-02 14:40:42,701 [DEBUG] o.d.pipeline.job.JobContextFactory - configuring object org.daisy.pipeline.persistence.jobs.PersistentJobContext@554b2083
2014-05-02 14:40:42,701 [INFO ] o.d.p.persistence.jobs.PersistentJob - Changing Status:RUNNING
2014-05-02 14:40:42,701 [DEBUG] o.d.p.persistence.jobs.PersistentJob - Updating object