Commit 33e64301 authored by rgaudin's avatar rgaudin
Browse files

added new mathews content ; Math Mathews APK

parent 55562cc6
2.3
* Added new content: Math Mathews APK (1.6)
* Updated Kiwix to version 3.0.1-8
2.2.2
* Fixed internet connectivity detection
2.2.1
* Updated NomadEducation APK to 2.7.0 (offline)
......
......@@ -33,12 +33,13 @@ language_name: "English"
# versions
qemu_kernel_version: "4.10.0"
kernel_version: "4.14.34"
kiwix_version: "3.0.1-6"
kiwix_version: "3.0.1-8"
kalite_version: "0.17.4"
edupi_version: "1.4.10"
python3_version: "3.5"
php_version: "7.3"
nomad_version: "2.7.0"
mathews_version: "1.6"
# Apps path
venvs_root: /home/{{ username }}/venvs
......@@ -57,6 +58,7 @@ mediawiki_root: "{{ wikifundi_root }}/w"
parsoid_root: "{{ mediawiki_root }}/parsoid"
common_static_path: "/var/www/static"
nomad_root: "/var/www/nomad"
mathews_root: "/var/www/mathews"
# Domain names
kiwix_server_name: kiwix.{{ hostname }}
......@@ -65,6 +67,7 @@ aflatoun_server_name: aflatoun.{{ hostname }}
edupi_server_name: edupi.{{ hostname }}
wikifundi_server_name: wikifundi.{{ hostname }}
nomad_server_name: nomad.{{ hostname }}
mathews_server_name: mathews.{{ hostname }}
time_server_name: time.{{ hostname }}
kiwix_fqdn: kiwix.{{ fqdn }}
......@@ -73,6 +76,7 @@ aflatoun_fqdn: aflatoun.{{ fqdn }}
edupi_fqdn: edupi.{{ fqdn }}
wikifundi_fqdn: wikifundi.{{ fqdn }}
nomad_fqdn: nomad.{{ fqdn }}
mathews_fqdn: mathews.{{ fqdn }}
time_fqdn: time.{{ fqdn }}
# content & features
......@@ -94,3 +98,4 @@ zim_path: "{{ data_path }}/packages"
wikifundi_langpack_prefix: "{{ data_path }}/wikifundi_langpack_"
edupi_resources_path: "{{ data_path }}/edupi_resources"
nomad_content_path: "{{ data_path }}/nomad"
mathews_content_path: "{{ data_path }}/mathews"
......@@ -19,7 +19,7 @@
# master, setup (timezone, apt-update)
- role: system
# master, resize
- role: resize
......@@ -50,6 +50,9 @@
- role: nomad_setup
when: ansible_local.config.nomad|bool
- role: mathews_setup
when: ansible_local.config.mathews|bool
- role: wikifundi_setup
when: ansible_local.config.wikifundi_languages | length
......
......@@ -20,4 +20,9 @@ html[dir='rtl'] .card {
background-size: 48px;
}
.card.mathews {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAW+ElEQVRogZWaeZTdR5XfP1W/9a29vN5brZbcWi0JecO7wTbeDTZgGDyDwzI5ZsYmZDgZCExmJjNgDjNDAjlMEsISiFkdAjZgebzhFUuy0IJlWdZiLa1Wd6v3fq/f/luqKn/8urUYh3NS7/xO/ZZXv1f33rr3fu+3nvjWp9dTqcZcsrmNFQMZypUmnQWbWt0I25HvFYLVSovNoFd0tFo9ubTMfPenR+1fPjtmFVpt6o0IIQBACIMAECCBOAa8du6//+OyMfGEefTJQ2Z4rp1/+ru75dr8y3q+mUUICaAxYCAGGnFspqJIjQjEXqXUkTDQT7S0WNV6A9Ipm+Mnaux6tUQ2Y2PD0o+DUoZYGaTt/GUm1bjPCDMkbB+BIuVYpGzDl/7rq/zsyTkGl0G5GmLbgnOaSN4lF29n0xY/+O63eeNQhVwrtHdlaXWb6KCOVhmktTjOmGQgBs8Vg77vXGoMH9TaxmTMjNHqW8bov9V6UUmLTRqTjI1iQyplFfI55wUV6/9sZOtQRi0Qzg4T1BX5tOGbDx3mx4/NMbRCkPIEti0Qb579Wc0IQXl+hupChZVDkPHAFREPP3uKg3OryTkROgajQGuBVmCUII4gCgxxaNCxwSA6pbT/JuVbB11Xro21QS/OWxqSyUeRasllrL3plP1OpzbO7oW3s6PwdTp7NtLJKZ54/ADf+cEkK/vAkqB56yZEIkYYC7QGzwMvRbI+YsjkHba/OkqxXsCREqU0Shu0MmhtUCo5tDpzriJNFGmklOvSKXuvVmZVHGsMYK9ZkUJaafp7M89UqtGyMDJkiGk2yjx+YojCpr9ltf89ttpZ1r3zt4QjL1G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Ozj22jbGDu/h4J5nmJsaJpWV+GlJKiPItUI2Lxg/fohjh19NIHMl2cJFRTzx46/x3MM/Itcq8FIJ5RMUX7t29VDfkVI5Rvyvz26kNeex7ZVxdu2f2pTPur+oNaMhyxIIDPWKRmtw7IRsko6FEAatBM26orqQbHgjbW641LByo+H7P9SoMLGgiiEIkz6dhXy7hVZniHMhQFqGakkThVBrwk23dyNknpd/M0JYCyl0ge2CxJorlvUHVw9kn7/xyiEaYYwMI0UQKpphTDYtXyvk/Q1a6a9gUMYIvLQklZO4aQssC61AxQIVJem/tUMihSTfAptuU4iUxpIWfk7iZwXZNkmhW9LVL8m2JOPPZv2NgTAQpLIWji/paIOewhS7XjpCsxFS6BFYtiAK5Xcs3A2OxfNIi1gZwlC96d8qGrTWgS3l5xxL/jel1fWWLW+VUqzSxrTGkclicBBIs7hXIwSEGlo8g5m3qNa0cD0IY2GWJvhmpHt2W6qJ4hhzctg2N95AVC7rWrUuFnp6OBHH+kmlxXM6Fkdwk+R39mv+L+Rie8JX9yPpAAAAAElFTkSuQmCC);
background-size: 48px;
}
.card.zim_wikipedia_fr_tunisie_nopic { background-image: url("http://library.kiwix.org/wikipedia_fr_tunisie_novid_2018-10/-/favicon"); }
---
- name: Ensure directory exists
file:
path: "{{ mathews_root }}"
state: directory
owner: root
group: root
mode: 0755
tags: ['master', 'reconfigure']
- name: Ensure APK directory exists
file:
path: "{{ mathews_content_path }}"
state: directory
tags: ['master', 'reconfigure', 'content']
- name: install nginx vhost
template:
src: nginx.vhost.j2
dest: /etc/nginx/sites-available/mathews
mode: 0644
tags: ['master', 'rename', 'reconfigure']
- name: enable mathews vhost
file:
src: /etc/nginx/sites-available/mathews
dest: /etc/nginx/sites-enabled/mathews
state: link
force: yes
notify: restart nginx
tags: ['master', 'reconfigure']
- name: Copy static files
copy:
src: static
dest: "{{ mathews_root }}/"
tags: ['master', 'reconfigure']
- name: copy page
template:
src: index.html.j2
dest: "{{ mathews_root }}/index.html"
mode: 0644
tags: ['master', 'reconfigure']
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Math Mathews</title>
<link rel="icon" href="/static/favicon.png">
<link rel="stylesheet" href="/hotspot-static/font-awesome/css/font-awesome.min.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" type="text/css" href="/hotspot-static/purecss/pure-css-grids-old-ie-min.css">
<![endif]-->
<!--[if gt IE 8]><!-->
<link rel="stylesheet" type="text/css" href="/hotspot-static/purecss/pure-css-grids-min.css">
<!--<![endif]-->
<link rel="stylesheet" type="text/css" href="/hotspot-static/main.css" />
<link rel="stylesheet" type="text/css" href="/hotspot-static/branding/style.css" />
<style type="text/css">
body {
background-color: #f8f3e6;
}
.global-page-header {
background: linear-gradient(to top,#fec8c8,#8ea7ea);
background-size: auto;
background-size: 100% 100%;
position: relative;
color: #fff;
}
.center {
text-align: center;
}
.app-icon {
float: right;
max-width: 100px;
}
.button {
padding: .5rem;
height: unset;
background-color: #382e32;
line-height: 30px;
min-height: 30px;
}
.screenshot {
max-height: 15rem;
}
ol, ul { list-style: decimal; }
header {
margin-bottom: 0;
}
</style>
</head>
<body class="">
<header class="global-page-header">
<section><a href="http://{{ fqdn }}/" title="retour à {{ project_name }}"><h1><img src="/static/logo_baseline.png"></img></h1></a></section>
</header>
<div class="content">
<p class="center"><a href="/download/math_mathews.apk" class="button">Télécharger l'appli Android <strong>Math&nbsp;Mathews</strong> v{{ mathews_version }}</a></p>
<h2>Un jeu pour s’entraîner au calcul mental</h2>
<p>«&nbsp;Math Mathews&nbsp;» permet aux enfants de s’entraîner de façon ludique au calcul mental (additions et soustractions).<br>Dans ce jeu, les phases de réflexion (trouver le résultat d’une addition ou soustraction, résoudre une opération à trou) alternent avec les phases de jeu (collecter des pièces et des trésors).</p>
<p class="center"><img class="screenshot" src="/static/screen-app.png"></img></p>
<h2>Comment l'utiliser ?</h2>
<img class="app-icon" src="/static/app-icon.png"></img>
<p>L'utilisation est particulièrement simple ; lancez l'installation sur votre appereil Android puis :</p>
<ol>
<li>Choisissez «Jouer»</li>
<li>Cliquez sur le «+» pour créer votre personnage et renseignez son nom de pirate</li>
<li>Choisissez «Jouer» à nouveau</li>
</ol>
<h2>Comment l'installer ?</h2>
<p>Concrairement aux autres contenus de <em>{{ project_name }}</em>, cet outil ne s'utilise pas en ligne mais doit être installé sur votre appareil Android (tablette ou téléphone).</p>
<ol>
<li>Cliquez sur le bouton de téléchargement en haut de cette page pour télécharger le fichier d'installation (fichier APK).</li>
<li>Lancez-le ensuite depuis votre navigateur s'il vous le propose ou depuis l'application <em>Fichiers</em> de votre appareil. Dans ce cas, il se trouvera dans le dossier <em>Téléchargements</em>.</li>
<li>En le lançant, suivez les instructions d'installation affichées à l'écran.</li>
<li>C'est fini, l'application <em>Math Mathews</em> est désormais accessible à coté des autres applications.</li>
</ol>
</div>
</body>
</html>
server {
listen 80;
server_name {{ mathews_fqdn }} {{ hostname }};
root {{ mathews_root }};
location /download/ { alias {{ mathews_content_path }}/; }
location /hotspot-static/ { alias {{ common_static_path }}/; expires 1y; }
location /502.html { internal; root /var/www; }
error_page 502 /502.html;
}
......@@ -115,5 +115,13 @@
"checksum": "2d6c51458ebcddbd4d7f0b28d68203ef0af734940b562fcc4c28910e9e2a8f1d",
"archive_size": 51473201,
"expanded_size": 51473201
},
"mathews_apk": {
"url": "{mirror}/other/mathews/mathmathews_1.6.apk",
"name": "math_mathews.apk",
"folder_name": null,
"checksum": "a779239f0e948ccff808552bf134723c2315b3fc22765bffb10dca62ac333e3f",
"archive_size": 35420045,
"expanded_size": 35420045
}
}
......@@ -103,6 +103,7 @@ def run_for_image(machine, root_partition_size, disk_size):
edupi=True,
edupi_resources=None,
nomad=True,
mathews=True,
wikifundi_languages=["en", "fr"],
aflatoun_languages=["en", "fr"],
kalite_languages=["en", "fr", "es"],
......@@ -124,6 +125,7 @@ def build_extra_vars(
edupi,
edupi_resources,
nomad,
mathews,
wikifundi_languages,
aflatoun_languages,
kalite_languages,
......@@ -152,6 +154,7 @@ def build_extra_vars(
"edupi": edupi,
"edupi_has_resources": bool(edupi_resources),
"nomad": nomad,
"mathews": mathews,
"packages": packages,
"custom_branding_path": "/tmp",
"admin_account": "admin",
......
......@@ -80,6 +80,7 @@ def get_collection(
edupi=False,
edupi_resources=None,
nomad=False,
mathews=False,
packages=[],
kalite_languages=[],
wikifundi_languages=[],
......@@ -121,6 +122,16 @@ def get_collection(
("NomadEducation", get_nomad_contents, run_nomad_actions, {"enable": nomad})
)
if mathews:
collection.append(
(
"MathMathews",
get_mathews_contents,
run_mathews_actions,
{"enable": mathews},
)
)
if len(packages):
collection.append(
(
......@@ -181,6 +192,11 @@ def get_nomad_contents(enable=False):
return [get_content("nomad_apk")]
def get_mathews_contents(enable=False):
""" mathews: only contains one APK """
return [get_content("mathews_apk")]
def get_kalite_contents(languages=[]):
""" kalite: medium lang packs and huge tarball of videos for each lang """
......@@ -303,6 +319,22 @@ def run_nomad_actions(cache_folder, mount_point, logger, enable=False):
)
def run_mathews_actions(cache_folder, mount_point, logger, enable=False):
""" copy downloaded APK """
if not enable:
return
mathews_apk = get_content("mathews_apk")
mathews_folder = os.path.join(mount_point, "mathews")
os.makedirs(mathews_folder, exist_ok=True)
copy(
content=mathews_apk,
cache_folder=cache_folder,
final_path=os.path.join(mathews_folder, mathews_apk["name"]),
logger=logger,
)
def run_kalite_actions(cache_folder, mount_point, logger, languages=[]):
""" kalite: copy lang packs (ZIP) as-is and extract videos """
if not len(languages):
......
......@@ -95,6 +95,27 @@ def generate_homepage(logger, options):
}
)
if options["mathews"]:
edupi_fqdn = "mathews.{fqdn}".format(fqdn=fqdn)
if options["language"] == "fr":
title = "Math Mathews Android"
category = "Accès"
description = "Accès à l'application Android Math Mathews"
else:
title = "Android Math Mathews"
category = "Access"
description = "Access to the Math Mathews Android App"
cards.append(
{
"url": "http://{}".format(edupi_fqdn),
"css_class": "mathews",
"category_class": "access",
"category": category,
"title": title,
"description": description,
}
)
if options["wikifundi_languages"]:
wikifundi_fqdn = "wikifundi.{fqdn}".format(fqdn=fqdn)
if "fr" in options["wikifundi_languages"]:
......
......@@ -125,7 +125,7 @@ def set_config(config, args):
setif(arg_key, value)
# bool contents (switch)
for key in ("edupi", "aflatoun", "nomad"):
for key in ("edupi", "aflatoun", "nomad", "mathews"):
if config["content"].get(key) is not None:
vl = "yes" if config["content"][key] in ("yes", True) else "no"
setif(key, vl)
......@@ -156,6 +156,7 @@ defaults = {
"catalog": False,
"edupi": "no",
"nomad": "no",
"mathews": "no",
"aflatoun": "no",
"kalite": [],
"wikifundi": [],
......@@ -179,6 +180,7 @@ parser.add_argument(
)
parser.add_argument("--edupi", help="install edupi", choices=["yes", "no"])
parser.add_argument("--nomad", help="install Nomad Education", choices=["yes", "no"])
parser.add_argument("--mathews", help="install Math Mathews", choices=["yes", "no"])
parser.add_argument(
"--edupi-resources", help="Zipped folder of resources to init EduPi with"
)
......@@ -261,7 +263,14 @@ else:
# check arguments
valid_project_name, valid_language, valid_timezone, valid_wifi_pwd, valid_admin_login, valid_admin_pwd = check_user_inputs(
(
valid_project_name,
valid_language,
valid_timezone,
valid_wifi_pwd,
valid_admin_login,
valid_admin_pwd,
) = check_user_inputs(
project_name=args.name,
language=args.language,
timezone=args.timezone,
......@@ -306,6 +315,7 @@ collection = get_collection(
edupi=args.edupi == "yes",
edupi_resources=args.edupi_resources,
nomad=args.nomad == "yes",
mathews=args.mathews == "yes",
packages=args.zim_install,
kalite_languages=args.kalite,
wikifundi_languages=args.wikifundi,
......@@ -378,6 +388,7 @@ try:
edupi=args.edupi == "yes",
edupi_resources=args.edupi_resources,
nomad=args.nomad == "yes",
mathews=args.mathews == "yes",
zim_install=args.zim_install,
size=args.output_size,
logger=logger,
......
......@@ -536,6 +536,19 @@ class Application:
)
)
# mathews
self.component.mathews_switch.connect(
"notify::active", lambda switch, state: self.update_free_space()
)
self.component.mathews_label.set_label(
"{} ({})".format(
self.component.mathews_label.get_label(),
human_readable_size(
get_expanded_size(get_collection(mathews=True), add_margin=False)
),
)
)
self.refresh_disk_list()
self.reset_config() # will calculate free space
......@@ -734,7 +747,7 @@ class Application:
for lang, button in getattr(self, "iter_{}_check_button".format(key))():
button.set_active(False)
for key in ("edupi", "aflatoun", "nomad"):
for key in ("edupi", "aflatoun", "nomad", "mathews"):
getattr(self.component, "{}_switch".format(key)).set_active(False)
# edupi resources
......@@ -1550,7 +1563,7 @@ class Application:
button.set_active(lang in config["content"][key])
# boolean contents (switches)
for key in ("edupi", "aflatoun", "nomad"):
for key in ("edupi", "aflatoun", "nomad", "mathews"):
if config["content"].get(key) is not None:
getattr(self.component, "{}_switch".format(key)).set_active(
config["content"][key]
......@@ -1682,6 +1695,7 @@ class Application:
("edupi", self.component.edupi_switch.get_active()),
("edupi_resources", edupi_resources),
("nomad", self.component.nomad_switch.get_active()),
("mathews", self.component.mathews_switch.get_active()),
]
),
),
......@@ -1735,7 +1749,14 @@ class Application:
zim_install = [zim[0] for zim in self.component.zim_list_store if zim[8]]
# validate inputs
valid_project_name, valid_language, valid_timezone, valid_wifi_pwd, valid_admin_login, valid_admin_pwd = check_user_inputs(
(
valid_project_name,
valid_language,
valid_timezone,
valid_wifi_pwd,
valid_admin_login,
valid_admin_pwd,
) = check_user_inputs(
project_name=self.component.project_name_entry.get_text(),
language=data.hotspot_languages[
self.component.language_combobox.get_active()
......@@ -1832,6 +1853,8 @@ class Application:
nomad = self.component.nomad_switch.get_active()
mathews = self.component.mathews_switch.get_active()
logo = self.component.logo_chooser.get_filename()
favicon = self.component.favicon_chooser.get_filename()
css = self.component.css_chooser.get_filename()
......@@ -1880,6 +1903,7 @@ class Application:
edupi=edupi,
edupi_resources=self.get_edupi_resources(),
nomad=nomad,
mathews=mathews,
zim_install=zim_install,
size=output_size,
logger=self.logger,
......@@ -1962,11 +1986,13 @@ class Application:
edupi = self.component.edupi_switch.get_active()
edupi_resources = self.get_edupi_resources()
nomad = self.component.nomad_switch.get_active()
mathews = self.component.mathews_switch.get_active()
collection = get_collection(
edupi=edupi,
edupi_resources=edupi_resources,
nomad=nomad,
mathews=mathews,
packages=zim_list,
kalite_languages=kalite,
wikifundi_languages=wikifundi,
......
......@@ -57,6 +57,7 @@ def run_installation(
edupi,
edupi_resources,
nomad,
mathews,
zim_install,
size,
logger,
......@@ -143,6 +144,7 @@ def run_installation(
"edupi": edupi,
"edupi_resources": edupi_resources,
"nomad": nomad,
"mathews": mathews,
"wikifundi_languages": wikifundi_languages,
"aflatoun_languages": aflatoun_languages,
"kalite_languages": kalite_languages,
......@@ -203,6 +205,7 @@ def run_installation(
edupi=edupi,
edupi_resources=edupi_resources,
nomad=nomad,
mathews=mathews,
packages=packages,
kalite_languages=kalite_languages,
wikifundi_languages=wikifundi_languages,
......
......@@ -1290,7 +1290,7 @@ In File mode the image is created at build path, you can choose the size
</packing>
</child>
<child>
<object class="GtkBox" id="">
<object class="GtkBox" id="no_id_89">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
......@@ -1325,6 +1325,42 @@ In File mode the image is created at build path, you can choose the size
<property name="position">17</property>
</packing>
</child>
<child>
<object class="GtkBox" id="no_id_90">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkLabel" id="mathews_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Android APK</property>
<property name="label" translatable="yes">Math Mathews :</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="mathews_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">17</property>
</packing>
</child>
<child>
<object class="GtkBox" id="no_id_40">
<property name="visible">True</property>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment