Files
comaps/tools/unix/minimise_symbol_svg.sh
Konstantin Pastbin e3e4a1985a Organic Maps sources as of 02.04.2025 (fad26bbf22ac3da75e01e62aa01e5c8e11861005)
To expand with full Organic Maps and Maps.ME commits history run:
  git remote add om-historic [om-historic.git repo url]
  git fetch --tags om-historic
  git replace squashed-history historic-commits
2025-05-08 21:10:51 +07:00

29 lines
842 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
if ! command -v scour &> /dev/null; then
echo -e "\033[1;31mScour could not be found"
if [[ $OSTYPE == 'darwin'* ]]; then
echo 'run command'
echo 'brew install scour'
echo 'to install it'
exit
fi
echo 'Take a look at https://github.com/scour-project/scour'
exit
fi
# Prevent python from generating compiled *.pyc files
export PYTHONDONTWRITEBYTECODE=1
OMIM_PATH="${OMIM_PATH:-$(cd "$(dirname "$0")/../.."; pwd)}"
echo "Started processing"
for i in style-clear/symbols style-night/symbols; do
for f in $OMIM_PATH/data/styles/clear/$i/*.svg; do
scour -q -i $f -o $f"-new" --enable-viewboxing --enable-id-stripping --enable-comment-stripping --strip-xml-prolog --protect-ids-noninkscape;
mv -- "$f-new" "$f";
done
done
echo "Done"