diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-11-02 10:27:07 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-11-30 00:24:06 +0100 |
commit | 120ceb683e527c48149b74e893164a49cb3b6934 (patch) | |
tree | e76d41a467eb7a1156a8f81305649da1078d8931 /tools | |
parent | 74bf5b55833402b05072cd6ace6fa8a9fc7f2235 (diff) | |
download | server-120ceb683e527c48149b74e893164a49cb3b6934.tar.gz |
Add tool to create initial map layout SVG.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/new-layout.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/new-layout.js b/tools/new-layout.js new file mode 100644 index 0000000..ce0bb6e --- /dev/null +++ b/tools/new-layout.js @@ -0,0 +1,22 @@ +const print = console.log + +if (process.argv.length < 4) { + print("usage: node new-layout.js <width> <height> [image.jpg]") + process.exit(1) +} + +var w = Number(process.argv[2]) +var h = Number(process.argv[3]) +var m = process.argv[4] || "../map75.jpg" + +print(`<?xml version="1.0" encoding="UTF-8"?> +<svg + xmlns="http://www.w3.org/2000/svg" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + width="${w}" + height="${h}" +> +<image xlink:href="${m}" x="0" y="0" width="${w}" height="${h}" image-rendering="pixelated" sodipodi:insensitive="true" /> +</svg> +`) |