Astro site with e-book reader for classic electronics notebooks. 15 Mims notebooks + 1 Ugly's Electrical Reference, served via Docker/Caddy at mims.l.supported.systems. PDFs tracked with git-lfs.
44 lines
1.8 KiB
Bash
Executable File
44 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
# Forrest Mims Mini-Notebook Downloader
|
|
|
|
NOTEBOOKS=(
|
|
"electronics_-_Forrest_Mims-engineers_mini-notebook_basic_semiconductor_circuits_"
|
|
"Forrest_Mims-Engineers_Mini-Notebook_Op_Amp_Ic_Circuits_Radio_Shack_Electronics"
|
|
"electronics_-_Forrest_Mims-engineers_mini-notebook_555_timer_circuits_radio_sha"
|
|
"Forrest_Mims-Engineers_Mini-Notebook_Formulas_Tables_Basic_Circuits_Radio_Shack"
|
|
"Forrest_Mims-Engineers_Mini-Notebook_-_Communications_Projects_Radio_Shack_Elec"
|
|
"Forrest_Mims-engineers_mini-notebook_basic_semiconductor_circuits_radio_shack_e"
|
|
"Forrest_Mims-Engineers_Mini-Notebook_Solar_Cell_Projects_Radio_Shack_Electronic"
|
|
"Forrest_Mims-Engineers_Mini-Notebook_Magnet_and_Sensor_Projects_Radio_Shack_Ele"
|
|
"Forrest_Mims-Engineers_Mini-Notebook_Optoelectronics_Circuits_Radio_Shack_Elect"
|
|
"Forrest_Mims-Engineers_Mini-Notebook_-_Sensor_Projects_Radio_Shack_Electronics"
|
|
"RadioShackEngineersMiniNotebookOpAmpICCircuits"
|
|
"Forrest_Mims-Engineers_Mini-Notebook_Formulas_Tables_and_Basic_Circuits_Radio_S"
|
|
"RadioShackEngineersMiniNotebookBasicSemiconductorCircuits"
|
|
"RadioShackEngineersMiniNotebookOptoelectronicCircuits"
|
|
)
|
|
|
|
echo "📚 Downloading Forrest Mims Mini-Notebooks from Archive.org"
|
|
echo "============================================================"
|
|
|
|
for id in "${NOTEBOOKS[@]}"; do
|
|
echo ""
|
|
echo "📖 Processing: $id"
|
|
|
|
# Get metadata JSON
|
|
curl -s "https://archive.org/metadata/$id" > "${id}_metadata.json" 2>/dev/null
|
|
|
|
# Try to download PDF (try common naming patterns)
|
|
for pattern in "${id}.pdf" "${id}_text.pdf" "$(echo $id | sed 's/_/-/g').pdf"; do
|
|
url="https://archive.org/download/$id/$pattern"
|
|
if curl -sI "$url" 2>/dev/null | grep -q "200 OK"; then
|
|
echo " ⬇️ Downloading PDF: $pattern"
|
|
curl -s -L -o "${id}.pdf" "$url"
|
|
break
|
|
fi
|
|
done
|
|
done
|
|
|
|
echo ""
|
|
echo "✅ Download complete!"
|