Skip to content

Instantly share code, notes, and snippets.

View infotexture's full-sized avatar

Roger Sheen infotexture

View GitHub Profile
@infotexture
infotexture / net.infotexture.autobuild_watcher.plist
Created January 26, 2014 16:12
Sample Mac OS X `launchd` script to watch a folder and run DITA builds whenever files change
<?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>KeepAlive</key>
<false/>
<key>Label</key>
<string>net.infotexture.autobuild_watcher</string>
<key>ProgramArguments</key>
<array>
@infotexture
infotexture / net.infotexture.autobuild_hourly.plist
Last active March 9, 2022 20:23
Sample Mac OS X `launchd` script to run DITA builds hourly
<?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_hourly</string>
<key>ProgramArguments</key>
<array>
<string>/bin/bash</string>
<string>/Users/username/projectdir/scripts/run-dita-build.sh</string>
@infotexture
infotexture / dita-ot-rng-catalog.xml
Created November 27, 2020 20:14
DITA-OT RELAX NG Schemas
<?xml version="1.0" encoding="UTF-8"?>
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<!-- Map an absolute RELAX NG schema reference to a location relative to this catalog -->
<uri name="https://www.dita-ot.org/project" uri="dita/DITA-OT3.x/resources/project.rnc"/>
<uri name="https://www.dita-ot.org/plugins" uri="dita/DITA-OT3.x/resources/plugin.rnc" />
</catalog>
@infotexture
infotexture / PR-3379-fo-tests.md
Last active October 11, 2019 16:31
Sample FO output for various index markup options
@infotexture
infotexture / keybase.md
Created September 11, 2016 11:40
Keybase.io GitHub identity proof

Keybase proof

I hereby claim:

  • I am infotexture on github.
  • I am infotexture (https://keybase.io/infotexture) on keybase.
  • I have a public key ASA5FXAWGFzIxTeuYBHqoLXTF1tX3EN9JfKKI8IGGqjegAo

To claim this, I am signing this object:

@infotexture
infotexture / pre-commit.sample.sh
Last active January 4, 2016 14:39
Sample Git `pre-commit` hook to build DITA output before committting and reject the changes if build fails
#!/bin/sh
#
# Get the absolute path of the `.git/hooks` directory
export GIT_HOOKS=`cd "\`dirname "\\\`readlink "$0" || echo $0\\\`"\`" && pwd`
# Set the absolute path of the build directory
export BUILD_FILES="$GIT_HOOKS/../../build-files/"
# Set the absolute path of the DITA home directory
export DITA_HOME="$BUILD_FILES/../bin/dita-ot/"
# Set the absolute path of the DITA home directory again (weird, but necessary)
export DITA_DIR="$BUILD_FILES/../bin/dita-ot/"
@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>
@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 / 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 / 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>