Code Monkey home page Code Monkey logo

ffapi-updater's Introduction

ffapi-updater

ffapi-updater helps to manage your Freifunk API file.

Prerequisites

The following files should be available on filesystem of server (if necessary download them before execution, e.g. using wget):

  • nodes.json (v2) of Meshviewer's ffmap-backend (could also be remote url)
  • Freifunk-API json file

ffapi-updater modifies your API file, so best practice is to run it on that server that hosts your API file. If this is not possible, you need to upload your API file after each execution to its place. In our case API and map files are hosted on the same server, so both needed json files could be referenced directly.

Since V1.2.0 it is possible to load a remote nodes.json (via url), simply configure the complete url and no loacal nodes.json will be used.

Furthermore SITE_CODE is checked, this helps to filter in multi site communities.

Installation

To use it, simply clone this repository to a folder on your map server, create a copy of the settings-example.conf named settings.conf and set the settings according to your needs.

Then install the required pip dependencies with: pip install -r requirements.txt

Updating your API file should happen on a regularly basis e.g. each 5 min, therefore create a cron job like this:

*/5 * * * * (cd /home/freifunk/ffapi-updater && /usr/bin/python3 /home/freifunk/ffapi-updater/ffapi-updater.py >/home/freifunk/ffapi-updater/ffapi-updater.log 2>&1)

Dependencies

  • python3

ffapi-updater's People

Contributors

herbetom avatar little-ben avatar

Watchers

 avatar  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.