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:
parent
9c1ee8474f
commit
ae4e17ef1b
2 changed files with 4 additions and 3 deletions
|
@ -77,7 +77,7 @@ def read_library_xml(lib_xml_file, kiwix_exclude_attr=[""]): # duplicated from i
|
||||||
zims_installed = {}
|
zims_installed = {}
|
||||||
return zims_installed, path_to_id_map
|
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
|
command = CONST.kiwix_manage + " " + kiwix_library_xml + " remove " + id
|
||||||
#print command
|
#print command
|
||||||
args = shlex.split(command)
|
args = shlex.split(command)
|
||||||
|
|
|
@ -55,7 +55,7 @@ def main():
|
||||||
remove_list_str = ""
|
remove_list_str = ""
|
||||||
for item in path_to_id_map:
|
for item in path_to_id_map:
|
||||||
if item not in zim_files:
|
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
|
# Add zims from file system that are not in library.xml
|
||||||
for item in zim_files:
|
for item in zim_files:
|
||||||
|
@ -66,7 +66,8 @@ def main():
|
||||||
if adm_cons_installed:
|
if adm_cons_installed:
|
||||||
print("Writing zim_versions_idx")
|
print("Writing zim_versions_idx")
|
||||||
iiab.read_lang_codes() # needed by following
|
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()
|
sys.exit()
|
||||||
|
|
||||||
def parse_args():
|
def parse_args():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue