==========
Cascadenik implements cascading stylesheets for Mapnik.
It’s an abstraction layer and preprocessor that converts special, CSS-like
syntax into Mapnik-compatible style definitions. It’s easier to write complex
style rules using the alternative syntax, because it allows for separation of
symbolizers and provides a mechanism for inheritance.
Cascadenik supports many of Mapnik’s features in a simple declarative form:
/* Define a few colors */
@black: #000;
@orange: #f90;
/* Start with a white background */
Map
{
map-bgcolor: #fff;
}
/* Draw roads as orange lines */
#roads
{
/* Usually, 3px wide */
line-width: 3;
line-color: @orange;
/* Make the important ones wider */
&[kind=major] { line-width: 4 }
&[kind=highway] { line-width: 5 }
/* Add the road names in black */
name
{
text-placement: line;
text-face-name: "DejaVu Sans Book";
text-fill: @black;
text-size: 12;
}
}
See more examples at https://github.com/mapnik/Cascadenik/wiki/Examples.
Usage
-----
See `INSTALL.md` for installation instructions.
See the `doc/` folder for more usage examples.
Unroll the rules in example.mss and show their cascade order:
% cascadenik-style.py example.mss > example-ordered-unrolled.mss
Compile `example.mml` into a Mapnik-suitable XML file:
% cascadenik-compile.py example.mml example-compiled.xml
Render a MML file directly to an image using nik2img.py:
% nik2img.py example.mml example.png
Metadata
Release files for cascadenik 2.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cascadenik-2.7.0.tar.gz | 54.2 kB | Without provenance | Details for cascadenik-2.7.0.tar.gz |
Release files / cascadenik-2.7.0.tar.gz
| Download URL | cascadenik-2.7.0.tar.gz |
|---|---|
| Size | 54.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ccb4e6b59d99e8ede641c8088c97e811b85b3afc55c98c8015d3ce0aa77a6c08
|
|
BLAKE2b-256 checksum How to use checksums |
282141c5ff5042ca670f5ffb8c3aa3c8d8a7d109d937e6e7a05844711012d6b1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for cascadenik 2.7.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.