# osmcal

> Parser for OpenStreetMap Calendar

Latest version **0.2.2** (published 2016-07-06) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install osmcal
pnpm add osmcal
yarn add osmcal
bun add osmcal
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.2.2 |
| Published | 2016-07-06 |
| First published | 2016-03-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 10 |
| Known vulnerabilities | 0 (+6 in 2 direct dependencies) |
| Install scripts | no |
| Author | TheFive |
| Maintainers | thefive |
| Keywords | OpenStreetMap, Calendar |

## Links

- npm: https://www.npmjs.com/package/osmcal
- Repository: https://github.com/TheFive/osmcal
- Homepage: https://github.com/TheFive/osmcal#readme
- Issues: https://github.com/TheFive/osmcal/issues
- npm.io page: https://npm.io/package/osmcal

## Dependencies (10)

- [nock](https://npm.io/package/nock.md) ^7.7.2
- [debug](https://npm.io/package/debug.md) ^2.2.0
- [mocha](https://npm.io/package/mocha.md) ^2.4.5
- [sinon](https://npm.io/package/sinon.md) ^1.17.3
- [moment](https://npm.io/package/moment.md) ^2.12.0
- [should](https://npm.io/package/should.md) ^8.3.0
- [request](https://npm.io/package/request.md) ^2.69.0
- [istanbul](https://npm.io/package/istanbul.md) ^0.4.2
- [markdown-it](https://npm.io/package/markdown-it.md) ^6.1.1
- [mocha-jshint](https://npm.io/package/mocha-jshint.md) ^2.3.1

## Recent versions

- 0.2.2 (latest) — 2016-07-06
- 0.2.1 — 2016-07-06
- 0.1.0 — 2016-03-29

## README

# osmcal

Library for parsing OpenStreetMap Calendar from (https://wiki.openstreetmap.org)
 

## Summary

OSMCAL ia be a small library, that allowes to parse the wiki openstreetmap calendar and
converts it to a more machine readable JSON format.

In Future there can be more features like:

* parsing geocoordinates from wiki
* -> add your wishes to github



## Status 

There is a very rudimentary parser i have written for the weeklyosm team, so that they
can easily publish the calendar.
This version was implemented with regex, and i have started to create a clean version
based on PEGJS as a parser (try to get more compatibility with the different data,
given in the wiki).

The library is not ready for use yet.
In the meantime have a look at: https://thefive.sabic.uberspace.de/calendar/preview.

For OSMCAL i have used pegjs to parse the wiki page, and generate the Events.

The V0.2.0 allowes you to use the JSON converter in a npm module. 


## Software Build Status

Master:   | develop:
----------|----------------------
[![Build Status](https://travis-ci.org/TheFive/osmcal.svg?branch=master)](https://travis-ci.org/TheFive/osmcal) | [![Build Status](https://travis-ci.org/TheFive/osmcal.svg?branch=develop)](https://travis-ci.org/TheFive/osmcal)
[![codecov.io](https://codecov.io/github/TheFive/osmcal/coverage.svg?branch=master)](https://codecov.io/github/TheFive/osmcal?branch=master) | [![codecov.io](https://codecov.io/github/TheFive/osmcal/coverage.svg?branch=develop)](https://codecov.io/github/TheFive/osmcal?branch=develop)

Timeline for code coverage on development branch:
(Every dot is a month)
![codecov.io](http://codecov.io/github/TheFive/osmcal/branch.svg?branch=develop&agg=month&hg=on&vg=on&legend=on)

Timeline for code coverage on master branch:
(Every dot is a month)
![codecov.io](http://codecov.io/github/TheFive/osmcal/branch.svg?branch=master&agg=month&hg=on&vg=on&legend=on)


## How to install

use 
```
npm install osmcal
```

To install the module. The API is instable at the moment (April 2015), but this will change 
in near future.

## Support the Developer

Please put all remarks, suggestions, bugs in the github issue tracker.


## API to use

The API is very simple for now:

```
var parse = require('osmcal');

let jsonevents = parse.calendarToJSON();
```


This results in 
```
{
  "version": "0.1",
  "generator": "TheFive Wiki Calendar Parser",
  "time": "2015-12-06T00:00:00.000Z",
  "filter": {},
  "copyright": "The data is taken from http://wiki.openstreetmap.org/wiki/Template:Calendar and follows its license rules.",
  "events": [
    {
      "country": "Spain",
      "countryLink": "https://wiki.openstreetmap.org/wiki/Spain",
      "town": "Zaragoza",
      "townLink": "https://wiki.openstreetmap.org/wiki/Zaragoza",
      "desc": "Curso de OpenStreetMap",
      "descLink": [
        "http://osluz.unizar.es/content/curso-de-openstreetmap"
      ],
      "type": "speaking",
      "flags": [
        "Spain",
        "Zaragoza"
      ],
      "big": false,
      "bold": false,
      "startDate": "2015-11-16",
      "endDate": "2015-11-30"
    },
  ],
  "errors": []
}
```
In case of any error while parsing, the whole wiki string and the pegjs Error message is added to
the error array.

---
_Source: https://npm.io/package/osmcal · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
