Skip to content

Instantly share code, notes, and snippets.

@lucasrangit
lucasrangit / download_xingbao_building_block_instructions.sh
Created March 18, 2026 20:02
Script to download Xingbao building block instructions from http://code6.centoooo.cn/xingbao/index.aspx as PDF (e.g. Mirage Tank products).
#!/usr/bin/env bash
# Download Xingbao building block product instructions.
set -euo pipefail
BASE_URL="http://code6.centoooo.cn"
LIST_URL_BASE="${BASE_URL}/xingbao/ProductList-P"
if command -v img2pdf &> /dev/null; then
PDF_TOOL="img2pdf"
elif command -v convert &> /dev/null; then