Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jason-fox/fox.jason.splash
Splash Screen Plug-in for the DITA-Open Toolkit
https://github.com/jason-fox/fox.jason.splash
cat-api dita-ot dita-ot-plugin splash-screen xkcd
Last synced: about 11 hours ago
JSON representation
Splash Screen Plug-in for the DITA-Open Toolkit
- Host: GitHub
- URL: https://github.com/jason-fox/fox.jason.splash
- Owner: jason-fox
- License: apache-2.0
- Created: 2018-04-14T16:18:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-02-18T12:54:47.000Z (8 months ago)
- Last Synced: 2024-06-13T22:40:02.537Z (4 months ago)
- Topics: cat-api, dita-ot, dita-ot-plugin, splash-screen, xkcd
- Language: Java
- Homepage: https://jason-fox.github.io/dita-ot-plugins/splash
- Size: 4.25 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Splash Screen for DITA-OT [](https://splash-screen-plug-in-for-dita-ot.rtfd.io/)
[![license](https://img.shields.io/github/license/jason-fox/fox.jason.splash.svg)](http://www.apache.org/licenses/LICENSE-2.0)
[![DITA-OT 4.2](https://img.shields.io/badge/DITA--OT-4.2-green.svg)](http://www.dita-ot.org/4.2)
[![CI](https://github.com/jason-fox/fox.jason.splash/workflows/CI/badge.svg)](https://github.com/jason-fox/fox.jason.splash/actions?query=workflow%3ACI)
[![Coverage Status](https://coveralls.io/repos/github/jason-fox/fox.jason.splash/badge.svg?branch=master)](https://coveralls.io/github/jason-fox/fox.jason.splash?branch=master)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=fox.jason.splash&metric=alert_status)](https://sonarcloud.io/dashboard?id=fox.jason.splash)This simple [DITA-OT Plug-in](https://www.dita-ot.org/plugins) automatically displays a random cat picture or xkcd comic
strip as a splash screen whilst waiting for a build job to complete.:arrow_forward: [Video from DITA-OT Day 2019](https://youtu.be/vobY_ha5nd0)
[![](https://jason-fox.github.io/fox.jason.splash/javascript-video.png)](https://youtu.be/vobY_ha5nd0)
Table of Contents
- [Install](#install)
- [Installing DITA-OT](#installing-dita-ot)
- [Installing the Plug-in](#installing-the-plug-in)
- [Usage](#usage)
- [Automatically displaying a splash screen when running a build job](#automatically-displaying-a-splash-screen-when-running-a-build-job)
- [Invoking the splash screen directly from the Command line](#invoking-the-splash-screen-directly-from-the-command-line)
- [Displaying a random Cat Photo](#displaying-a-random-cat-photo)
- [Displaying a random XKCD Comic Strip](#displaying-a-random-xkcd-comic-strip)
- [Contribute](#contribute)
- [License](#license)## Install
The splash screen plug-in has been tested against [DITA-OT 4.x](http://www.dita-ot.org/download). 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 `` task may fail or timeout when requesting HTTPS
images.### Installing DITA-OT
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](https://www.dita-ot.org/4.0/topics/installing-client.html).1. Download the `dita-ot-4.2.zip` package from the project website at
[dita-ot.org/download](https://www.dita-ot.org/download)
2. Extract the contents of the package to the directory where you want to install DITA-OT.
3. **Optional**: Add the absolute path for the `bin` directory to the _PATH_ system variable. This defines the
necessary environment variable to run the `dita` command from the command line.```console
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
```### Installing the Plug-in
- Run the plug-in installation command:
```console
dita install https://github.com/jason-fox/fox.jason.splash/archive/master.zip
```The `dita` command line tool requires no additional configuration.
## Usage
### Automatically displaying a splash screen when running a build job
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.```console
PATH_TO_DITA_OT/bin/dita -f pdf -o out -i document.ditamap
```### Invoking the splash screen directly from the Command line
Like any other transform, when invoked directly, the splash screen requires an input document.
Use the `splash` transform to invoke the image only.#### Displaying a random Cat Photo
To display a random photo from the [Cat API](https://thecatapi.com/):
```console
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
#### Displaying a random Dog Photo
To display a random photo from the [Dog API](https://thecatapi.com/):
```console
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
#### Displaying a random XKCD Comic Strip
To display a random XKCD comic strip from [xkcd.com](https://xkcd.com/):
```console
PATH_TO_DITA_OT/bin/dita -f splash -i document.ditamap --splash.source=xkcd
```#### Displaying a random Anime Character
To display a random anime character from [thisanimedoesnotexist.ai](https://thisanimedoesnotexist.ai/):
```console
PATH_TO_DITA_OT/bin/dita -f anime -i document.ditamap --splash.source=anime
```#### Displaying a random Placeholder Image
To display a placeholder image from [picsum.photos](https://picsum.photos/):
```console
PATH_TO_DITA_OT/bin/dita -f splash -i document.ditamap --splash.source=picsum
```### Parameter Reference
- `splash.source` - Return images of a specific type
- `anime`
- `cats`
- `dogs`
- `picsum`
- `xkcd`The `cfg/configuration` properties file allows for further customization
- `cats.api_key` - API Key for the Cat API
- `cats.api.extend` - Additional parameters for the Cat API
- `dogs.api_key` - API Key for the Dog API
- `dogs.api.extend` - Additional parameters for the Dog API with a key
- `splash.resizer.url` - Fix the image splash screen width using a resize service## Contribute
PRs accepted.
## License
[Apache 2.0](LICENSE) © 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**