GithubHelp home page GithubHelp logo

osmcalendar's Introduction

Calendar Parser for OSM Wiki

converts Microformat calendar data on a given (wiki) page to json. Can handle easy exceptions from standard. Additionally it adds data from raw html like type of event and "big event" indication.

It provides currently: start date, end date, type of event, big event indicator, description, town, state, country

Contact

Send OSM message to SunCobalt

Description

It filters so called 'h-events' and extracts
properties/start
properties/end
properties/name

It then splits the comma separated properties/name into a list and assumes that
[0] = event description
[1] = town
[2] = country

If the generated list has more than 3 values it tries to read an exception format file. It is comma seperated a,b,c,d,e,f,g

with

if (list[a] == b) and (list[c] == d) {  
    country = list[e];  
    state = list[f]; //use 99 if not available  
    town = list[g];  
}  

example:
3,United Kingdom,1,Edinburgh,3,2,1 -> see error.json for info what the different fields contain

Since it is not part of the Microformat, the script also looks in the raw html data for the big event indicator (html bold formated events '') and the type of the event (for example 'class="p-category" title="Mapping party")

Output example: {"description": "Stuttgarter Stammtisch", "state": "", "end": "2017-11-02", "start": "2017-11-01", "Big": "", "country": "Germany", "town": "Stuttgart", "EventType": "Social"}

Additonally, geolocation can be turned on. As the caching is not yet implemented, it is turned off by default

Prerequisites

osmcalendar's People

Contributors

thomasbarris avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

osmtools

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.