-
Notifications
You must be signed in to change notification settings - Fork 0
Vendor the MapToPoster pipeline with AXP themes and an AXP Runde font hook #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
maceip
wants to merge
1
commit into
main
Choose a base branch
from
exp/map-poster
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| # Posters | ||
|
|
||
| Two renders from the vendored MapToPoster pipeline (`tools/poster`) with the | ||
| placeholder AXP themes and AXP Runde as the display face: | ||
|
|
||
| | Outdoor (day) | Indoor (night) | | ||
| | -------------------------------------------------- | ------------------------------------------------ | | ||
| |  |  | | ||
|
|
||
| What is decided: the pipeline, the font hook, and where themes live. What is | ||
| not: the palettes. They are lifted from today's workspace tokens and will be | ||
| redone when the design language is locked. The theme schema is eleven | ||
| colours (background, text, water, parks, five road tiers, gradient), so | ||
| re-theming is a five-minute job once the greens are final. | ||
|
|
||
| Ideas for when that happens: | ||
|
|
||
| - A leaf-green gradient fade instead of upstream's top/bottom fade to the | ||
| background colour, so posters share Liquid Leaf's meniscus. | ||
| - The hooked `l` from AXP Runde is already in the city name; the coordinates | ||
| line could use tabular figures. | ||
| - A third theme for the "paper" surfaces in Grove (warm parchment, sand | ||
| roads) for printed material. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| MIT License | ||
|
|
||
| Copyright (c) 2026 Ankur Gupta | ||
|
|
||
| Permission is hereby granted, free of charge, to any person obtaining a copy | ||
| of this software and associated documentation files (the "Software"), to deal | ||
| in the Software without restriction, including without limitation the rights | ||
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
| copies of the Software, and to permit persons to whom the Software is | ||
| furnished to do so, subject to the following conditions: | ||
|
|
||
| The above copyright notice and this permission notice shall be included in all | ||
| copies or substantial portions of the Software. | ||
|
|
||
| THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
| IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
| FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
| AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
| LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
| OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
| SOFTWARE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # AXP poster pipeline | ||
|
|
||
| City map posters in AXP's palette, for the day we post or tweet something and | ||
| want an image that looks like it came from our world. | ||
|
|
||
| This is a vendored copy of [MapToPoster](https://github.com/originalankur/maptoposter) | ||
| by Ankur Gupta (MIT; `LICENSE` and `UPSTREAM-README.md` are upstream's), with: | ||
|
|
||
| - two AXP themes, `themes/axp_outdoor.json` and `themes/axp_indoor.json` | ||
| - a font hook: `font_management.py` loads AXP Runde (or any bold/regular/light | ||
| set) from `fonts/` or `$AXP_POSTER_FONT_DIR`, falling back to matplotlib's | ||
| DejaVu Sans. Roboto is not vendored. | ||
| - `axp-poster`, a one-line wrapper | ||
|
|
||
| ## Use | ||
|
|
||
| Needs [uv](https://docs.astral.sh/uv/) and network access to OpenStreetMap | ||
| (Nominatim for geocoding, Overpass for data). First run installs the pinned | ||
| Python environment from `uv.lock`. | ||
|
|
||
| ```sh | ||
| # copy AXP Runde .otf files into tools/poster/fonts (built by | ||
| # scripts/fonts/build-axp-runde.py on the type branch), then: | ||
| tools/poster/axp-poster "Portland" "USA" outdoor 6000 | ||
| tools/poster/axp-poster "Portland" "USA" indoor 6000 | ||
| ``` | ||
|
|
||
| Output lands in `tools/poster/posters/` (ignored by git). Distance is the map | ||
| radius in metres; 6000 frames a downtown, 12000–18000 a whole city. Any | ||
| upstream flag can follow the four positional arguments (`--format svg`, | ||
| `--display-city`, `--width`, …). | ||
|
|
||
| ## Status | ||
|
|
||
| The pipeline runs end to end; the two themes are placeholders derived from | ||
| the current workspace tokens. They will be replaced once the design language | ||
| is locked (Liquid Leaf greens, Grove's paper and ink, the type decisions), at | ||
| which point this becomes the marketing image generator it is meant to be. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After an uncached city or distance is rendered,
cache_setcreates new.pklfiles undertools/poster/cache, and normal Python execution can also createtools/poster/__pycache__; neither path is ignored here. The documented workflow consequently leaves generated binary artifacts as untracked files after routine use, so these cache directories should be added alongside the other poster runtime outputs.Useful? React with 👍 / 👎.