Sign inSign up

fredblgr/abc2svg

By fredblgr

•Updated 19 days ago

An image containing abc2svg and several handy tools to process ABC music.

Image
0

399

fredblgr/abc2svg repository overview

⁠Docker image abc2svg

Contents:

ToolSourceCommands
abc2svg (built from the fossil repository, trunk) + Node.js LTShttps://chiselapp.com/user/moinejf/repository/abc2svg⁠abcnode, abctopdf
abcMIDI (build from the repository, master)https://github.com/sshlien/abcmidi⁠abc2midi, midi2abc, abc2abc, yaps, mftext, midicopy, abcmatch, midistats
xml2abc / abc2xml (Wim Vree)https://wim.vree.org/svgParse/⁠xml2abc, abc2xml
abc2svgstuff (Frédéric Boulanger)https://github.com/Frederic-soft/abc2svgstuff⁠abcflatten, abc2svgpdf, abc2svgweb, abc2svgmidi, abc2svgxml, abc2svgmei, abc2svghtml, abc2svgpdfcrop, … et Makefile.abc2svg
weasyprint, rsvg-convert, ghostscript, makeDebianutilisés par abctopdf, pdfcrop et Makefile.abc2svg

jszip is installed globally for the toodt.js backend.

⁠Usage

The current directory is mounted on /work in the container. The ./abc script is a shortcut to invoke commands in the container (you may copy it into your PATH):

./abc abcnode tune.abc > tune.html          # HTML + SVG
./abc abcnode tosvg.js tune.abc > tune.svg  # SVG only
./abc abcnode toabc.js tune.abc --transpose 2 > transposed.abc
./abc abcnode tomei.js tune.abc > tune.mei
./abc abctopdf tune.abc -o tune.pdf
./abc abc2midi tune.abc -o tune.mid
./abc xml2abc partition.musicxml > partition.abc
./abc abc2xml tune.abc > tune.musicxml
./abc abc2svgpdf tune.abc                      # PDF, with flattened %%abc-include
./abc abc2svgmidi tune.abc                     # One MIDI file per tune
./abc make -f /opt/abc2svgstuff/Makefile.abc2svg  # For processing a folder of scores
./abc                                             # Interactive shell

Without using the abc script:

docker run --rm -v "$PWD":/work abc2svg abcnode tune.abc > tune.html

The files included using %%abc-include are searched in the current directory; other directories may be added with -e ABCPATH=/work/lib:/work/other.

Contents of the abcscript:

#!/bin/sh
# Executes a command in the abc2svg container, in the current directory.
#   ./abc abcnode tune.abc > tune.html
#   ./abc abctopdf tune.abc -o tune.pdf
#   ./abc abc2midi tune.abc -o tune.mid
#   ./abc xml2abc score.musicxml > score.abc
REPO=fredblgr/
IMAGE=${ABC2SVG_IMAGE:-abc2svg}
if [ -t 0 ] && [ -t 1 ]; then TTY=-it; else TTY=-i; fi
exec docker run --rm $TTY \
  --user "$(id -u):$(id -g)" -e HOME=/tmp \
  -v "$PWD":/work -w /work \
  "${REPO}${IMAGE}" "$@"

⁠Remarks

  • abctopdf relies on weasyprint (Chrome/Chromium is not installed because it is not easy to use in a container). The default page format is A4.
  • The npm packet abc2svg is deprecated, so abc2svg is built from its fossil repository with ninja and uglify-js for minimizing.

Tag summary

Content type

Image

Digest

sha256:b06a8896d…

Size

385.5 MB

Last updated

19 days ago

docker pull fredblgr/abc2svg