Skip to content

Commit 8167239

Browse files
committed
WIP: Add endless-key-kolibri-home to build output
The Makefile requires that `kolibri` is installed, and uses it to generate a Kolibri home with content from a provided content manifest. endlessm/endless-key-content-private#97
1 parent 601a04d commit 8167239

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

Makefile

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ CLEAN_DEPS = \
5757
clean-kolibri \
5858
clean-apps-bundle \
5959
clean-collections \
60+
clean-endless-key-kolibri-home \
6061
clean-local-kolibri-explore-plugin \
6162
clean-loadingScreen
6263
CLEAN_FILES = \
@@ -145,6 +146,15 @@ clean-apps-bundle:
145146
src/apps-bundle: clean-apps-bundle apps-bundle.zip
146147
unzip -qo apps-bundle.zip -d src/apps-bundle
147148

149+
clean-endless-key-kolibri-home:
150+
- rm -rf src/endless-key-kolibri-home
151+
152+
src/kolibri/dist/home: src/collections src/kolibri
153+
export KOLIBRI_HOME=src/kolibri/dist/home
154+
cat src/collections/artist-0001.json | jq '.channels[] | .id' | xargs -n1 echo kolibri manage importchannel network
155+
cat src/collections/artist-0001.json | jq '.channels[] | .id' | xargs -n1 echo kolibri manage importcontent --manifest=src/collections/artist-0001.json network
156+
yes 'yes' | kolibri manage deprovision
157+
148158
.PHONY: collections.zip
149159
collections.zip:
150160
wget -N https://github.com/endlessm/endless-key-collections/releases/latest/download/collections.zip
@@ -193,6 +203,7 @@ DIST_DEPS = \
193203
src/kolibri \
194204
src/apps-bundle \
195205
src/collections \
206+
src/endless-key-kolibri-home \
196207
assets/loadingScreen \
197208
needs-version \
198209
dist/version.json

requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
cython~=0.29
22
virtualenv
33
git+https://github.com/endlessm/python-for-android@v2022.09.04-endless10#egg=python-for-android
4+
kolibri

src/kolibri_android/kolibri_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ def _init_kolibri_env():
8787
os.environ["KOLIBRI_CONTENT_COLLECTIONS_PATH"] = SCRIPT_PATH.joinpath(
8888
"collections"
8989
).as_posix()
90+
os.environ["KOLIBRI_CONTENT_FALLBACK_DIRS"] = SCRIPT_PATH.joinpath(
91+
"kolibri", "dist", "home", "content"
92+
).as_posix()
9093

9194
node_id = get_android_node_id()
9295

0 commit comments

Comments
 (0)