This simple DITA-OT Plug-in automatically displays a random cat picture or xkcd comic strip as a splash screen whilst waiting for a build job to complete.
Table of Contents
The splash screen plug-in has been tested against DITA-OT 4.x. It is recommended that
you upgrade to the latest version. The splash screen plug-in relies on the use of ANT to obtain and display the splash
screen image. ANT 1.9+ is recommended. Older versions of the <get>
task may fail or timeout when requesting HTTPS
images.
The DITA-OT Splash Screen is a plug-in for the DITA Open Toolkit.
-
Full installation instructions for downloading DITA-OT can be found here.
- Download the
dita-ot-4.2.zip
package from the project website at dita-ot.org/download - Extract the contents of the package to the directory where you want to install DITA-OT.
- Optional: Add the absolute path for the
bin
directory to the PATH system variable. This defines the necessary environment variable to run thedita
command from the command line.
- Download the
curl -LO https://github.com/dita-ot/dita-ot/releases/download/4.2/dita-ot-4.2.zip
unzip -q dita-ot-4.2.zip
rm dita-ot-4.2.zip
- Run the plug-in installation command:
dita install https://github.com/jason-fox/fox.jason.splash/archive/master.zip
The dita
command line tool requires no additional configuration.
The plugin is pre-configured to run as part of the depend.preprocess.pre
build step. Running any ordinary build job
will display a placeholder image, a random cat photo, an anime character or xkcd comic strip.
PATH_TO_DITA_OT/bin/dita -f pdf -o out -i document.ditamap
Like any other transform, when invoked directly, the splash screen requires an input document.
Use the splash
transform to invoke the image only.
To display a random photo from the Cat API:
PATH_TO_DITA_OT/bin/dita -f splash -i document.ditamap --splash.source=cats
Obtain a key from the Cat API to access more images. see https://thecatapi.com/#pricing
To display a random photo from the Dog API:
PATH_TO_DITA_OT/bin/dita -f splash -i document.ditamap --splash.source=cats
Obtain a key from the Dog API to access more images. see https://thedogapi.com/#pricing
To display a random XKCD comic strip from xkcd.com:
PATH_TO_DITA_OT/bin/dita -f splash -i document.ditamap --splash.source=xkcd
To display a random anime character from thisanimedoesnotexist.ai:
PATH_TO_DITA_OT/bin/dita -f anime -i document.ditamap --splash.source=anime
To display a placeholder image from picsum.photos:
PATH_TO_DITA_OT/bin/dita -f splash -i document.ditamap --splash.source=picsum
splash.source
- Return images of a specific typeanime
cats
dogs
picsum
xkcd
The cfg/configuration
properties file allows for further customization
cats.api_key
- API Key for the Cat APIcats.api.extend
- Additional parameters for the Cat APIdogs.api_key
- API Key for the Dog APIdogs.api.extend
- Additional parameters for the Dog API with a keysplash.resizer.url
- Fix the image splash screen width using a resize service
PRs accepted.
Apache 2.0 © 2018 - 2024 Jason Fox
The Program includes the following additional software component which was obtained under license:
- Ant-Swing.jar - https://ant.apache.org/ - Apache 2.0 license