Code Monkey home page Code Monkey logo

bolt-winlinkapi's Introduction

WinLink API Extension

Adds a cron job which gets the latest poition reports of your callsing from WinLink and adds them to the database. New positions are stored in the database table called positions (see contenttypes.yml example).

Config

The following settings can be changed:

# amateur radio call sign
callsign: SM6UAS

# User name which owns the entries added by this extension
username: WinLink
email: [email protected]

# Schedule (hourly, daily)
cron_interval: hourly

Add the following contenttype to your contenttypes.yml:

positions:
    name: Positions
    singular_name: position
    fields:
        title:
            type: text
        callsign:
            type: text
            readonly: true
        date:
            type: datetime
            default: "2000-01-01"
        geolocation:
            type: geolocation
    relations:
        entries:
            multiple: false
            label: Select a blog entry
            order: -id
    show_on_dashboard: false
    default_status: publish
    searchable: false
    icon_many: "fa:globe"
    icon_one: "fa:globe"

Use

Postions can be fetched like any other content:

{% setcontent positions = 'positions' where { callsign: getCallSign() } orderby 'date' %}

Not the getCallSign() which gets the current callsign defined in the config

The twig function/filter geoString(geolocation) returns an array of two strings:

{% set geoString = position.geolocation|geoString %}

<div class="coordinates">Latitude: {{ geoString.latStr }} </br> Longitude: {{ geoString.longStr }}</div>

returns

Latitude: 57° 39' 59.4" N
Longitude: 11° 50' 37.8" E

bolt-winlinkapi's People

Contributors

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