Skip to content

Fix retired ZIM names, add Turkish content, catalog-based versions + SHA-256 / Ölü ZIM adları, Türkçe içerik, katalog tabanlı sürüm + SHA-256 - #3

Merged
schematrix merged 1 commit into
schematrix:mainfrom
turer73:fix/catalog-and-turkish-content
Nov 7, 2026
Merged

schematrix merged 1 commit into
schematrix:mainfrom
turer73:fix/catalog-and-turkish-content

Conversation

@turer73

@turer73 turer73 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

English · Türkçe

English

Small, focused fix after scanning the Kiwix OPDS catalog on 2026-10-31 (library.kiwix.org/catalog/v2/entries?count=-1, 3656 entries):

Dead names in content.conf

  • wikem_en_all_maxi — no longer in the catalog (WikEM was retired). Removed with an explanatory comment; mdwiki_en_all_maxi + new medlineplus.gov_en_all cover the same ground.
  • fas-military-medicine_en — renamed upstream to irp.fas.org_en_military-medicine (zimit, 2026-10, ~65 MB). Fixed.
  • Today's script prints not found for both and exits with failed=1; the homepage shows them grey forever.

Turkish content (the catalog has these but the list only had Vikipedi): wiktionary_tr_all_nopic ~810 MB (no maxi build exists), wikibooks_tr_all_maxi ~27 MB, wikisource_tr_all_maxi ~68 MB, wikiquote_tr_all_maxi ~59 MB, ifixit_tr_all ~3.6 GB, phet_tr_all ~107 MB. Plus appropedia_en_all_maxi ~580 MB (survival) and medlineplus.gov_en_all ~1.9 GB (health). Same rows added to the homepage CATS list; maps and Kolibri rows untouched.

scripts/download-content.sh

  • Version lookup now comes from the OPDS catalog in one request instead of grepping download.kiwix.org/zim/<folder>/ directory listings (the wikipedia listing is thousands of lines). The directory listing is kept only as a fallback when the catalog is unreachable. Two-column conf format and TR/EN messages unchanged.
  • Free-space check before each download: remaining bytes + RESERVE_GB headroom (default 5 GB).
  • SHA-256 verification against the .sha256 Kiwix publishes next to every ZIM. Mismatch deletes the file and sets failed=1; a missing .sha256 is accepted with a warning.
  • DEST overridable via environment (used for testing; default unchanged).

Evidence

  • All 29 active lines in the new content.conf resolve in the catalog, each in the folder the conf names.
  • Real run on a Debian box: zimgit-knots_en_2024-08.zim downloaded, sha256 7c3120b1…a57b matched. Negative paths exercised: a planted corrupt .part → checksum mismatch, corrupt file deleted; re-run → already present; RESERVE_GB=100000 → not enough space; wikem_en_all_maxi → not found in the Kiwix catalog.
  • bash -n clean. git merge-tree against PR Add optional semantic search with Embedding Model #1 (feat/cevher-semantic-search): no conflicts.

Türkçe

Kiwix OPDS kataloğu 2026-10-31'de tarandı (3656 kayıt); küçük ve odaklı düzeltme:

content.conf'taki ölü adlar

  • wikem_en_all_maxi katalogdan kaldırılmış (WikEM çekilmiş). Açıklayıcı yorumla çıkarıldı; mdwiki_en_all_maxi + yeni medlineplus.gov_en_all aynı alanı kapsıyor.
  • fas-military-medicine_en → yeni adı irp.fas.org_en_military-medicine (zimit, 2026-10, ~65 MB). Düzeltildi.
  • Mevcut betik ikisi için bulunamadı basıp failed=1 ile bitiyor; ana sayfada iki satır hep gri kalıyor.

Türkçe içerik (katalogda var, listede yalnız Vikipedi vardı): Vikisözlük wiktionary_tr_all_nopic ~810 MB (maxi sürümü yok), Vikikitap ~27 MB, Vikikaynak ~68 MB, Vikisöz ~59 MB, iFixit TR ~3,6 GB, PhET TR ~107 MB. Ayrıca hayatta kalmaya Appropedia ~580 MB, sağlığa MedlinePlus ~1,9 GB. Aynı satırlar ana sayfadaki CATS listesine eklendi; Haritalar ve Kolibri satırlarına dokunulmadı.

scripts/download-content.sh

  • Sürüm artık download.kiwix.org/zim/<klasör>/ dizin listesini grep'lemek yerine OPDS kataloğundan tek istekle çözülüyor (wikipedia listesi binlerce satır). Dizin listesi yalnız katalog erişilemezse yedek olarak duruyor. İki sütunlu conf biçimi ve TR/EN mesajlar aynı.
  • Her indirmeden önce yer kontrolü: kalan boyut + RESERVE_GB pay (varsayılan 5 GB).
  • Kiwix'in her ZIM'in yanında yayımladığı .sha256 ile doğrulama. Uyuşmazsa dosya silinir ve failed=1; .sha256 yoksa uyarıyla kabul edilir.
  • DEST ortam değişkeniyle değiştirilebilir (test için; varsayılan aynı).

