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

some fixes to testing

This commit is contained in:
Tim Moody 2019-11-30 10:38:09 -05:00
parent 9c1ee8474f
commit ae4e17ef1b
2 changed files with 4 additions and 3 deletions

View file

@ -77,7 +77,7 @@ def read_library_xml(lib_xml_file, kiwix_exclude_attr=[""]): # duplicated from i
zims_installed = {}
return zims_installed, path_to_id_map
def rem_libr_xml(id):
def rem_libr_xml(id, kiwix_library_xml):
command = CONST.kiwix_manage + " " + kiwix_library_xml + " remove " + id
#print command
args = shlex.split(command)

View file

@ -55,7 +55,7 @@ def main():
remove_list_str = ""
for item in path_to_id_map:
if item not in zim_files:
iiab.rem_libr_xml(path_to_id_map[item])
iiab.rem_libr_xml(path_to_id_map[item], kiwix_library_xml)
# Add zims from file system that are not in library.xml
for item in zim_files:
@ -66,7 +66,8 @@ def main():
if adm_cons_installed:
print("Writing zim_versions_idx")
iiab.read_lang_codes() # needed by following
adm.write_zim_versions_idx(zim_versions, kiwix_library_xml, zim_version_idx_dir)
zim_menu_defs = adm.get_zim_menu_defs() # read all menu defs
adm.write_zim_versions_idx(zim_versions, kiwix_library_xml, zim_version_idx_dir, zim_menu_defs)
sys.exit()
def parse_args():