endlessm/eos-knowledge-downloader-node

Name: eos-knowledge-downloader-node

Owner: endlessm

Description: Utilities to download content packs for use in eos-knowledge-content-node

Created: 2017-03-17 22:11:51.0

Updated: 2017-03-20 07:41:57.0

Pushed: 2017-03-20 07:42:44.0

Homepage: null

Size: 1625

Language: JavaScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

eos-knowledge-downloader

The eos-knowledge-downloader tool is a command line utility which readies a directory of shard content and static files for use in a EndlessOS knowledge application. This tool assumes the app will be packaged as a flatpak, and searchable through EndlessOS's global desktop search.

The cli tool will set up things like a gnome-shell provider and a dbus service file which all knowledge apps should have. It downloads and properly constructs and subscriptions directory of sharded content. Finally, it downloads any application specific assets to a directory, making it easy to set up electron “templates” for use with many different sets of content.

The tools operates by reading in a single app json file which describes all the application metadata needed. This json file can be either local or a url. Similarly, all assets referred to by the app json can be either relative to the app jsons location, or downloaded through and external url. This should make it very flexible where content is stored. Application content can be stored separately from application code if so desired, and the asset content can be stored separately shard content.

For example, you could store app code on github, assets on dropbox and shard content on Endless's content portal. Or you could store assets and code together on github, and custom shard content on google drive.

Usage
knowledge-downloader [OPTIONS...] FILENAME or URL

Just call the tool with a set of options and path or url to an app.json file. If no path is supplied, the app.json is assumed to live in an in/app.json directory.

Options
App json properties

Asset object

Example json

pp_id": "com.endlessm.myths.en",
ame": "Myths",
con": "icon.png",
pp_data": "appdata.xml",
pp_assets": [
{
  "path": "logo.svg"
},
{
  "path": "background.jpg"
}

ontent_manifest": "https://subscriptions.prod.soma.endless-cloud.com/v1/a82915cbde270d773ddd3d89246daaa7990b18b5f80913ac3a16f2c520d0f494/manifest.json",
isable_subscription_updates": true

Example output
assets
background.jpg
logo.svg

ents
app.json
share
??? app-info
?   ??? icons
?   ?   ??? flatpak
?   ?       ??? 64x64
?   ?           ??? com.endlessm.myths.en.png
?   ??? xmls
?       ??? com.endlessm.myths.en.appdata.xml
??? dbus-1
?   ??? services
?       ??? com.endlessm.myths.en.service
??? ekn
?   ??? data
?       ??? com.endlessm.myths.en
?           ??? com.endlessm.subscriptions
?           ?   ??? a82915cbde270d773ddd3d89246daaa7990b18b5f80913ac3a16f2c520d0f494
?           ?       ??? e87ac3f0-54f1-11e6-b853-ff11cd9524f9.shard
?           ?       ??? manifest.json
?           ??? EKN_VERSION
?           ??? subscriptions.json
??? gnome-shell
?   ??? search-providers
?       ??? com.endlessm.myths.en-search-provider.ini
??? icons
    ??? hicolor
        ??? 64x64
            ??? apps
                ??? com.endlessm.myths.en.png

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.