Code Monkey home page Code Monkey logo

laboite-web's Introduction

laboite-web's People

Contributors

magopian avatar natim avatar

Watchers

 avatar James Cloos avatar

Forkers

natim

laboite-web's Issues

Experiment with client-side requests

Instead of going through the "nuage" (backend server) to make the requests to the various services, experiment requesting the values straight from the client.

The slides (tiles) and items (values displayed on a part of a slide/tile) could be stored in kinto.

Brain dump:

  • one collection per "laboite"
  • one record per slide/tile:
{
  "id": "id of the tile",
  "last_modified": 123456, // timestamp of last modification of the tile (or its items)
  "display_time": 5, // how long to display the tile in seconds
  "items": [
    {
      "refresh_every": 60, // delay between requests in seconds
      "type": "clock", // one of clock, icon, text, json, html, ...
      "x": 0, // position in "led pixel" along the x axis
      "y": 0, // position in "led pixel" along the y axis
    },
    {
      "type": "icon", // one of clock, icon, text, json, html, ...
      "x": 0, // position in "led pixel" along the x axis
      "y": 0, // position in "led pixel" along the y axis
      "content": "01101...",
      "width": 8 // number of leds for the width
    },
    {
      "type": "text", // one of clock, icon, text, json, html, ...
      "x": 0, // position in "led pixel" along the x axis
      "y": 0, // position in "led pixel" along the y axis
      "text": "Hello world !"
    },
    {
      "refresh_every": 180, // delay between requests in seconds
      "type": "json", // one of clock, icon, text, json, html, ...
      "x": 0, // position in "led pixel" along the x axis
      "y": 0, // position in "led pixel" along the y axis
      "url": "http://....",
      "login": "username", // optional login for the service
      "password": "password", // optional password for the service
      "cors-proxy": "https://....", // optional CORS proxy
      "path": "data.foo[2].bar", // path to access the value in the json
    },
    {
      "refresh_every": 300, // delay between requests in seconds
      "type": "html", // one of clock, icon, text, json, html, ...
      "x": 0, // position in "led pixel" along the x axis
      "y": 0, // position in "led pixel" along the y axis
      "url": "http://....",
      "login": "username", // optional login for the service
      "password": "password", // optional password for the service
      "cors-proxy": "https://....", // optional CORS proxy
      "selector": ".content #foo[itemprop=datePublished]", // dom selector to get the node
      "attribute": "src" // attribute of the node to get for the value (eg src, innerHTML...)
    }
  ]
}

Reload tiles automatically

Currently, the tiles are loaded once and for all at the start. They should be reloaded every so often (each time they've been displayed? Do we want to add another info like refresh_delay?)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.