This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
wiki_external_filter/config/wiki_external_filter.yml

86 lines
3.5 KiB
YAML

development: &development
plantuml:
description: "Constructs UML diagram image from its textual description in PlantUML language, see http://plantuml.sourceforge.net"
template: image
outputs:
- command: "/usr/bin/plantuml -pipe"
content_type: "image/png"
prolog: "@startuml"
epilog: "@enduml"
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"
graphviz:
description: "Constructs graph image from its textual description in DOT language, see http://www.graphviz.org"
template: image
outputs:
- command: "/usr/bin/dot -Tsvg"
content_type: "image/svg+xml"
# - 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"
ritex:
description: "Converts WebTeX expression to MathML, see http://ritex.rubyforge.org/"
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"
fortune:
description: "Prints a random, hopefully interesting, adage, see http://en.wikipedia.org/wiki/Fortune_(Unix)"
template: text
cache_seconds: 0
outputs:
- command: "/usr/bin/fortune"
content_type: "text/plain"
test:
type: mock
production:
<<: *development