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:
parent
8db88bc1b1
commit
86ff53e1b6
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue