You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Adı değişen ZIM'in eski dosyası diskte kalıyor / Old ZIM file stays on disk after a rename #43
scripts/download-content.sh, yeni sürüm indirilince eski sürümü aynı önekle siliyor (<önek>_YYYY-MM.zim). config/content.conf içinde önek değişince eski dosyayı silen bir şey kalmıyor. Örnek: 2da2102'de fas-military-medicine_en satırı irp.fas.org_en_military-medicine oldu. Eski adla kurulmuş bir kutuda fas-military-medicine_en_2025-06.zim diskte kalıyor (~78 MB). Bir satır yorum satırı yapılınca da aynı şey oluyor.
Kullanıcının elle koyduğu ZIM'ler de aynı klasörde olabileceği için, listede olmayan her şeyi kendiliğinden silmek doğru olmaz. Önerim:
content.conf satırına isteğe bağlı eski ad: old=fas-military-medicine_en. Betik, yeni dosya indirilip SHA-256 doğrulandıktan sonra yalnız bu öneke ait dosyaları siler. Satırın kendi açıklaması # ile devam eder, bugünkü biçim bozulmaz.
status.sh, hiçbir satıra uymayan ZIM'leri "listede olmayan" diye yalnız listeler, silmez.
Uygunsa bu ikisini tek PR'da yaparım. Başka bir yol tercih edersen (ör. yalnız 2. madde, ya da --prune seçeneği) ona göre yaparım.
English
scripts/download-content.sh removes older versions by prefix (<prefix>_YYYY-MM.zim) after a new one is downloaded. When a prefix changes in config/content.conf, nothing removes the old file. Example: 2da2102 renamed fas-military-medicine_en to irp.fas.org_en_military-medicine, so a box installed before that keeps fas-military-medicine_en_2025-06.zim (~78 MB). The same happens when a line is commented out.
Users may keep their own ZIMs in the same folder, so deleting everything that is not in the list would be unsafe. Proposal:
An optional old name on the content.conf line: old=fas-military-medicine_en. The script deletes files with that prefix only after the new file is downloaded and its SHA-256 verified. The comment still follows #, so the current format keeps working.
status.sh lists ZIMs that match no line as "not in the list", without deleting them.
If this fits, I'll do both in one PR. If you prefer another way (e.g. only item 2, or a --prune option), I'll follow that.
Activity