From 7dac4c5e6053b601cc7e94f3df53e4e9b0625d9b Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 22 Mar 2026 18:40:27 +0000 Subject: [PATCH] Add all 5 Stack Exchange sites + reorder ZIM list for dev focus MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Setup wizard ZIM checklist now includes: - Stack Overflow, Ask Ubuntu, Super User, Unix & Linux SE, Server Fault (was only Stack Overflow before) - DevDocs and FreeCodeCamp moved up near the top - List grouped: Dev & Sysadmin → Reference → Other - Whiptail dialog height increased to fit all 22 items Both whiptail (GUI) and plain terminal (fallback) lists match. Download handlers added for all new SE sites. https://claude.ai/code/session_01PtYTPherSJaxDEVPgF6Nxu --- laptop_full_setup.sh | 145 +++++++++++++++++++++++++------------------ 1 file changed, 86 insertions(+), 59 deletions(-) diff --git a/laptop_full_setup.sh b/laptop_full_setup.sh index 7946db1..49dd59a 100755 --- a/laptop_full_setup.sh +++ b/laptop_full_setup.sh @@ -324,25 +324,29 @@ if $SVC_KIWIX; then if _ZIM_SEL=$(whiptail --backtitle "Kiwix" \ --title "Select ZIMs to Download" \ --checklist "SPACE = toggle ENTER = confirm ESC = skip\nPre-checked = already downloaded" \ - 24 72 16 \ - "wikipedia" "$(printf '%-30s %7s' 'Wikipedia' '~46 GB')" "$(_zimon wikipedia_en_all_nopic)" \ - "stackoverflow" "$(printf '%-30s %7s' 'Stack Overflow' '~3 GB')" "$(_zimon stackoverflow.com_en_all)" \ - "archlinux" "$(printf '%-30s %7s' 'Arch Linux Wiki' '~30 MB')" "$(_zimon archlinux_en_all)" \ - "wiktionary" "$(printf '%-30s %7s' 'Wiktionary' '~2 GB')" "$(_zimon wiktionary_en_all_nopic)" \ - "wikibooks" "$(printf '%-30s %7s' 'Wikibooks' '~500 MB')" "$(_zimon wikibooks_en_all_nopic)" \ - "wikisource" "$(printf '%-30s %7s' 'Wikisource' '~4 GB')" "$(_zimon wikisource_en_all_nopic)" \ - "wikivoyage" "$(printf '%-30s %7s' 'Wikivoyage' '~200 MB')" "$(_zimon wikivoyage_en_all_nopic)" \ - "wikiversity" "$(printf '%-30s %7s' 'Wikiversity' '~500 MB')" "$(_zimon wikiversity_en_all_nopic)" \ - "wikinews" "$(printf '%-30s %7s' 'WikiNews' '~300 MB')" "$(_zimon wikinews_en_all_nopic)" \ - "wikiquote" "$(printf '%-30s %7s' 'Wikiquote' '~300 MB')" "$(_zimon wikiquote_en_all_nopic)" \ - "vikidia" "$(printf '%-30s %7s' 'Vikidia (kids K-8)' '~66 MB')" "$(_zimon vikidia_en_all_nopic)" \ - "ted" "$(printf '%-30s %7s' 'TED Talks' '~5 GB')" "$(_zimon ted_mul_youth)" \ - "phet" "$(printf '%-30s %7s' 'PhET Simulations' '~500 MB')" "$(_zimon phet_en_all)" \ - "devdocs" "$(printf '%-30s %7s' 'DevDocs' '~1 GB')" "$(_zimon devdocs_en_zig)" \ - "freecodecamp" "$(printf '%-30s %7s' 'FreeCodeCamp' 'small')" "$(_zimon freecodecamp_en_all)" \ - "ifixit" "$(printf '%-30s %7s' 'iFixit' '~2 GB')" "$(_zimon ifixit_en_all)" \ - "libretexts" "$(printf '%-30s %7s' 'LibreTexts' 'varies')" "$(_zimon libretexts.org_en)" \ - "gutenberg" "$(printf '%-30s %7s' 'Project Gutenberg' '~60 GB')" "$(_zimon gutenberg_en_all)" \ + 28 76 22 \ + "wikipedia" "$(printf '%-30s %7s' 'Wikipedia' '~46 GB')" "$(_zimon wikipedia_en_all_nopic)" \ + "stackoverflow" "$(printf '%-30s %7s' 'Stack Overflow' '~3 GB')" "$(_zimon stackoverflow.com_en_all)" \ + "askubuntu" "$(printf '%-30s %7s' 'Ask Ubuntu' '~1 GB')" "$(_zimon askubuntu.com_en_all)" \ + "superuser" "$(printf '%-30s %7s' 'Super User' '~1 GB')" "$(_zimon superuser.com_en_all)" \ + "unixse" "$(printf '%-30s %7s' 'Unix & Linux SE' '~500 MB')" "$(_zimon unix.stackexchange.com_en_all)" \ + "serverfault" "$(printf '%-30s %7s' 'Server Fault' '~500 MB')" "$(_zimon serverfault.com_en_all)" \ + "devdocs" "$(printf '%-30s %7s' 'DevDocs (API docs)' '~1 GB')" "$(_zimon devdocs_en_zig)" \ + "archlinux" "$(printf '%-30s %7s' 'Arch Linux Wiki' '~30 MB')" "$(_zimon archlinux_en_all)" \ + "freecodecamp" "$(printf '%-30s %7s' 'FreeCodeCamp' 'small')" "$(_zimon freecodecamp_en_all)" \ + "wiktionary" "$(printf '%-30s %7s' 'Wiktionary' '~2 GB')" "$(_zimon wiktionary_en_all_nopic)" \ + "wikibooks" "$(printf '%-30s %7s' 'Wikibooks' '~500 MB')" "$(_zimon wikibooks_en_all_nopic)" \ + "wikisource" "$(printf '%-30s %7s' 'Wikisource' '~4 GB')" "$(_zimon wikisource_en_all_nopic)" \ + "wikivoyage" "$(printf '%-30s %7s' 'Wikivoyage' '~200 MB')" "$(_zimon wikivoyage_en_all_nopic)" \ + "wikiversity" "$(printf '%-30s %7s' 'Wikiversity' '~500 MB')" "$(_zimon wikiversity_en_all_nopic)" \ + "wikinews" "$(printf '%-30s %7s' 'WikiNews' '~300 MB')" "$(_zimon wikinews_en_all_nopic)" \ + "wikiquote" "$(printf '%-30s %7s' 'Wikiquote' '~300 MB')" "$(_zimon wikiquote_en_all_nopic)" \ + "vikidia" "$(printf '%-30s %7s' 'Vikidia (kids K-8)' '~66 MB')" "$(_zimon vikidia_en_all_nopic)" \ + "ted" "$(printf '%-30s %7s' 'TED Talks' '~5 GB')" "$(_zimon ted_mul_youth)" \ + "phet" "$(printf '%-30s %7s' 'PhET Simulations' '~500 MB')" "$(_zimon phet_en_all)" \ + "ifixit" "$(printf '%-30s %7s' 'iFixit' '~2 GB')" "$(_zimon ifixit_en_all)" \ + "libretexts" "$(printf '%-30s %7s' 'LibreTexts' 'varies')" "$(_zimon libretexts.org_en)" \ + "gutenberg" "$(printf '%-30s %7s' 'Project Gutenberg' '~60 GB')" "$(_zimon gutenberg_en_all)" \ 3>&1 1>&2 2>&3 2>/dev/null); then if [[ -n "$_ZIM_SEL" ]]; then ZIM_PICKS=$(tr -d '"' <<< "$_ZIM_SEL") @@ -375,46 +379,57 @@ if $SVC_KIWIX; then } echo "" echo " Select ZIMs to download (space-separated numbers, e.g. 1 3 5):" - printf " %2s) %-26s %7s %s\n" 1 "Wikipedia" "~46 GB" "$(_zim_tag wikipedia_en_all_nopic)" - printf " %2s) %-26s %7s %s\n" 2 "Stack Overflow" "~3 GB" "$(_zim_tag stackoverflow.com_en_all)" - printf " %2s) %-26s %7s %s\n" 3 "Arch Linux Wiki" "~30 MB" "$(_zim_tag archlinux_en_all)" - printf " %2s) %-26s %7s %s\n" 4 "Wiktionary" "~2 GB" "$(_zim_tag wiktionary_en_all_nopic)" - printf " %2s) %-26s %7s %s\n" 5 "Wikibooks" "~500 MB" "$(_zim_tag wikibooks_en_all_nopic)" - printf " %2s) %-26s %7s %s\n" 6 "Wikisource" "~4 GB" "$(_zim_tag wikisource_en_all_nopic)" - printf " %2s) %-26s %7s %s\n" 7 "Wikivoyage" "~200 MB" "$(_zim_tag wikivoyage_en_all_nopic)" - printf " %2s) %-26s %7s %s\n" 8 "Wikiversity" "~500 MB" "$(_zim_tag wikiversity_en_all_nopic)" - printf " %2s) %-26s %7s %s\n" 9 "WikiNews" "~300 MB" "$(_zim_tag wikinews_en_all_nopic)" - printf " %2s) %-26s %7s %s\n" 10 "Wikiquote" "~300 MB" "$(_zim_tag wikiquote_en_all_nopic)" - printf " %2s) %-26s %7s %s\n" 11 "Vikidia (kids K-8)" "~66 MB" "$(_zim_tag vikidia_en_all_nopic)" - printf " %2s) %-26s %7s %s\n" 12 "TED Talks" "~5 GB" "$(_zim_tag ted_mul_youth)" - printf " %2s) %-26s %7s %s\n" 13 "PhET Simulations" "~500 MB" "$(_zim_tag phet_en_all)" - printf " %2s) %-26s %7s %s\n" 14 "DevDocs" "~1 GB" "$(_zim_tag devdocs_en_zig)" - printf " %2s) %-26s %7s %s\n" 15 "FreeCodeCamp" "small" "$(_zim_tag freecodecamp_en_all)" - printf " %2s) %-26s %7s %s\n" 16 "iFixit" "~2 GB" "$(_zim_tag ifixit_en_all)" - printf " %2s) %-26s %7s %s\n" 17 "LibreTexts" "varies" "$(_zim_tag libretexts.org_en)" - printf " %2s) %-26s %7s %s\n" 18 "Project Gutenberg" "~60 GB" "$(_zim_tag gutenberg_en_all)" + echo " ── Dev & Sysadmin (most useful for AI coding) ──" + printf " %2s) %-26s %7s %s\n" 1 "Wikipedia" "~46 GB" "$(_zim_tag wikipedia_en_all_nopic)" + printf " %2s) %-26s %7s %s\n" 2 "Stack Overflow" "~3 GB" "$(_zim_tag stackoverflow.com_en_all)" + printf " %2s) %-26s %7s %s\n" 3 "Ask Ubuntu" "~1 GB" "$(_zim_tag askubuntu.com_en_all)" + printf " %2s) %-26s %7s %s\n" 4 "Super User" "~1 GB" "$(_zim_tag superuser.com_en_all)" + printf " %2s) %-26s %7s %s\n" 5 "Unix & Linux SE" "~500 MB" "$(_zim_tag unix.stackexchange.com_en_all)" + printf " %2s) %-26s %7s %s\n" 6 "Server Fault" "~500 MB" "$(_zim_tag serverfault.com_en_all)" + printf " %2s) %-26s %7s %s\n" 7 "DevDocs (API docs)" "~1 GB" "$(_zim_tag devdocs_en_zig)" + printf " %2s) %-26s %7s %s\n" 8 "Arch Linux Wiki" "~30 MB" "$(_zim_tag archlinux_en_all)" + printf " %2s) %-26s %7s %s\n" 9 "FreeCodeCamp" "small" "$(_zim_tag freecodecamp_en_all)" + echo " ── Reference ──" + printf " %2s) %-26s %7s %s\n" 10 "Wiktionary" "~2 GB" "$(_zim_tag wiktionary_en_all_nopic)" + printf " %2s) %-26s %7s %s\n" 11 "Wikibooks" "~500 MB" "$(_zim_tag wikibooks_en_all_nopic)" + printf " %2s) %-26s %7s %s\n" 12 "Wikisource" "~4 GB" "$(_zim_tag wikisource_en_all_nopic)" + printf " %2s) %-26s %7s %s\n" 13 "Wikivoyage" "~200 MB" "$(_zim_tag wikivoyage_en_all_nopic)" + printf " %2s) %-26s %7s %s\n" 14 "Wikiversity" "~500 MB" "$(_zim_tag wikiversity_en_all_nopic)" + printf " %2s) %-26s %7s %s\n" 15 "WikiNews" "~300 MB" "$(_zim_tag wikinews_en_all_nopic)" + printf " %2s) %-26s %7s %s\n" 16 "Wikiquote" "~300 MB" "$(_zim_tag wikiquote_en_all_nopic)" + printf " %2s) %-26s %7s %s\n" 17 "Vikidia (kids K-8)" "~66 MB" "$(_zim_tag vikidia_en_all_nopic)" + echo " ── Other ──" + printf " %2s) %-26s %7s %s\n" 18 "TED Talks" "~5 GB" "$(_zim_tag ted_mul_youth)" + printf " %2s) %-26s %7s %s\n" 19 "PhET Simulations" "~500 MB" "$(_zim_tag phet_en_all)" + printf " %2s) %-26s %7s %s\n" 20 "iFixit" "~2 GB" "$(_zim_tag ifixit_en_all)" + printf " %2s) %-26s %7s %s\n" 21 "LibreTexts" "varies" "$(_zim_tag libretexts.org_en)" + printf " %2s) %-26s %7s %s\n" 22 "Project Gutenberg" "~60 GB" "$(_zim_tag gutenberg_en_all)" echo "" read -rp " Your choices (e.g. 1 2 3): " _ZIM_NUMS for _n in $_ZIM_NUMS; do case "$_n" in 1) ZIM_PICKS+="${ZIM_PICKS:+ }wikipedia" ;; 2) ZIM_PICKS+="${ZIM_PICKS:+ }stackoverflow" ;; - 3) ZIM_PICKS+="${ZIM_PICKS:+ }archlinux" ;; - 4) ZIM_PICKS+="${ZIM_PICKS:+ }wiktionary" ;; - 5) ZIM_PICKS+="${ZIM_PICKS:+ }wikibooks" ;; - 6) ZIM_PICKS+="${ZIM_PICKS:+ }wikisource" ;; - 7) ZIM_PICKS+="${ZIM_PICKS:+ }wikivoyage" ;; - 8) ZIM_PICKS+="${ZIM_PICKS:+ }wikiversity" ;; - 9) ZIM_PICKS+="${ZIM_PICKS:+ }wikinews" ;; - 10) ZIM_PICKS+="${ZIM_PICKS:+ }wikiquote" ;; - 11) ZIM_PICKS+="${ZIM_PICKS:+ }vikidia" ;; - 12) ZIM_PICKS+="${ZIM_PICKS:+ }ted" ;; - 13) ZIM_PICKS+="${ZIM_PICKS:+ }phet" ;; - 14) ZIM_PICKS+="${ZIM_PICKS:+ }devdocs" ;; - 15) ZIM_PICKS+="${ZIM_PICKS:+ }freecodecamp" ;; - 16) ZIM_PICKS+="${ZIM_PICKS:+ }ifixit" ;; - 17) ZIM_PICKS+="${ZIM_PICKS:+ }libretexts" ;; - 18) ZIM_PICKS+="${ZIM_PICKS:+ }gutenberg" ;; + 3) ZIM_PICKS+="${ZIM_PICKS:+ }askubuntu" ;; + 4) ZIM_PICKS+="${ZIM_PICKS:+ }superuser" ;; + 5) ZIM_PICKS+="${ZIM_PICKS:+ }unixse" ;; + 6) ZIM_PICKS+="${ZIM_PICKS:+ }serverfault" ;; + 7) ZIM_PICKS+="${ZIM_PICKS:+ }devdocs" ;; + 8) ZIM_PICKS+="${ZIM_PICKS:+ }archlinux" ;; + 9) ZIM_PICKS+="${ZIM_PICKS:+ }freecodecamp" ;; + 10) ZIM_PICKS+="${ZIM_PICKS:+ }wiktionary" ;; + 11) ZIM_PICKS+="${ZIM_PICKS:+ }wikibooks" ;; + 12) ZIM_PICKS+="${ZIM_PICKS:+ }wikisource" ;; + 13) ZIM_PICKS+="${ZIM_PICKS:+ }wikivoyage" ;; + 14) ZIM_PICKS+="${ZIM_PICKS:+ }wikiversity" ;; + 15) ZIM_PICKS+="${ZIM_PICKS:+ }wikinews" ;; + 16) ZIM_PICKS+="${ZIM_PICKS:+ }wikiquote" ;; + 17) ZIM_PICKS+="${ZIM_PICKS:+ }vikidia" ;; + 18) ZIM_PICKS+="${ZIM_PICKS:+ }ted" ;; + 19) ZIM_PICKS+="${ZIM_PICKS:+ }phet" ;; + 20) ZIM_PICKS+="${ZIM_PICKS:+ }ifixit" ;; + 21) ZIM_PICKS+="${ZIM_PICKS:+ }libretexts" ;; + 22) ZIM_PICKS+="${ZIM_PICKS:+ }gutenberg" ;; esac done unset -f _zim_tag @@ -1302,6 +1317,10 @@ if $SVC_KIWIX && [[ "$ZIM_CHOICE" != "3" ]]; then WIKI=$(latest_zim "$MIRROR/wikipedia" "wikipedia_en_all_nopic") SO=$(latest_zim "$MIRROR/stack_exchange" "stackoverflow.com_en_all") + ASKUBUNTU=$(latest_zim "$MIRROR/stack_exchange" "askubuntu.com_en_all") + SUPERUSER=$(latest_zim "$MIRROR/stack_exchange" "superuser.com_en_all") + UNIXSE=$(latest_zim "$MIRROR/stack_exchange" "unix.stackexchange.com_en_all") + SERVERFAULT=$(latest_zim "$MIRROR/stack_exchange" "serverfault.com_en_all") ARCH=$(latest_zim "$MIRROR/other" "archlinux_en_all_maxi") WIKT=$(latest_zim "$MIRROR/wiktionary" "wiktionary_en_all_nopic") WIKB=$(latest_zim "$MIRROR/wikibooks" "wikibooks_en_all_nopic") @@ -1324,9 +1343,13 @@ if $SVC_KIWIX && [[ "$ZIM_CHOICE" != "3" ]]; then rm -f "$KIWIX_DIR/.download_pids" for _zn in $ZIM_PICKS; do case "$_zn" in - wikipedia) dl_zim "wikipedia" "$WIKI" "Wikipedia" ;; - stackoverflow) dl_zim "stack_exchange" "$SO" "Stack Overflow" ;; - archlinux) dl_zim "other" "$ARCH" "Arch Linux Wiki" ;; + wikipedia) dl_zim "wikipedia" "$WIKI" "Wikipedia" ;; + stackoverflow) dl_zim "stack_exchange" "$SO" "Stack Overflow" ;; + askubuntu) dl_zim "stack_exchange" "$ASKUBUNTU" "Ask Ubuntu" ;; + superuser) dl_zim "stack_exchange" "$SUPERUSER" "Super User" ;; + unixse) dl_zim "stack_exchange" "$UNIXSE" "Unix & Linux SE" ;; + serverfault) dl_zim "stack_exchange" "$SERVERFAULT" "Server Fault" ;; + archlinux) dl_zim "other" "$ARCH" "Arch Linux Wiki" ;; wiktionary) dl_zim "wiktionary" "$WIKT" "Wiktionary" ;; wikibooks) dl_zim "wikibooks" "$WIKB" "Wikibooks" ;; wikisource) dl_zim "wikisource" "$WIKS" "Wikisource" ;; @@ -1347,9 +1370,13 @@ if $SVC_KIWIX && [[ "$ZIM_CHOICE" != "3" ]]; then else # Download all rm -f "$KIWIX_DIR/.download_pids" - dl_zim "wikipedia" "$WIKI" "Wikipedia" - dl_zim "stack_exchange" "$SO" "Stack Overflow" - dl_zim "other" "$ARCH" "Arch Linux Wiki" + dl_zim "wikipedia" "$WIKI" "Wikipedia" + dl_zim "stack_exchange" "$SO" "Stack Overflow" + dl_zim "stack_exchange" "$ASKUBUNTU" "Ask Ubuntu" + dl_zim "stack_exchange" "$SUPERUSER" "Super User" + dl_zim "stack_exchange" "$UNIXSE" "Unix & Linux SE" + dl_zim "stack_exchange" "$SERVERFAULT" "Server Fault" + dl_zim "other" "$ARCH" "Arch Linux Wiki" dl_zim "wiktionary" "$WIKT" "Wiktionary" dl_zim "wikibooks" "$WIKB" "Wikibooks" dl_zim "wikisource" "$WIKS" "Wikisource"