A small Python package with two jobs: build vertical 1000×1500 Pinterest pins from an image and a few lines of text, and work out what to publish first from a Google Search Console export, counted separately for every language of a site.
pip install pinforge
Package page: pypi.org/project/pinforge
If a site has several language versions, demand in each one is different. Summing impressions across the whole site and reusing one order for every language sends the best material to the wrong audience.
The package was written for Tarot Magic, a tarot reference with the same 78 cards in four languages. The most-searched card in each language was a different card:
| Locale | Top card | Impressions |
|---|---|---|
| Ukrainian | Six of Wands | 308 |
| Russian | Ten of Cups | 270 |
| English | Four of Wands | 158 |
| French | The Magician | 19 |
Four different answers, not the same list in a different order.
from pinforge import rank_by_locale
queues = rank_by_locale(
"pages.csv",
item_pattern=r"/card/([^/?]+)$",
locales=("ru", "uk", "fr"),
default_locale="en",
)
for slug, impressions in queues["uk"][:5]:
print(slug, impressions)
It reads the CSV the way Search Console exports it, in any interface language: column names are detected, not hard-coded.
The card pins on the site's Pinterest boards come from the same code this package was extracted from. The card pages the pins point to are at tarot-magic.com/card-meanings.