GithubHelp home page GithubHelp logo

rafaelmaeuer / its-beds-widget Goto Github PK

View Code? Open in Web Editor NEW

This project forked from keyes/its-beds-widget

0.0 0.0 0.0 212 KB

Scriptable widgets that shows the available ITS beds in Germany and your current state.

JavaScript 100.00%

its-beds-widget's Introduction

its-beds-widget

Simple layout: Screenshot Extended layout: Extended Screenshot

This is a widget for Scriptable. To use this widget, add a new script to Scriptable, and insert this code:

// Licence: juliankern.com; CC BY 3.0 DE
const C = { layout: 'simple' };
(async () => new Function(await new Request('https://cdn.jsdelivr.net/gh/Keyes/its-beds-widget/widget.min.js').loadString())(C))();

This will load the current version, and keep it updated.

Features

  • Shows the situation of ITS beds in your current state (germany only), as well as in the whole country
  • Add your state short code as parameter to change the displayed state (for short codes see below)
  • Shows the timestamp of the last update - official updates happen usually once per hour
  • Multiple layouts (see config)
  • Shows trend arrows how the free beds changed compared to yesterday
    • trend data is stored locally on your device or in your iCloud
    • additionally shows relative mount of beds added/removed in extended layout
    • trend arrows/numbers appear after the first day of usage

Config

The following options are possible

  • layout
    • 'simple': default layout (default option, see first screenshot)
    • 'extended': shows additionally absolute numbers of beds (see second screenshot)

List of state short codes

  • Baden-Württemberg: BW
  • Bayern: BY
  • Berlin: BE
  • Brandenburg: BB
  • Bremen: HB
  • Hamburg: HH
  • Hessen: HE
  • Mecklenburg-Vorpommern: MV
  • Niedersachsen: NI
  • Nordrhein-Westfalen: NRW
  • Rheinland-Pfalz: RP
  • Saarland: SL
  • Sachsen: SN
  • Sachsen-Anhalt: ST
  • Schleswig-Holstein: SH
  • Thüringen: TH

Development

if you want to check out the development version of this widget, you can use this code:

// Licence: juliankern.com; CC BY 3.0 DE
const C = { layout: 'simple' };
(async () => new Function(await new Request('https://raw.githubusercontent.com/Keyes/its-beds-widget/dev/widget.js').loadString())(C))();

Beware Please note that this version might not always work as expected!

its-beds-widget's People

Contributors

keyes avatar rafaelmaeuer avatar

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.