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

Merge pull request #43 from tim-moody/wip-6-17

handle non-standard file names for gutenberg zims
This commit is contained in:
Tim Moody 2017-06-17 11:01:04 -04:00 committed by GitHub
commit c2ce1806fe

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