Kanıt

  • Yeni content.conf'taki 29 etkin satırın hepsi katalogda, conf'ta yazan klasörde çözülüyor.
  • Debian makinede gerçek koşu: zimgit-knots_en_2024-08.zim indi, sha256 7c3120b1…a57b tuttu. Olumsuz yollar: bozuk .part → sha256 uyuşmuyor, bozuk dosya silindi; tekrar koşu → zaten var; RESERVE_GB=100000 → yer yok; wikem_en_all_maxi → bulunamadı.
  • bash -n temiz. PR Add optional semantic search with Embedding Model #1 (feat/cevher-semantic-search) ile git merge-tree: çakışma yok.

… Kiwix catalog and verify SHA-256

Kiwix kataloğu (2026-10-31, 3656 kayıt) tarandı: content.conf'taki
wikem_en_all_maxi ve fas-military-medicine_en katalogda yok. Askeri tıp
irp.fas.org_en_military-medicine adıyla devam ediyor; WikEM çekilmiş,
yerine MedlinePlus eklendi.

Catalog scan (2026-10-31, 3656 entries): wikem_en_all_maxi and
fas-military-medicine_en no longer exist. Military medicine lives on as
irp.fas.org_en_military-medicine; WikEM was retired, MedlinePlus added.

content.conf / index.html:
- Türkçe kitaplık: Vikisözlük, Vikikitap, Vikikaynak, Vikisöz, iFixit TR, PhET TR
- Hayatta kalma: Appropedia; Sağlık: MedlinePlus
- Haritalar ve Kolibri satırları korundu / maps and Kolibri rows kept

download-content.sh:
- Sürüm çözme OPDS kataloğundan (tek istek), klasör listesi yalnız yedek
  / version lookup from the OPDS catalog, directory listing only as fallback
- İndirmeden önce yer kontrolü: kalan boyut + RESERVE_GB pay
  / free-space check before each download: remaining bytes + headroom
- .sha256 ile doğrulama; uyuşmazsa dosya silinir, .sha256 yoksa uyarı
  / SHA-256 verification; mismatch deletes the file, missing .sha256 warns
- İki sütunlu conf biçimi ve TR/EN mesajlar korundu / conf format and
  bilingual messages unchanged

Gerçek koşu (klipper, Debian): zimgit-knots_en_2024-08.zim indirildi,
sha256 7c3120b1… doğrulandı; bozuk .part ile mismatch yolu, tekrar koşuda
"zaten var" ve yer-yok yolu sınandı.
@turer73

turer73 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

@schematrix merhaba, kısa özet / quick summary:

TR: Kataloğu 2026-10-31'de taradım; wikem_en_all_maxi ve fas-military-medicine_en artık Kiwix'te yok, bu yüzden mevcut betik her koşuda failed=1 ile bitiyor. Bu PR ikisini düzeltiyor, Türkçe kitaplığı tamamlıyor ve indirmeyi katalog + SHA-256 tabanına taşıyor. Betiği gerçek bir ZIM ile (bozuk dosya senaryosu dahil) Debian'da çalıştırdım; PR #1 ile git merge-tree çakışmasız. Yorum ve değişiklik isteğine açığım, küçültmek ya da bölmek isterseniz söylemeniz yeter.

EN: Catalog scanned 2026-10-31: wikem_en_all_maxi and fas-military-medicine_en are gone from Kiwix, so the current script ends every run with failed=1. This PR fixes both, completes the Turkish library and moves downloads to catalog lookup + SHA-256 verification. Tested on Debian with a real ZIM, including a corrupt-file case; git merge-tree against PR #1 is conflict-free. Happy to trim or split it if you prefer.

@turer73

turer73 commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

Update / Güncelleme

EN: Small follow-up on the Turkish content in this PR. I have been running the same catalog-based download on my own box and added four more Turkish Wikipedia topic ZIMs that are in the Kiwix catalog: wikipedia_tr_chemistry_maxi (~58 MB), wikipedia_tr_physics_maxi (~162 MB), wikipedia_tr_geography_maxi (~107 MB) and wikipedia_tr_molcell_maxi (~52 MB), all 2026-10 builds. They downloaded, passed the SHA-256 check and loaded in Kiwix (61 books in the library now). I kept them out of this PR so it stays small; if you want them in content.conf, I will send a tiny follow-up.

