A Python package for lossless transcoding between CartoSym CSS (.cscss) and other encodings associated with the OGC Style & Symbology Conceptual Model standard.
git clone --recursive https://github.com/maxcollombin/CartoSymTranscoder.git
cd CartoSymTranscoder
./setup.shpip install cartosym-transcoder# Parse a file
cartosym-parse parse input/0-basic.cscss
# Convert between formats
cartosym-parse convert input/example.cscss -o output/example.json
# Convert and display the result in the console
cartosym-parse convert input/example.cscss --print
# Validate the styles
cartosym-parse convert input/example.cscss or cartosym-parse convert input/example.cs.json
# Convert and validate the result
cartosym-parse convert input/example.cscss -o output/example.cs.json --validate
# Display help
cartosym-parse --help
# Display version
cartosym-parse --version# Setup
./setup.sh
# Install development dependencies
source CartoSym/bin/activate
pip install -e ".[dev]"
# Run tests
pytest tests/
# Clean up
./clean.shcartosym_transcoder/- Main Python packagegrammar/- Git submodule with ANTLR grammar filesinput/- Sample filestests/- Unit tests