Skip to content

Release v7.2: Featured Elements - Visual Highlights on Section Covers #34

Release v7.2: Featured Elements - Visual Highlights on Section Covers

Release v7.2: Featured Elements - Visual Highlights on Section Covers #34

Workflow file for this run

name: Create Release
on:
push:
tags:
- 'v*'
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Clean old PDFs from output
run: |
echo "Removing old PDFs from output folders..."
if [ -d output ]; then find output -type f -name '*.pdf' -delete; fi
echo "Old PDFs removed."
- name: Get tag info
id: tag
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "tag_name=$TAG_NAME" >> $GITHUB_OUTPUT
echo "Release: $TAG_NAME"
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Noto Sans CJK fonts
run: |
sudo apt-get update
sudo apt-get install -y fonts-noto-cjk fonts-wqy-zenhei fonts-wqy-microhei
fc-cache -fv
- name: Generate PDFs
run: |
# Fetch all data first
echo "Fetching data for all scopes..."
for scope in Pokedex ExGen1 ExGen2 ExGen3 ME01 ME02 ME02.5 MEP SV01 SV02 SV03.5 SV03 SV04.5 SV04 SV05 SV06.5 SV06 SV07 SV08.5 SV08 SV09 SV10.5B SV10.5W SV10 SVP; do
echo " → Fetching $scope"
python scripts/fetcher/fetch.py --scope $scope
done
# Generate all PDFs (all scopes, all languages)
echo "Generating all PDFs..."
python scripts/pdf/generate_pdf.py --scope all
# Verify output
if [ ! -d output ]; then
echo "Error: output directory not created"
exit 1
fi
PDF_COUNT=$(find output -type f -name '*.pdf' | wc -l)
echo "Generated $PDF_COUNT PDFs"
if [ "$PDF_COUNT" -eq 0 ]; then
echo "Error: No PDFs were generated"
exit 1
fi
- name: Create language-specific PDF zips
run: |
cd output
# Create individual zips per language (each containing all scopes)
for lang in de en fr es it ja ko zh-hans zh-hant; do
if [ -d "$lang" ]; then
echo "Creating ZIP for $lang..."
zip -r ../binder-pokedex-${lang}.zip $lang -x ".*"
fi
done
cd ..
ls -lh binder-pokedex*.zip
- name: Create Release with Assets
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.tag.outputs.tag_name }}
name: Binder Pokédex ${{ steps.tag.outputs.tag_name }}
files: |
binder-pokedex-de.zip
binder-pokedex-en.zip
binder-pokedex-fr.zip
binder-pokedex-es.zip
binder-pokedex-it.zip
binder-pokedex-ja.zip
binder-pokedex-ko.zip
binder-pokedex-zh-hans.zip
binder-pokedex-zh-hant.zip
body: |
## 🎨 Featured Elements - Visual Highlights on Covers
**What's New in v7.2:**
✨ **Featured Elements System:**
- Beautiful featured elements (trading cards/artwork) on every section cover
- 3 most iconic Pokémon automatically selected per section
- Smart content detection:
- TCG Sets: Trading card images from TCGdex
- Pokédex: Official artwork from PokeAPI
- Automatic fallback to PokeAPI when TCG images unavailable
- Priority-based selection (starters, legendaries, pseudo-legendaries)
🔧 **Technical Improvements:**
- Format-agnostic architecture with 3 auto-detecting handlers
- Unified `featured_elements` data structure
- Image caching (~800KB-1MB per element)
- Works seamlessly across all 25 scopes
---
### 📥 Downloads (by Language)
Each ZIP contains all 25 scopes (Pokédex + 24 TCG sets) in that language:
- 🇩🇪 **binder-pokedex-de.zip** - Deutsch (25 PDFs)
- 🇬🇧 **binder-pokedex-en.zip** - English (25 PDFs)
- 🇫🇷 **binder-pokedex-fr.zip** - Français (25 PDFs)
- 🇪🇸 **binder-pokedex-es.zip** - Español (25 PDFs)
- 🇮🇹 **binder-pokedex-it.zip** - Italiano (25 PDFs)
- 🇯🇵 **binder-pokedex-ja.zip** - 日本語 (25 PDFs)
- 🇰🇷 **binder-pokedex-ko.zip** - 한국어 (25 PDFs)
- 🇨🇳 **binder-pokedex-zh-hans.zip** - 简体中文 (25 PDFs)
- 🇹🇼 **binder-pokedex-zh-hant.zip** - 繁體中文 (25 PDFs)
### 📋 Content Overview
**25 Total Scopes:**
- **Pokédex:** Complete National Pokédex (1,025 Pokémon across 9 generations)
- **ExGen1-3:** TCG EX collections (94/324/366 cards)
- **ME01-MEP:** Pokémon TCG Mew era (4 sets)
- **SV01-SV10 + SVP:** Scarlet & Violet era (17 sets)
### 📊 Stats
- **Total Scopes:** 25 (1 Pokédex + 3 ExGen + 21 TCG sets)
- **Languages:** 9 (DE, EN, FR, ES, IT, JA, KO, ZH-Hans, ZH-Hant)
- **Cards/Pokémon:** 1,025+ Pokémon + 4,000+ TCG cards
- **Featured Elements:** 75+ iconic Pokémon showcased across all covers
### 🔧 Technical Details
- Featured elements with automatic format detection
- Cross-platform font support (macOS Songti + Linux Noto Sans CJK)
- Scope-based modular architecture
- PokeAPI fallback for universal coverage
- Proper CJK character rendering
📚 **[Full Changelog & Documentation](https://github.com/DerFlash/BinderPokedex)**
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}