Skip to content

Instantly share code, notes, and snippets.

View infotexture's full-sized avatar

Roger Sheen infotexture

View GitHub Profile
@infotexture
infotexture / jenkins_build.sh
Last active August 29, 2015 13:55
Sample Jenkins build script to generate output via DITA-OT & copy results to web server
#!/bin/bash
# This script is run by Jenkins to execute all tests.
# It gets passed two parameters, the first one is either "ci" or "nightly" to
# indicate what kind of tests should be run. The second one is the branch that
# is being tested. This script should either work for all branches (makes
# merging easier) or each branch contains code that is specific for this branch,
# in which case you might want to double check that everything works after
# merging.
@infotexture
infotexture / svn_post-commit_git_svn_rebase.sh
Created February 10, 2010 10:52
Cornerstone Post-Commit Action Script
#!/bin/bash
# Cornerstone Post-Commit Action Script <http://www.zennaware.com/cornerstone/>
# Get last log item from working copy's history & copy it to the pasteboard
# $1 is used to reference the POSIX path of the working copy that was committed
/usr/local/bin/svn log "$1" -r HEAD --limit 1 --verbose | pbcopy
# infotexture hooks for hybrid Git/Subversion working copies. Created 2010-02-09
# (see <http://infotexture.net/2010/02/git-to-svn-and-back-again/> for details)
@infotexture
infotexture / numbered-headings-custom.xsl
Created April 23, 2012 21:17
DITA-OT Customization: Numbered Headings in PDF output
<?xml version='1.0' encoding='UTF-8'?>
<xsl:stylesheet version="2.0" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!--
Numbered Headings in PDF output per <http://tech.groups.yahoo.com/group/dita-users/message/26819>, 26827, 26828 & 26794
Template created via DITA-OT PDF plug-in generator <http://dita-generator.appspot.com/pdf-plugin> by Jarno Elovirta -->
<xsl:template match="*" mode="getTitle">
<xsl:variable name="topic" select="ancestor-or-self::*[contains(@class, &apos; topic/topic &apos;)][1]" />
<xsl:variable name="id" select="$topic/@id" />
<xsl:variable name="mapTopics" select="key(&apos;map-id&apos;, $id)" />
pdf:
check-dita-home:
init:
generate-msg-topic:
[xslt] Processing /.../dita-ot/src/main/resources/messages.xml to /.../docs/user-guide/DITA-messages.xml
[xslt] Loading stylesheet /.../docs/resources/messages.xsl
site:
check-dita-home:
init:
generate-msg-topic:
generate-params-topic:
@infotexture
infotexture / _xml-d.scss
Last active October 23, 2015 04:52
Sass partial for DITA 1.3 XML mention domain
// Sass partial for DITA 1.3 XML mention domain
$code-fonts: Menlo, Monaco, Consolas, "Courier New", monospace;
$markup-color: #663399;
@mixin markupname {
color: $markup-color;
font-family: $code-fonts;
}
@infotexture
infotexture / DITA_indexterms-vs-keywords.xml
Created January 16, 2013 13:22
DITA markup for (hidden) indexterms vs. (visible) keywords
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN" "reference.dtd">
<reference id="ID">
<title id="Module">Module Name</title>
<prolog>
<metadata>
<keywords>
@infotexture
infotexture / startcmd.sh
Created January 12, 2014 14:45
DITA Open Toolkit `startcmd.sh` (as shipped with v1.7.1 to v1.8)
#!/bin/sh
# This file is part of the DITA Open Toolkit project hosted on
# Sourceforge.net. See the accompanying license.txt file for
# applicable licenses.
# (c) Copyright IBM Corp. 2006 All Rights Reserved.
realpath() {
case $1 in
/*) echo "$1" ;;
*) echo "$PWD/${1#./}" ;;
@infotexture
infotexture / net.infotexture.autobuild_midnight.plist
Last active January 3, 2016 19:09
Sample Mac OS X `launchd` script to run DITA builds at midnight
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.infotexture.autobuild_midnight</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Users/username/projectdir/scripts/run-dita-build.sh</string>
@infotexture
infotexture / net.infotexture.autobuild_workdays.plist
Last active January 3, 2016 19:09
Sample Mac OS X `launchd` script to run DITA builds once at 9AM and every hour thereafter
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>net.infotexture.autobuild_workdays</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Users/username/projectdir/scripts/run-dita-build.sh</string>