#!/bin/bash # Reference PDF Library - Full SHTF/Prep Collection set -u TMP=/tmp/pdf-seed API=http://localhost/pdfs/api/upload mkdir -p "$TMP" PDFS=( # ========== MEDICAL - HESPERIAN (full books from archive.org mirror) ========== "https://archive.org/download/strategic_intelligence_network/medical/hesperian_-_where_there_is_no_doctor_2017_full_book.pdf|Where There Is No Doctor (Hesperian 2017)|medical" "https://archive.org/download/strategic_intelligence_network/medical/hesperian_-_where_there_is_no_dentist_2012_full_book.pdf|Where There Is No Dentist (Hesperian)|medical" "https://archive.org/download/strategic_intelligence_network/medical/hesperian_-_a_book_for_the_midwives_2013_full_book.pdf|A Book for Midwives (Hesperian)|medical" "https://archive.org/download/strategic_intelligence_network/medical/hesperian_-_disabled_village_children_2009_full_book.pdf|Disabled Village Children (Hesperian)|medical" "https://archive.org/download/strategic_intelligence_network/medical/hesperian_-_helping_children_who_are_deaf_2004_full_book.pdf|Helping Children Who Are Deaf (Hesperian)|medical" "https://archive.org/download/strategic_intelligence_network/medical/hesperian_-_where_women_have_no_doctor_full_book.pdf|Where Women Have No Doctor (Hesperian)|medical" # ========== MEDICAL - MILITARY / TACTICAL ========== "https://tccc.org.ua/files/downloads/clinical-guidelines-2024-en.pdf|TCCC Guidelines 2024 (Tactical Combat Casualty Care)|medical" "https://archive.org/download/Fm4-25.11FirstAid/Fm4-25.11FirstAid.pdf|FM 4-25.11 First Aid|medical" "https://archive.org/download/FM21-10_2000/FM21-10_2000.pdf|FM 21-10 Field Hygiene and Sanitation (2000)|medical" # ========== SURVIVAL ========== "https://trueprepper.com/wp-content/uploads/2022/11/FM-21-76-US-Army-Survival-Manual.pdf|FM 21-76 US Army Survival Manual (1992)|survival" "https://archive.org/download/MManuals/Fm3-05.70Survival.pdf|FM 3-05.70 Survival (2002)|survival" "https://www.globalsecurity.org/military/library/policy/army/fm/21-76-1/fm_21-76-1survival.pdf|FM 21-76-1 Survival Evasion Recovery|survival" # ========== MILITARY / DEFENSE ========== "https://armypubs.army.mil/epubs/DR_pubs/DR_a/pdf/web/ARN36119_TC%203-22x9%20FINAL%20WEB.pdf|TC 3-22.9 Rifle and Carbine Marksmanship|defense" "https://armypubs.army.mil/epubs/DR_pubs/DR_a/pdf/web/ARN20697_FM%203-06%20FINAL%20WEB%201.pdf|FM 3-06 Urban Operations|defense" "https://armypubs.army.mil/epubs/DR_pubs/DR_a/pdf/web/atp3_21x8.pdf|ATP 3-21.8 Infantry Platoon and Squad|defense" "https://www.bits.de/NRANEU/others/amd-us-archive/fm5-31%2865%29.pdf|FM 5-31 Boobytraps|defense" # ========== NAVIGATION ========== "https://www.globalsecurity.org/military/library/policy/army/fm/3-25-26/fm3-25-26.pdf|FM 3-25.26 Map Reading and Land Navigation|navigation" "https://navlist.net/imgx/Bowditch-2017-v1.pdf|Bowditch American Practical Navigator V1 (2017)|navigation" "https://navlist.net/imgx/Bowditch-2017-v2.pdf|Bowditch American Practical Navigator V2 (2017)|navigation" # ========== COMMUNICATIONS ========== "https://www.cisa.gov/sites/default/files/2024-12/NIFOG%202.02_508%20FINAL%20VERSION%2012%2003%202024.pdf|NIFOG 2.02 - National Interop Field Ops Guide|comms" "https://www.qsl.net/w/wb4bxw/books/ARRL_Ham_Radio_License_Manual.pdf|ARRL Ham Radio License Manual (Technician)|comms" "https://www.govinfo.gov/content/pkg/CFR-2024-title47-vol5/pdf/CFR-2024-title47-vol5-part97.pdf|FCC Part 97 Amateur Radio Service Rules (2024)|comms" # ========== PREPAREDNESS ========== "https://www.ready.gov/sites/default/files/2021-11/are-you-ready-guide.pdf|FEMA Are You Ready Guide|preparedness" # ========== FOOD PRESERVATION ========== "https://archive.org/download/usda-complete-guide-to-home-canning-2015-revision/USDA-Complete-Guide-to-Home-Canning-2015-revision.pdf|USDA Complete Guide to Home Canning 2015|food" # ========== TRADES / REPAIR (Audel, vintage public domain) ========== "https://archive.org/download/audel.carpenter.no1.1923/audel.carpenter.no1.1923.pdf|Audels Carpenters and Builders Guide Vol 1 (1923)|repair" # ========== ENGINEERING / SHOP ========== "https://archive.org/download/machineryshandbo00indu/machineryshandbo00indu.pdf|Machinery's Handbook 6th Edition (1924)|engineering" ) ok=0; fail=0; total=${#PDFS[@]} i=0 for entry in "${PDFS[@]}"; do i=$((i+1)) IFS='|' read -r url title tag <<< "$entry" fname=$(echo "$title" | tr -c 'A-Za-z0-9._-' '_' | head -c 100).pdf out="$TMP/$fname" echo "" echo "==> [$i/$total] [$title]" echo " URL: $url" if wget -q --show-progress -U "Mozilla/5.0" --tries=2 --timeout=60 -O "$out" "$url"; then if [ -s "$out" ] && file "$out" | grep -qi "PDF"; then sz=$(du -h "$out" | cut -f1) curl -s -X POST "$API" -F "file=@$out;type=application/pdf" -F "title=$title" -F "tag=$tag" > /dev/null echo " ✓ uploaded ($sz)" ok=$((ok+1)) else echo " ✗ skipped (not a valid PDF)" fail=$((fail+1)) fi rm -f "$out" else echo " ✗ download failed" fail=$((fail+1)) fi done echo "" echo "================================" echo "OK: $ok Failed: $fail Total: $total" echo "================================" rm -rf "$TMP"