mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
commit
0ff08ea662
4 changed files with 14 additions and 22 deletions
|
@ -13,12 +13,6 @@
|
||||||
when: named_install
|
when: named_install
|
||||||
tags: base, named, network, domain
|
tags: base, named, network, domain
|
||||||
|
|
||||||
- name: Installing vector map test page
|
|
||||||
include_role:
|
|
||||||
name: osm-vector-maps
|
|
||||||
when: osm_vector_maps_install
|
|
||||||
tags: base, map
|
|
||||||
|
|
||||||
- name: Installing captive portal
|
- name: Installing captive portal
|
||||||
include_tasks: roles/captive-portal/tasks/main.yml
|
include_tasks: roles/captive-portal/tasks/main.yml
|
||||||
when: captive_portal_install
|
when: captive_portal_install
|
||||||
|
|
|
@ -27,18 +27,18 @@
|
||||||
when: moodle_install
|
when: moodle_install
|
||||||
tags: olpc, moodle
|
tags: olpc, moodle
|
||||||
|
|
||||||
- name: OSM_VECTOR_MAPS
|
- name: OSM-VECTOR-MAPS
|
||||||
include_role:
|
include_role:
|
||||||
name: osm-vector-maps
|
name: osm-vector-maps
|
||||||
when: osm_vector_maps_install
|
when: osm_vector_maps_install
|
||||||
tags: osm
|
tags: osm, maps
|
||||||
|
|
||||||
# UNMAINTAINED
|
# UNMAINTAINED
|
||||||
- name: OSM
|
- name: OSM
|
||||||
include_role:
|
include_role:
|
||||||
name: osm
|
name: osm
|
||||||
when: osm_install is defined and osm_install
|
when: osm_install is defined and osm_install
|
||||||
tags: osm
|
tags: osm, maps
|
||||||
|
|
||||||
# UNMAINTAINED
|
# UNMAINTAINED
|
||||||
- name: PATHAGAR
|
- name: PATHAGAR
|
||||||
|
|
|
@ -10,9 +10,9 @@
|
||||||
# Which kiwix-tools to download from http://download.iiab.io/packages/
|
# Which kiwix-tools to download from http://download.iiab.io/packages/
|
||||||
# As obtained from http://download.kiwix.org/release/kiwix-tools/ or http://download.kiwix.org/nightly/
|
# As obtained from http://download.kiwix.org/release/kiwix-tools/ or http://download.kiwix.org/nightly/
|
||||||
|
|
||||||
kiwix_version_armhf: "kiwix-tools_linux-armhf-1.2.0"
|
kiwix_version_armhf: "kiwix-tools_linux-armhf-1.2.1"
|
||||||
kiwix_version_linux64: "kiwix-tools_linux-x86_64-1.2.0"
|
kiwix_version_linux64: "kiwix-tools_linux-x86_64-1.2.1"
|
||||||
kiwix_version_i686: "kiwix-tools_linux-i586-1.2.0"
|
kiwix_version_i686: "kiwix-tools_linux-i586-1.2.1"
|
||||||
# kiwix_src_file_i686: "kiwix-linux-i686.tar.bz2"
|
# kiwix_src_file_i686: "kiwix-linux-i686.tar.bz2"
|
||||||
# v0.9 for i686 published May 2014 ("use it to test legacy ZIM content")
|
# v0.9 for i686 published May 2014 ("use it to test legacy ZIM content")
|
||||||
# v0.10 for i686 published Oct 2016 ("experimental") REPLACED IN EARLY 2018, thx to Matthieu Gautier:
|
# v0.10 for i686 published Oct 2016 ("experimental") REPLACED IN EARLY 2018, thx to Matthieu Gautier:
|
||||||
|
|
|
@ -54,7 +54,6 @@ def main():
|
||||||
# For installed regions, check that a menu def exists, and it's on home page
|
# For installed regions, check that a menu def exists, and it's on home page
|
||||||
for fname in installed_maps:
|
for fname in installed_maps:
|
||||||
region = extract_region_from_filename(fname)
|
region = extract_region_from_filename(fname)
|
||||||
print('checking for %s region'%region)
|
|
||||||
if region == 'maplist': # it is the splash page, display only if no others
|
if region == 'maplist': # it is the splash page, display only if no others
|
||||||
menu_ref = 'en-map_test'
|
menu_ref = 'en-map_test'
|
||||||
item = { "perma_ref" : "en-map_test" }
|
item = { "perma_ref" : "en-map_test" }
|
||||||
|
@ -105,7 +104,7 @@ def get_installed_regions():
|
||||||
os.chdir(map_doc_root)
|
os.chdir(map_doc_root)
|
||||||
for filename in os.listdir('.'):
|
for filename in os.listdir('.'):
|
||||||
if fnmatch.fnmatch(filename, '??-osm-omt*'):
|
if fnmatch.fnmatch(filename, '??-osm-omt*'):
|
||||||
region = re.sub(r'^..-osm-omt_(.*)',r'\1',filename)
|
region = re.sub(r'^..-osm-..._(.*)',r'\1',filename)
|
||||||
installed.append(region)
|
installed.append(region)
|
||||||
# add the splash page if no other maps are present
|
# add the splash page if no other maps are present
|
||||||
if len(installed) == 0:
|
if len(installed) == 0:
|
||||||
|
@ -192,14 +191,13 @@ def fetch_menu_json_value(key):
|
||||||
return data.get(key,'')
|
return data.get(key,'')
|
||||||
|
|
||||||
def extract_region_from_filename(fname):
|
def extract_region_from_filename(fname):
|
||||||
substitutions = { "north": "north_america",\
|
# find the index of the date
|
||||||
"central": "central_america",\
|
nibble = re.search(r"\d{4}-\d{2}-\d{2}",fname)
|
||||||
"southeast": "southeast_asia",
|
if nibble:
|
||||||
"south": "south_america" }
|
fname = fname[:nibble.start()-1]
|
||||||
# wish I had used - as separator between key and date
|
return fname
|
||||||
nibble = fname.split('_')[0]
|
else:
|
||||||
nibble = substitutions.get(nibble,nibble)
|
return("maplist")
|
||||||
return(nibble)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
if console_installed:
|
if console_installed:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue