1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

handle non-standard file names for gutenberg zims

This commit is contained in:
Tim Moody 2017-06-17 09:11:55 -04:00
parent 8db88bc1b1
commit 86ff53e1b6

View file

@ -72,7 +72,12 @@ def main():
# create map of generic zim name to actual, assumes pattern of <name>_<yyyy-mm>
# all current files follow this pattern, but some older ones, no longer in the catalog, do not
ulpos = filename.rfind("_")
# but gutenberg don't
if "gutenberg_" in filename:
ulpos = filename[:ulpos].rfind("_")
wiki_name = filename[:ulpos]
zim_versions[wiki_name] = filename # if there are multiples, last should win
except: #skip things that don't work