mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #1301 from tim-moody/make-kiw-lib-nov-17
handle some old non-canonical file names, like gutenberg
This commit is contained in:
commit
fb4b8ae12b
1 changed files with 2 additions and 2 deletions
|
@ -126,8 +126,8 @@ def get_zim_list(path):
|
|||
wiki_name = old_zim_map[filename]
|
||||
else:
|
||||
ulpos = filename.rfind("_")
|
||||
# but gutenberg don't - future maybe put in old_zim_map (en and fr, but instance dates may change)
|
||||
if "gutenberg_" in filename:
|
||||
# but old gutenberg and some other names are not canonical
|
||||
if filename.rfind("-") < 0: # non-canonical name
|
||||
ulpos = filename[:ulpos].rfind("_")
|
||||
wiki_name = filename[:ulpos]
|
||||
zim_versions[wiki_name] = filename # if there are multiples, last should win
|
||||
|
|
Loading…
Add table
Reference in a new issue