51 lines
1.0 KiB
Bash
Executable File
51 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# Common
|
|
|
|
COMMON_IN_DIR="./svg/common"
|
|
OUT_DIR="./png/common"
|
|
|
|
mkdir -p "$OUT_DIR"
|
|
|
|
SIZES=(256 512 1024 2048)
|
|
|
|
for svg in "$COMMON_IN_DIR"/*.svg; do
|
|
filename=$(basename "$svg" .svg)
|
|
|
|
for size in "${SIZES[@]}"; do
|
|
output_file="$OUT_DIR/${filename}-${size}.png"
|
|
inkscape "$svg" \
|
|
--export-type=png \
|
|
--export-background-opacity=0 \
|
|
--export-width=$size \
|
|
--export-filename="$output_file"
|
|
done
|
|
done
|
|
|
|
# Wiki
|
|
|
|
WIKI_IN_DIR="./svg/wiki"
|
|
WIKI_OUT_DIR="./png/wiki"
|
|
|
|
mkdir -p "$WIKI_OUT_DIR"
|
|
|
|
WIKI_SIZES=(135 202 270)
|
|
|
|
for size in "${WIKI_SIZES[@]}"; do
|
|
output_file="$WIKI_OUT_DIR/logo-${size}.png"
|
|
inkscape "$WIKI_IN_DIR/logo.svg" \
|
|
--export-type=png \
|
|
--export-background-opacity=0 \
|
|
--export-width=$size \
|
|
--export-filename="$output_file"
|
|
done
|
|
|
|
|
|
output_file="$WIKI_OUT_DIR/wordmark.png"
|
|
|
|
inkscape "$WIKI_IN_DIR/wordmark.svg" \
|
|
--export-type=png \
|
|
--export-background-opacity=0 \
|
|
--export-width=124 \
|
|
--export-filename="$output_file"
|