2010-01-11 13:38:44 +01:00
|
|
|
development: &development
|
|
|
|
plantuml:
|
|
|
|
description: "Constructs UML diagram image from its textual description in PlantUML language, see http://plantuml.sourceforge.net"
|
2010-03-26 23:33:50 +01:00
|
|
|
template: image
|
|
|
|
outputs:
|
|
|
|
- command: "/usr/bin/plantuml -pipe"
|
|
|
|
content_type: "image/png"
|
|
|
|
prolog: "@startuml"
|
|
|
|
epilog: "@enduml"
|
2012-08-03 09:27:11 +02:00
|
|
|
tikz:
|
|
|
|
description: "Converts latex/tikz picture to svg. It requires pdflatex and pdf2svg."
|
|
|
|
template: image
|
|
|
|
replace_attachments: true
|
|
|
|
outputs:
|
|
|
|
- command: "/usr/bin/latextool.sh -t"
|
|
|
|
content_type: "image/svg+xml"
|
|
|
|
le:
|
|
|
|
description: "Converts latex excerpts to png. It requires latex and divpng."
|
|
|
|
template: image
|
|
|
|
replace_attachments: true
|
|
|
|
outputs:
|
|
|
|
- command: "/usr/bin/latextool.sh -e"
|
|
|
|
content_type: "image/png"
|
|
|
|
|
|
|
|
latex:
|
|
|
|
description: "Converts latex to svg. It requires pdflatex and pdf2svg."
|
|
|
|
template: image
|
|
|
|
replace_attachments: true
|
|
|
|
outputs:
|
|
|
|
- command: "/usr/bin/latextool.sh"
|
|
|
|
content_type: "image/svg+xml"
|
2010-01-11 13:38:44 +01:00
|
|
|
graphviz:
|
|
|
|
description: "Constructs graph image from its textual description in DOT language, see http://www.graphviz.org"
|
2012-08-03 09:27:11 +02:00
|
|
|
template: image
|
2010-03-26 23:33:50 +01:00
|
|
|
outputs:
|
|
|
|
- command: "/usr/bin/dot -Tsvg"
|
|
|
|
content_type: "image/svg+xml"
|
2012-08-03 09:27:11 +02:00
|
|
|
# - command: "/usr/bin/dot -Tpng"
|
|
|
|
# content_type: "image/png"
|
|
|
|
gneato:
|
|
|
|
description: "Constructs graph image from its textual description in NEATO language, see http://www.graphviz.org"
|
|
|
|
template: image
|
|
|
|
outputs:
|
|
|
|
- command: "/usr/bin/neato -Tsvg"
|
|
|
|
content_type: "image/svg+xml"
|
2010-01-11 13:38:44 +01:00
|
|
|
ritex:
|
|
|
|
description: "Converts WebTeX expression to MathML, see http://ritex.rubyforge.org/"
|
2010-03-26 23:33:50 +01:00
|
|
|
template: svg
|
|
|
|
outputs:
|
|
|
|
- command: "(echo '<!DOCTYPE math PUBLIC \"-//W3C//DTD MathML 2.0//EN\" \"http://www.w3.org/Math/DTD/mathml2/mathml2.dtd\">'; /usr/bin/ritex) | xmllint --noent --nonet --catalogs --loaddtd - | sed 's/^<!DOCTYPE.\\+$//' | /usr/bin/math2svg"
|
|
|
|
content_type: "image/svg+xml"
|
|
|
|
video:
|
|
|
|
description: "Converts video file given by its filename to FLV and displays it via Flowplayer"
|
|
|
|
template: flash-video
|
|
|
|
replace_attachments: true
|
|
|
|
outputs:
|
|
|
|
- command: "xargs -I{} ffmpeg -i {} -vframes 1 -f mjpeg -"
|
|
|
|
content_type: "image/jpeg"
|
|
|
|
# We have to use temporary file as otherwise ffmpeg is unable to inject
|
|
|
|
# metadata.
|
|
|
|
- command: "FN=`cat`; if [ `echo ${FN##*.} | tr [:upper:] [:lower:]` != 'flv' ]; then TMPVIDEO=`tempfile --directory=/var/tmp`; ffmpeg -y -i $FN -sameq -ar 44100 -f flv $TMPVIDEO; STATUS=$?; cat $TMPVIDEO; rm $TMPVIDEO; exit $STATUS; else cat $FN; fi"
|
|
|
|
content_type: "video/x-flv"
|
|
|
|
video_url:
|
|
|
|
description: "Converts video file given by its URL to FLV and displays it via Flowplayer"
|
|
|
|
template: flash-video
|
|
|
|
outputs:
|
|
|
|
- command: "wget -i - -O - | ffmpeg -i - -vframes 1 -f mjpeg -"
|
|
|
|
content_type: "image/jpeg"
|
|
|
|
# We have to use temporary file as otherwise ffmpeg is unable to inject
|
|
|
|
# metadata.
|
|
|
|
- command: "FN=`cat`; wget $FN -O - | (if [ `echo ${FN##*.} | tr [:upper:] [:lower:]` != 'flv' ]; then TMPVIDEO=`tempfile --directory=/var/tmp`; ffmpeg -y -i - -sameq -ar 44100 -f flv $TMPVIDEO; STATUS=$?; cat $TMPVIDEO; rm $TMPVIDEO; exit $STATUS; else cat; fi)"
|
|
|
|
content_type: "video/x-flv"
|
2010-01-11 13:38:44 +01:00
|
|
|
fortune:
|
|
|
|
description: "Prints a random, hopefully interesting, adage, see http://en.wikipedia.org/wiki/Fortune_(Unix)"
|
2010-03-26 23:33:50 +01:00
|
|
|
template: text
|
2010-01-11 13:38:44 +01:00
|
|
|
cache_seconds: 0
|
2010-03-26 23:33:50 +01:00
|
|
|
outputs:
|
|
|
|
- command: "/usr/bin/fortune"
|
|
|
|
content_type: "text/plain"
|
2010-01-11 13:38:44 +01:00
|
|
|
|
|
|
|
test:
|
|
|
|
type: mock
|
|
|
|
|
|
|
|
production:
|
|
|
|
<<: *development
|