I also opened #5, a separate and optional offline vector map (works where the IIAB map download is blocked). It does not touch the files this PR changes, and git merge-tree against #1, #3, #4 and main is clean.

TR: Bu PR'daki Türkçe içeriğe küçük bir ek. Aynı katalog tabanlı indirmeyi kendi cihazımda çalıştırıyorum ve Kiwix kataloğunda olan dört Türkçe Vikipedi konu ZIM'i daha ekledim: wikipedia_tr_chemistry_maxi (~58 MB), wikipedia_tr_physics_maxi (~162 MB), wikipedia_tr_geography_maxi (~107 MB) ve wikipedia_tr_molcell_maxi (~52 MB), hepsi 2026-10 yapıları. İndi, SHA-256 doğrulamasını geçti ve Kiwix'te yüklendi (kütüphane şimdi 61 kitap). PR küçük kalsın diye bunları bu PR'a koymadım; content.conf'a eklenmesini isterseniz küçük bir takip PR'ı gönderirim.

Ayrıca ayrı ve isteğe bağlı bir çevrimdışı vektör harita için #5'i açtım (IIAB harita indirmesinin engelli olduğu yerlerde çalışır). Bu PR'ın değiştirdiği dosyalara dokunmuyor; git merge-tree ile #1, #3, #4 ve main çakışmasız.

@volthdl

volthdl commented Nov 1, 2026

Copy link
Copy Markdown

Bağımsız olarak doğruladım (2026-11-01):

Yorumdaki dört konu ZIM'i (kimya, fizik, coğrafya, moleküler biyoloji) katalogda var, ama wikipedia_tr_all_maxi'nin alt kümesi. Tam Türkçe Vikipedi indirilirken aynı içerik iki kez inmesin diye, takip PR'ında "küçük diskler için" notuyla # ile kapalı satırlar olarak eklenmesini öneririm. Katalogda tarih, matematik, bilgisayar ve top paketleri de var.

EN: Independently verified: 29/29 entries resolve in the current catalog, the two retired names are gone, real downloads with SHA-256 and a corrupted-file case work, and #4 → #3 → #5 → #1 merge cleanly. The topic ZIMs are subsets of wikipedia_tr_all_maxi, so I'd add them as commented-out small-disk alternatives.

@schematrix

schematrix commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Kataloğu tek tek tarayıp ölü linkleri bulman süper olmuş, Türkçe içerikler de çok iyi. Pi'de tam bir indirme yapıp SHA-256 kontrolüyle deneyeceğim, sorun çıkmazsa merge ederim.

Going through the whole catalog to find the dead names is awesome, and the Turkish content is great too. I'll run a full download with the SHA-256 check on the Pi and merge if there are no issues.

@schematrix

Copy link
Copy Markdown
Owner

Merhaba turer73, bugün #3'ü gerçek kutuda, Pi 5 üzerinde denedim. Betiğin içerik listesini argüman olarak alabilmesi sayesinde büyük Vikipedi dosyalarına dokunmadan yeni listeden beş içerik seçip indirdim. Vikikitap, Vikisöz, Vikikaynak, PhET ve askeri sahra tıbbının yeni adı sorunsuz indi, hepsinde SHA-256 tuttu, Kiwix kütüphanesi yenilendi ve ana sayfada hazır olarak göründü. volthdl'ın bağımsız doğrulaması da çok değerliydi, ikinize de teşekkürler.

Küçük bir gözlem. Kutuda eski adlı fas-military-medicine_en_2025-06.zim kaldı, çünkü betik eski sürümleri aynı ön ekle siliyor ve bu dosyanın adı değişmiş. Elle sildim. İleride README'ye mevcut kutular için kısa bir not eklenebilir.
Bu PR'ı merge ediyorum. Türkçe Vikipedi konu paketleri için önerdiğin takip PR'ını da volthdl'ın dediği gibi küçük diskler için kapalı satırlar olarak görmek isterim.


Hi turer73, today I tested #3 on the real box, a Pi 5. Since the script takes the content list as an argument, I picked five items from the new list without touching the big Wikipedia files. Wikibooks, Wikiquote, Wikisource, PhET and the new name of the military medicine ZIM all downloaded fine, SHA-256 matched for every file, the Kiwix library was rebuilt and they showed up as ready on the homepage. volthdl's independent verification was really valuable too, thanks to you both.

One small observation. The old fas-military-medicine_en_2025-06.zim stayed on the box, because the script removes old versions by prefix and this file was renamed. I removed it by hand. A short note in the README for existing boxes could help later. I'm merging this PR. I'd also love to see the follow-up PR you mentioned for the Turkish Wikipedia topic packs, as commented-out lines for small disks as volthdl suggested.

@schematrix
schematrix merged commit 4fe187d into schematrix:main Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants