diff --git a/config.ts b/config.ts
index b31748c..10ae4a7 100644
--- a/config.ts
+++ b/config.ts
@@ -12,8 +12,8 @@ const parserConfig = {
db_user: "mobilizon",
db_pass: "mobilizon",
// other configs
- askAgendaDuLibre: true, // should we fetch the Agenda du libre feed ?
- askOsmCal: false,
+ askAgendaDuLibre: false, // should we fetch the Agenda du libre feed ?
+ askOsmCal: true,
runAddQueriesToMobilizon: false,
debug: false,
};
diff --git a/index.js b/index.js
index 5c6a644..3eaf44f 100644
--- a/index.js
+++ b/index.js
@@ -1,75 +1,74 @@
// @author tykayn contact@cipherbliss.com www.cipherbliss.com
// imports
-import utils from "./utils.ts";
-import parserConfig from "./config.ts";
-import { htmlEscape } from "escape-goat";
-import Parser from "rss-parser";
-const fetch = require("node-fetch");
+import utils from './utils.ts';
+import parserConfig from './config.ts';
+import { htmlEscape } from 'escape-goat';
+import Parser from 'rss-parser';
+
+const fetch = require('node-fetch');
let parser = new Parser();
// @ts-ignore
-console.log(" ===============================================".blue);
+console.log(' ==============================================='.blue);
// @ts-ignore
-console.log(" ==== Rss Feeder for mobilizon - by tykayn ====".blue);
+console.log(' ==== Rss Feeder for mobilizon - by tykayn ===='.blue);
// @ts-ignore
-console.log(" ===============================================".blue);
+console.log(' ==============================================='.blue);
if (parserConfig.debug) {
// @ts-ignore
- console.log("configMobilizon".blue, config);
+ console.log('configMobilizon'.blue, config);
}
const utilsTools = new utils();
-let localMobilizonEventsByTitle = [];
// trouver si un évènement existe déjà par son titre
-const doesThisEventAlreadyExistInLocalEvents = (rssEvent) => {
- const eventAlreadyExists =
- -1 !== localMobilizonEventsByTitle.indexOf(rssEvent.title);
- if (!eventAlreadyExists) {
- if (parserConfig.debug) {
- console.log("ajouter l event ", htmlEscape(rssEvent.title));
- }
- addEventQuery(rssEvent);
- }
-};
-let createEventQueries = "";
+let createEventQueries = '';
let counterOfEventsToAdd = 0;
const addEventQuery = utilsTools.agendadulibre.addQuery;
const runCreationQuery = utilsTools.runCreationQuery;
-
-
(async () => {
- console.log("⌛ interroger la BDD mobilizon postgresql");
+ console.log('⌛ interroger la BDD mobilizon postgresql');
- utilsTools.setupClientPostgresql()
+ utilsTools.setupClientPostgresql();
await utilsTools.client.connect();
- console.log("✅ OK connecté à postgresql");
- console.log(" ");
- const res = await utilsTools.client.query("SELECT * from events");
- console.log("💾 évènements enregistrés dans mobilizon : ", res.rows.length); // Hello world!
+ console.log('✅ OK connecté à postgresql');
+ console.log(' ');
+ const res = await utilsTools.client.query('SELECT * from events');
+ console.log('💾 évènements enregistrés dans mobilizon : ', res.rows.length); // Hello world!
- utilsTools.postgresEventsExisting = res.rows;
+ utilsTools.localMobilizonEventsByTitle = res.rows;
if (parserConfig.askAgendaDuLibre) {
// @ts-ignore
- console.log(" ====================================================".blue);
+ console.log(' ===================================================='.blue);
// @ts-ignore
- console.log(" ==== demander à l'agenda du libre son flux RSS ====".blue);
+ console.log(' ==== demander à l\'agenda du libre son flux RSS ===='.blue);
// @ts-ignore
- console.log(" ====================================================".blue);
+ console.log(' ===================================================='.blue);
+
+ console.log('⌛ lecture du flux rss : ' + parserConfig.rss_feed_url);
+ fetch(parserConfig.rss_feed_url, { method: 'GET' })
+
+ .then((arrayOfEvents) => {
+ console.log('xml rss_feed_url count', arrayOfEvents.length);
+
+ arrayOfEvents.forEach((eventFound) => {
+ console.log(eventFound.name);
+ // console.log('item', item)
+ utilsTools.osmcal.doesEventExists(eventFound);
+ });
+ });
- console.log("⌛ lecture du flux rss : " + parserConfig.rss_feed_url);
let feed = await parser.parseURL(parserConfig.rss_feed_url);
- console.log("✅ flux rss obtenu");
- utilsTools.writeFile("agenda_du_libre_feed.xml", feed);
+ console.log('✅ flux rss obtenu');
console.log(feed.title);
- console.log("⚙️ interprétation des évènements");
+ console.log('⚙️ interprétation des évènements');
console.log(
- "⌛ trouver les évènements qui ne font pas partie de la BDD mobilizon postgresql"
+ '⌛ trouver les évènements qui ne font pas partie de la BDD mobilizon postgresql',
);
feed.items.forEach((eventFound) => {
console.log(eventFound.title);
@@ -79,18 +78,18 @@ const runCreationQuery = utilsTools.runCreationQuery;
}
if (parserConfig.askOsmCal) {
// @ts-ignore
- console.log(" ====================================================".blue);
+ console.log(' ===================================================='.blue);
// @ts-ignore
- console.log(" ==== demander à OSM cal ====".blue);
+ console.log(' ==== demander à OSM cal ===='.blue);
// @ts-ignore
- console.log(" ====================================================".blue);
+ console.log(' ===================================================='.blue);
- fetch(parserConfig.osmcal_url, { method: "GET" })
+ fetch(parserConfig.osmcal_url, { method: 'GET' })
.then((res) => res.json())
.then((arrayOfEvents) => {
- console.log("json osmcal count", arrayOfEvents.length);
+ console.log('json osmcal count', arrayOfEvents.length);
- utilsTools.writeFile("osmcal.json", arrayOfEvents);
+ utilsTools.writeFile('osmcal.json', arrayOfEvents, 'json');
arrayOfEvents.forEach((eventFound) => {
console.log(eventFound.name);
@@ -103,23 +102,25 @@ const runCreationQuery = utilsTools.runCreationQuery;
if (parserConfig.runAddQueriesToMobilizon) {
// @ts-ignore
console.log(
- "➕ rajouter les évènements manquants à la base mobilizon".blue
+ '➕ rajouter les évènements manquants à la base mobilizon'.blue,
);
- utilsTools.makeQuery();
- utilsTools.runCreationQuery();
+ utilsTools.makeQuery();
+ utilsTools.runCreationQuery();
// @ts-ignore
- console.log(" ---------- ".green);
+ console.log(' ---------- '.green);
// @ts-ignore
- console.log(counterOfEventsToAdd, " évènements ajoutés ".green);
+ console.log(counterOfEventsToAdd, ' évènements ajoutés '.green);
// @ts-ignore
- console.log(" ---------- ".green);
+ console.log(' ---------- '.green);
// @ts-ignore
- console.log("✅ ça c'est fait ".green);
+ console.log('✅ fermer la connec postgresql');
+ await utilsTools.client.end();
+ console.log('✅ ça c\'est fait '.green);
}
- await utilsTools.client.end();
+
})();
exports = () => {
- console.log("hey ho", this);
+ console.log('✅ hey ho', this);
};
diff --git a/sources_examples/osmcal.json b/sources_examples/osmcal.json
index 48adfc3..87e7395 100644
--- a/sources_examples/osmcal.json
+++ b/sources_examples/osmcal.json
@@ -1 +1,826 @@
-[{"name":"Missing Maps London Mapathon","url":"https://osmcal.org/event/367/","date":{"human":"5th January 19:00 – 21:00 (Europe/London)","human_short":"5th January","whole_day":false,"start":"2021-01-05T19:00:00+00:00","end":"2021-01-05T21:00:00+00:00"}},{"name":"Virtuelles Niederbayern-Treffen","url":"https://osmcal.org/event/404/","date":{"human":"5th January","human_short":"5th January","whole_day":true,"start":"2021-01-05T19:30:00+01:00"},"location":{"short":"Oberframmering, Landau an der Isar, Bavaria, Germany","detailed":"online, Osterhofener Straße, Oberframmering, Bavaria, Germany","coords":[12.749539,48.688166],"venue":"online"}},{"name":"Virtual Civic Hack & Map Night","url":"https://osmcal.org/event/375/","date":{"human":"7th January 18:30 – 21:00","human_short":"7th January","whole_day":false,"start":"2021-01-07T18:30:00-08:00","end":"2021-01-07T21:00:00-08:00"},"location":{"short":"San Jose, California, United States","detailed":"Online, East Santa Clara Street, Japantown, San Jose, California, United States","coords":[-121.890583,37.336191],"venue":"Online"}},{"name":"Bochum OSM-Stammtisch (online)","url":"https://osmcal.org/event/368/","date":{"human":"7th January 19:00","human_short":"7th January","whole_day":false,"start":"2021-01-07T19:00:00+01:00"},"location":{"short":"Bochum, North Rhine-Westphalia, Germany","detailed":"Jitsi, Boulevard, Innenstadt, Bochum, North Rhine-Westphalia, Germany","coords":[7.219664,51.481811],"venue":"Jitsi"}},{"name":"Dresdner OSM-Stammtisch","url":"https://osmcal.org/event/410/","date":{"human":"7th January 19:00","human_short":"7th January","whole_day":false,"start":"2021-01-07T19:00:00+01:00"},"location":{"short":"Dresden, Saxony, Germany","detailed":"Online, Wilsdruffer Straße, Innere Altstadt, Dresden, Saxony, Germany","coords":[13.738144,51.049329],"venue":"Online"}},{"name":"Virtual community meeting.","url":"https://osmcal.org/event/400/","date":{"human":"8th January 19:00 – 22:00","human_short":"8th January","whole_day":false,"start":"2021-01-08T19:00:00+00:00","end":"2021-01-08T22:00:00+00:00"},"location":{"short":"Warsaw, Masovian Voivodeship, Poland","detailed":"Poland, 1, Plac Defilad, Śródmieście, Warsaw, Masovian Voivodeship, Poland","coords":[21.006725,52.231958],"venue":"Poland"}},{"name":"Virtueller OSM Stammtisch Österreich","url":"https://osmcal.org/event/423/","date":{"human":"8th January 19:00","human_short":"8th January","whole_day":false,"start":"2021-01-08T19:00:00+01:00"},"location":{"short":"Großarl, Salzburg, Austria","detailed":"Online, Ebengasse, Salzburg, Austria","coords":[13.199959,47.200034],"venue":"Online"}},{"name":"Virtual meeting of the Polish OSM Association","url":"https://osmcal.org/event/418/","date":{"human":"9th January 19:00 (Etc/UTC)","human_short":"9th January","whole_day":false,"start":"2021-01-09T19:00:00+00:00"}},{"name":"Naksha 2021","url":"https://osmcal.org/event/422/","date":{"human":"10th January 19:00 – 16th January 21:00","human_short":"10th–16th January","whole_day":false,"start":"2021-01-10T19:00:00+05:30","end":"2021-01-16T21:00:00+05:30"},"location":{"short":"Tamia, Madhya Pradesh, India","detailed":"India, Tamia, Madhya Pradesh, India","coords":[78.667743,22.351115],"venue":"India"}},{"name":"OSM-Treffen Zürich","url":"https://osmcal.org/event/417/","date":{"human":"11th January 18:30 – 22:00","human_short":"11th January","whole_day":false,"start":"2021-01-11T18:30:00+01:00","end":"2021-01-11T22:00:00+01:00"},"location":{"short":"Zurich, Zurich, Switzerland","detailed":"online bbb, Hochstrasse, Fluntern, Zurich, Zurich, Switzerland","coords":[8.546741,47.376035],"venue":"online bbb"}},{"name":"Münchner OSM-Stammtisch","url":"https://osmcal.org/event/419/","date":{"human":"12th January 19:00","human_short":"12th January","whole_day":false,"start":"2021-01-12T19:00:00+01:00"},"location":{"short":"Munich, Bavaria, Germany","detailed":"Thiereckstraße, Altstadt-Lehel, Munich, Bavaria, Germany","coords":[11.575382,48.137108]}},{"name":"Michigan Online Meetup","url":"https://osmcal.org/event/366/","date":{"human":"13th January 19:00 – 20:00","human_short":"13th January","whole_day":false,"start":"2021-01-13T19:00:00-05:00","end":"2021-01-13T20:00:00-05:00"},"location":{"short":"Michigan, United States","detailed":"Online, Chippewa Trail, Michigan, United States","coords":[-84.682435,43.621196],"venue":"Online"}},{"name":"OpenStreetMap US Mappy Hour","url":"https://osmcal.org/event/405/","date":{"human":"13th January 20:30 – 21:30","human_short":"13th January","whole_day":false,"start":"2021-01-13T20:30:00-05:00","end":"2021-01-13T21:30:00-05:00"},"location":{"short":"Kansas, United States","detailed":"Online, County Road 412, Kansas, United States","coords":[-98.550441,39.224396],"venue":"Online"}},{"name":"151. Berlin-Brandenburg OpenStreetMap Stammtisch (Online)","url":"https://osmcal.org/event/384/","date":{"human":"14th January 19:00","human_short":"14th January","whole_day":false,"start":"2021-01-14T19:00:00+01:00"},"location":{"short":"Berlin, Berlin, Germany","detailed":"Online, Link zur Platform siehe Event-Website, Unter den Linden, Mitte, Berlin, Berlin, Germany","coords":[13.38886,52.517037],"venue":"Online, Link zur Platform siehe Event-Website"}},{"name":"Virtual community meeting.","url":"https://osmcal.org/event/401/","date":{"human":"15th January 19:00 – 22:00","human_short":"15th January","whole_day":false,"start":"2021-01-15T19:00:00+00:00","end":"2021-01-15T22:00:00+00:00"},"location":{"short":"Warsaw, Masovian Voivodeship, Poland","detailed":"Poland, 1, Plac Defilad, Śródmieście, Warsaw, Masovian Voivodeship, Poland","coords":[21.006725,52.231958],"venue":"Poland"}},{"name":"Rencontre mensuelle (virtuelle) Lyon","url":"https://osmcal.org/event/407/","date":{"human":"19th January 18:30","human_short":"19th January","whole_day":false,"start":"2021-01-19T18:30:00+01:00"},"location":{"short":"Lyon, Auvergne-Rhône-Alpes, France","detailed":"online, Rue Juliette Récamier, Les Brotteaux, Lyon, Auvergne-Rhône-Alpes, France","coords":[4.853832,45.763808],"venue":"online"}},{"name":"135. Treffen des OSM-Stammtisches Bonn","url":"https://osmcal.org/event/393/","date":{"human":"19th January 19:00 (Europe/Berlin)","human_short":"19th January","whole_day":false,"start":"2021-01-19T19:00:00+01:00"}},{"name":"Missing Maps DRK Online Mapathon","url":"https://osmcal.org/event/380/","date":{"human":"19th January 19:00 – 22:00 (Europe/Berlin)","human_short":"19th January","whole_day":false,"start":"2021-01-19T19:00:00+01:00","end":"2021-01-19T22:00:00+01:00"}},{"name":"OSM-Verkehrswende #19 (Online)","url":"https://osmcal.org/event/383/","date":{"human":"19th January 19:30","human_short":"19th January","whole_day":false,"start":"2021-01-19T19:30:00+01:00"},"location":{"short":"Berlin, Berlin, Germany","detailed":"Online, Link zur Platform siehe Wiki-Link, Unter den Linden, Mitte, Berlin, Berlin, Germany","coords":[13.38886,52.517037],"venue":"Online, Link zur Platform siehe Wiki-Link"}},{"name":"Lüneburger Mappertreffen (online)","url":"https://osmcal.org/event/385/","date":{"human":"19th January 20:30","human_short":"19th January","whole_day":false,"start":"2021-01-19T20:30:00+01:00"},"location":{"short":"Lüneburg, Lower Saxony, Germany","detailed":"9, Friedenstraße, Rotes Feld, Lower Saxony, Germany","coords":[10.412018,53.245632]}},{"name":"Virtual Civic Hack & Map Night","url":"https://osmcal.org/event/376/","date":{"human":"21st January 18:30 – 21:00","human_short":"21st January","whole_day":false,"start":"2021-01-21T18:30:00-08:00","end":"2021-01-21T21:00:00-08:00"},"location":{"short":"San Jose, California, United States","detailed":"Online, East Santa Clara Street, Japantown, San Jose, California, United States","coords":[-121.890583,37.336191],"venue":"Online"}},{"name":"Virtual community meeting.","url":"https://osmcal.org/event/402/","date":{"human":"22nd January 19:00 – 22:00","human_short":"22nd January","whole_day":false,"start":"2021-01-22T19:00:00+00:00","end":"2021-01-22T22:00:00+00:00"},"location":{"short":"Warsaw, Masovian Voivodeship, Poland","detailed":"Poland, 1, Plac Defilad, Śródmieście, Warsaw, Masovian Voivodeship, Poland","coords":[21.006725,52.231958],"venue":"Poland"}},{"name":"Bremer Mappertreffen (Online)","url":"https://osmcal.org/event/406/","date":{"human":"25th January 19:00","human_short":"25th January","whole_day":false,"start":"2021-01-25T19:00:00+01:00"},"location":{"short":"Bremen, Free Hanseatic City of Bremen, Germany","detailed":"Online via Jitsi, Am Markt, Mitte, Bremen, Free Hanseatic City of Bremen, Germany","coords":[8.807165,53.07582],"venue":"Online via Jitsi"}},{"name":"Virtual OpenStreetMap Belgium meeting","url":"https://osmcal.org/event/319/","date":{"human":"26th January 20:00 – 22:00","human_short":"26th January","whole_day":false,"start":"2021-01-26T20:00:00+01:00","end":"2021-01-26T22:00:00+01:00"},"location":{"short":"Brussels, Brussels-Capital, Belgium","detailed":"Online, 8, Grand Place, Brussels, Brussels-Capital, Belgium","coords":[4.351697,50.846557],"venue":"Online"}},{"name":"Virtual community meeting.","url":"https://osmcal.org/event/403/","date":{"human":"29th January 19:00 – 22:00","human_short":"29th January","whole_day":false,"start":"2021-01-29T19:00:00+00:00","end":"2021-01-29T22:00:00+00:00"},"location":{"short":"Warsaw, Masovian Voivodeship, Poland","detailed":"Poland, 1, Plac Defilad, Śródmieście, Warsaw, Masovian Voivodeship, Poland","coords":[21.006725,52.231958],"venue":"Poland"}},{"name":"Virtual Civic Hack & Map Night","url":"https://osmcal.org/event/377/","date":{"human":"4th February 18:30 – 21:00","human_short":"4th February","whole_day":false,"start":"2021-02-04T18:30:00-08:00","end":"2021-02-04T21:00:00-08:00"},"location":{"short":"San Jose, California, United States","detailed":"Online, East Santa Clara Street, Japantown, San Jose, California, United States","coords":[-121.890583,37.336191],"venue":"Online"}},{"name":"Münchner OSM-Stammtisch","url":"https://osmcal.org/event/420/","date":{"human":"10th February 19:00","human_short":"10th February","whole_day":false,"start":"2021-02-10T19:00:00+01:00"},"location":{"short":"Munich, Bavaria, Germany","detailed":"Thiereckstraße, Altstadt-Lehel, Munich, Bavaria, Germany","coords":[11.575382,48.137108]}},{"name":"OSM-Treffen Zürich","url":"https://osmcal.org/event/411/","date":{"human":"11th February 18:30 – 22:00","human_short":"11th February","whole_day":false,"start":"2021-02-11T18:30:00+01:00","end":"2021-02-11T22:00:00+01:00"},"location":{"short":"Zurich, Zurich, Switzerland","detailed":"online bbb, Hochstrasse, Fluntern, Zurich, Zurich, Switzerland","coords":[8.546741,47.376035],"venue":"online bbb"}},{"name":"152. Berlin-Brandenburg OpenStreetMap Stammtisch (Online)","url":"https://osmcal.org/event/408/","date":{"human":"12th February 19:00","human_short":"12th February","whole_day":false,"start":"2021-02-12T19:00:00+01:00"},"location":{"short":"Berlin, Berlin, Germany","detailed":"Online, Link zur Platform siehe Event-Website, Unter den Linden, Mitte, Berlin, Berlin, Germany","coords":[13.38886,52.517037],"venue":"Online, Link zur Platform siehe Event-Website"}},{"name":"136. Treffen des OSM-Stammtisches Bonn","url":"https://osmcal.org/event/394/","date":{"human":"16th February 20:00 (Europe/Berlin)","human_short":"16th February","whole_day":false,"start":"2021-02-16T20:00:00+01:00"}},{"name":"Lüneburger Mappertreffen (online)","url":"https://osmcal.org/event/386/","date":{"human":"16th February 20:30","human_short":"16th February","whole_day":false,"start":"2021-02-16T20:30:00+01:00"},"location":{"short":"Lüneburg, Lower Saxony, Germany","detailed":"9, Friedenstraße, Rotes Feld, Lower Saxony, Germany","coords":[10.412018,53.245632]}},{"name":"OSM-Treffen Zürich","url":"https://osmcal.org/event/412/","date":{"human":"11th March 18:30 – 22:00","human_short":"11th March","whole_day":false,"start":"2021-03-11T18:30:00+01:00","end":"2021-03-11T22:00:00+01:00"},"location":{"short":"Zurich, Zurich, Switzerland","detailed":"online oder cafe BQM, Hochstrasse, Fluntern, Zurich, Zurich, Switzerland","coords":[8.546741,47.376035],"venue":"online oder cafe BQM"}},{"name":"Münchner OSM-Stammtisch","url":"https://osmcal.org/event/421/","date":{"human":"11th March 19:00","human_short":"11th March","whole_day":false,"start":"2021-03-11T19:00:00+01:00"},"location":{"short":"Munich, Bavaria, Germany","detailed":"Thiereckstraße, Altstadt-Lehel, Munich, Bavaria, Germany","coords":[11.575382,48.137108]}},{"name":"153. Berlin-Brandenburg OpenStreetMap Stammtisch (Online)","url":"https://osmcal.org/event/409/","date":{"human":"11th March 19:00","human_short":"11th March","whole_day":false,"start":"2021-03-11T19:00:00+01:00"},"location":{"short":"Berlin, Berlin, Germany","detailed":"Online, Link zur Platform siehe Event-Website, Unter den Linden, Mitte, Berlin, Berlin, Germany","coords":[13.38886,52.517037],"venue":"Online, Link zur Platform siehe Event-Website"}},{"name":"137. Treffen des OSM-Stammtisches Bonn","url":"https://osmcal.org/event/395/","date":{"human":"16th March 20:00 (Europe/Berlin)","human_short":"16th March","whole_day":false,"start":"2021-03-16T20:00:00+01:00"}},{"name":"Lüneburger Mappertreffen (online)","url":"https://osmcal.org/event/387/","date":{"human":"16th March 20:30","human_short":"16th March","whole_day":false,"start":"2021-03-16T20:30:00+01:00"},"location":{"short":"Lüneburg, Lower Saxony, Germany","detailed":"9, Friedenstraße, Rotes Feld, Lower Saxony, Germany","coords":[10.412018,53.245632]}},{"name":"Lüneburger Mappertreffen (online)","url":"https://osmcal.org/event/388/","date":{"human":"20th April 20:30","human_short":"20th April","whole_day":false,"start":"2021-04-20T20:30:00+02:00"},"location":{"short":"Lüneburg, Lower Saxony, Germany","detailed":"9, Friedenstraße, Rotes Feld, Lower Saxony, Germany","coords":[10.412018,53.245632]}},{"name":"138. Treffen des OSM-Stammtisches Bonn","url":"https://osmcal.org/event/396/","date":{"human":"20th April 21:00 (Europe/Berlin)","human_short":"20th April","whole_day":false,"start":"2021-04-20T21:00:00+02:00"}},{"name":"OSM-Treffen Zürich","url":"https://osmcal.org/event/413/","date":{"human":"11th May 18:30 – 22:00","human_short":"11th May","whole_day":false,"start":"2021-05-11T18:30:00+02:00","end":"2021-05-11T22:00:00+02:00"},"location":{"short":"Zurich, Zurich, Switzerland","detailed":"beim Studi-Café bQm (ETH), Zürich, Hochstrasse, Fluntern, Zurich, Zurich, Switzerland","coords":[8.546741,47.376035],"venue":"beim Studi-Café bQm (ETH), Zürich"}},{"name":"Lüneburger Mappertreffen (online)","url":"https://osmcal.org/event/389/","date":{"human":"18th May 20:30","human_short":"18th May","whole_day":false,"start":"2021-05-18T20:30:00+02:00"},"location":{"short":"Lüneburg, Lower Saxony, Germany","detailed":"9, Friedenstraße, Rotes Feld, Lower Saxony, Germany","coords":[10.412018,53.245632]}},{"name":"139. Treffen des OSM-Stammtisches Bonn","url":"https://osmcal.org/event/397/","date":{"human":"18th May 21:00 (Europe/Berlin)","human_short":"18th May","whole_day":false,"start":"2021-05-18T21:00:00+02:00"}},{"name":"Lüneburger Mappertreffen (online)","url":"https://osmcal.org/event/391/","date":{"human":"15th June 20:30","human_short":"15th June","whole_day":false,"start":"2021-06-15T20:30:00+02:00"},"location":{"short":"Lüneburg, Lower Saxony, Germany","detailed":"9, Friedenstraße, Rotes Feld, Lower Saxony, Germany","coords":[10.412018,53.245632]}},{"name":"140. Treffen des OSM-Stammtisches Bonn","url":"https://osmcal.org/event/398/","date":{"human":"15th June 21:00 (Europe/Berlin)","human_short":"15th June","whole_day":false,"start":"2021-06-15T21:00:00+02:00"}},{"name":"OSM-Treffen Zürich","url":"https://osmcal.org/event/414/","date":{"human":"11th August 18:30 – 22:00","human_short":"11th August","whole_day":false,"start":"2021-08-11T18:30:00+02:00","end":"2021-08-11T22:00:00+02:00"},"location":{"short":"Zurich, Zurich, Switzerland","detailed":"beim Studi-Café bQm (ETH), Zürich, Hochstrasse, Fluntern, Zurich, Zurich, Switzerland","coords":[8.546741,47.376035],"venue":"beim Studi-Café bQm (ETH), Zürich"}},{"name":"OSM-Treffen Zürich","url":"https://osmcal.org/event/415/","date":{"human":"11th October 18:30 – 22:00","human_short":"11th October","whole_day":false,"start":"2021-10-11T18:30:00+02:00","end":"2021-10-11T22:00:00+02:00"},"location":{"short":"Zurich, Zurich, Switzerland","detailed":"beim Studi-Café bQm (ETH), Zürich, Hochstrasse, Fluntern, Zurich, Zurich, Switzerland","coords":[8.546741,47.376035],"venue":"beim Studi-Café bQm (ETH), Zürich"}},{"name":"OSM-Treffen Zürich","url":"https://osmcal.org/event/416/","date":{"human":"11th November 18:30 – 22:00","human_short":"11th November","whole_day":false,"start":"2021-11-11T18:30:00+01:00","end":"2021-11-11T22:00:00+01:00"},"location":{"short":"Zurich, Zurich, Switzerland","detailed":"beim Studi-Café bQm (ETH), Zürich, Hochstrasse, Fluntern, Zurich, Zurich, Switzerland","coords":[8.546741,47.376035],"venue":"beim Studi-Café bQm (ETH), Zürich"}},{"name":"State of the Map Africa 2021","url":"https://osmcal.org/event/392/","date":{"human":"19th November – 21st November","human_short":"19th–21st November","whole_day":true,"start":"2021-11-19T12:00:00+03:00","end":"2021-11-21T12:00:00+03:00"},"location":{"short":"Nairobi, Nairobi, Kenya","detailed":"Nairobi, Kenya, Uhuru Highway, Nairobi West, Nairobi, Nairobi, Kenya","coords":[36.826061,-1.303169],"venue":"Nairobi, Kenya"}}]
\ No newline at end of file
+[
+ {
+ "name": "Missing Maps London Mapathon",
+ "url": "https://osmcal.org/event/367/",
+ "date": {
+ "human": "5th January 19:00 – 21:00 (Europe/London)",
+ "human_short": "5th January",
+ "whole_day": false,
+ "start": "2021-01-05T19:00:00+00:00",
+ "end": "2021-01-05T21:00:00+00:00"
+ }
+ },
+ {
+ "name": "Virtuelles Niederbayern-Treffen",
+ "url": "https://osmcal.org/event/404/",
+ "date": {
+ "human": "5th January",
+ "human_short": "5th January",
+ "whole_day": true,
+ "start": "2021-01-05T19:30:00+01:00"
+ },
+ "location": {
+ "short": "Oberframmering, Landau an der Isar, Bavaria, Germany",
+ "detailed": "online, Osterhofener Straße, Oberframmering, Bavaria, Germany",
+ "coords": [
+ 12.749539,
+ 48.688166
+ ],
+ "venue": "online"
+ }
+ },
+ {
+ "name": "Virtual Civic Hack & Map Night",
+ "url": "https://osmcal.org/event/375/",
+ "date": {
+ "human": "7th January 18:30 – 21:00",
+ "human_short": "7th January",
+ "whole_day": false,
+ "start": "2021-01-07T18:30:00-08:00",
+ "end": "2021-01-07T21:00:00-08:00"
+ },
+ "location": {
+ "short": "San Jose, California, United States",
+ "detailed": "Online, East Santa Clara Street, Japantown, San Jose, California, United States",
+ "coords": [
+ -121.890583,
+ 37.336191
+ ],
+ "venue": "Online"
+ }
+ },
+ {
+ "name": "Bochum OSM-Stammtisch (online)",
+ "url": "https://osmcal.org/event/368/",
+ "date": {
+ "human": "7th January 19:00",
+ "human_short": "7th January",
+ "whole_day": false,
+ "start": "2021-01-07T19:00:00+01:00"
+ },
+ "location": {
+ "short": "Bochum, North Rhine-Westphalia, Germany",
+ "detailed": "Jitsi, Boulevard, Innenstadt, Bochum, North Rhine-Westphalia, Germany",
+ "coords": [
+ 7.219664,
+ 51.481811
+ ],
+ "venue": "Jitsi"
+ }
+ },
+ {
+ "name": "Dresdner OSM-Stammtisch",
+ "url": "https://osmcal.org/event/410/",
+ "date": {
+ "human": "7th January 19:00",
+ "human_short": "7th January",
+ "whole_day": false,
+ "start": "2021-01-07T19:00:00+01:00"
+ },
+ "location": {
+ "short": "Dresden, Saxony, Germany",
+ "detailed": "Online, Wilsdruffer Straße, Innere Altstadt, Dresden, Saxony, Germany",
+ "coords": [
+ 13.738144,
+ 51.049329
+ ],
+ "venue": "Online"
+ }
+ },
+ {
+ "name": "Virtual community meeting.",
+ "url": "https://osmcal.org/event/400/",
+ "date": {
+ "human": "8th January 19:00 – 22:00",
+ "human_short": "8th January",
+ "whole_day": false,
+ "start": "2021-01-08T19:00:00+00:00",
+ "end": "2021-01-08T22:00:00+00:00"
+ },
+ "location": {
+ "short": "Warsaw, Masovian Voivodeship, Poland",
+ "detailed": "Poland, 1, Plac Defilad, Śródmieście, Warsaw, Masovian Voivodeship, Poland",
+ "coords": [
+ 21.006725,
+ 52.231958
+ ],
+ "venue": "Poland"
+ }
+ },
+ {
+ "name": "Virtueller OSM Stammtisch Österreich",
+ "url": "https://osmcal.org/event/423/",
+ "date": {
+ "human": "8th January 19:00",
+ "human_short": "8th January",
+ "whole_day": false,
+ "start": "2021-01-08T19:00:00+01:00"
+ },
+ "location": {
+ "short": "Großarl, Salzburg, Austria",
+ "detailed": "Online, Ebengasse, Salzburg, Austria",
+ "coords": [
+ 13.199959,
+ 47.200034
+ ],
+ "venue": "Online"
+ }
+ },
+ {
+ "name": "Virtual meeting of the Polish OSM Association",
+ "url": "https://osmcal.org/event/418/",
+ "date": {
+ "human": "9th January 19:00 (Etc/UTC)",
+ "human_short": "9th January",
+ "whole_day": false,
+ "start": "2021-01-09T19:00:00+00:00"
+ }
+ },
+ {
+ "name": "Naksha 2021",
+ "url": "https://osmcal.org/event/422/",
+ "date": {
+ "human": "10th January 19:00 – 16th January 21:00",
+ "human_short": "10th–16th January",
+ "whole_day": false,
+ "start": "2021-01-10T19:00:00+05:30",
+ "end": "2021-01-16T21:00:00+05:30"
+ },
+ "location": {
+ "short": "Tamia, Madhya Pradesh, India",
+ "detailed": "India, Tamia, Madhya Pradesh, India",
+ "coords": [
+ 78.667743,
+ 22.351115
+ ],
+ "venue": "India"
+ }
+ },
+ {
+ "name": "OSM-Treffen Zürich",
+ "url": "https://osmcal.org/event/417/",
+ "date": {
+ "human": "11th January 18:30 – 22:00",
+ "human_short": "11th January",
+ "whole_day": false,
+ "start": "2021-01-11T18:30:00+01:00",
+ "end": "2021-01-11T22:00:00+01:00"
+ },
+ "location": {
+ "short": "Zurich, Zurich, Switzerland",
+ "detailed": "online bbb, Hochstrasse, Fluntern, Zurich, Zurich, Switzerland",
+ "coords": [
+ 8.546741,
+ 47.376035
+ ],
+ "venue": "online bbb"
+ }
+ },
+ {
+ "name": "Münchner OSM-Stammtisch",
+ "url": "https://osmcal.org/event/419/",
+ "date": {
+ "human": "12th January 19:00",
+ "human_short": "12th January",
+ "whole_day": false,
+ "start": "2021-01-12T19:00:00+01:00"
+ },
+ "location": {
+ "short": "Munich, Bavaria, Germany",
+ "detailed": "Thiereckstraße, Altstadt-Lehel, Munich, Bavaria, Germany",
+ "coords": [
+ 11.575382,
+ 48.137108
+ ]
+ }
+ },
+ {
+ "name": "Michigan Online Meetup",
+ "url": "https://osmcal.org/event/366/",
+ "date": {
+ "human": "13th January 19:00 – 20:00",
+ "human_short": "13th January",
+ "whole_day": false,
+ "start": "2021-01-13T19:00:00-05:00",
+ "end": "2021-01-13T20:00:00-05:00"
+ },
+ "location": {
+ "short": "Michigan, United States",
+ "detailed": "Online, Chippewa Trail, Michigan, United States",
+ "coords": [
+ -84.682435,
+ 43.621196
+ ],
+ "venue": "Online"
+ }
+ },
+ {
+ "name": "OpenStreetMap US Mappy Hour",
+ "url": "https://osmcal.org/event/405/",
+ "date": {
+ "human": "13th January 20:30 – 21:30",
+ "human_short": "13th January",
+ "whole_day": false,
+ "start": "2021-01-13T20:30:00-05:00",
+ "end": "2021-01-13T21:30:00-05:00"
+ },
+ "location": {
+ "short": "Kansas, United States",
+ "detailed": "Online, County Road 412, Kansas, United States",
+ "coords": [
+ -98.550441,
+ 39.224396
+ ],
+ "venue": "Online"
+ }
+ },
+ {
+ "name": "151. Berlin-Brandenburg OpenStreetMap Stammtisch (Online)",
+ "url": "https://osmcal.org/event/384/",
+ "date": {
+ "human": "14th January 19:00",
+ "human_short": "14th January",
+ "whole_day": false,
+ "start": "2021-01-14T19:00:00+01:00"
+ },
+ "location": {
+ "short": "Berlin, Berlin, Germany",
+ "detailed": "Online, Link zur Platform siehe Event-Website, Unter den Linden, Mitte, Berlin, Berlin, Germany",
+ "coords": [
+ 13.38886,
+ 52.517037
+ ],
+ "venue": "Online, Link zur Platform siehe Event-Website"
+ }
+ },
+ {
+ "name": "Virtual community meeting.",
+ "url": "https://osmcal.org/event/401/",
+ "date": {
+ "human": "15th January 19:00 – 22:00",
+ "human_short": "15th January",
+ "whole_day": false,
+ "start": "2021-01-15T19:00:00+00:00",
+ "end": "2021-01-15T22:00:00+00:00"
+ },
+ "location": {
+ "short": "Warsaw, Masovian Voivodeship, Poland",
+ "detailed": "Poland, 1, Plac Defilad, Śródmieście, Warsaw, Masovian Voivodeship, Poland",
+ "coords": [
+ 21.006725,
+ 52.231958
+ ],
+ "venue": "Poland"
+ }
+ },
+ {
+ "name": "Rencontre mensuelle (virtuelle) Lyon",
+ "url": "https://osmcal.org/event/407/",
+ "date": {
+ "human": "19th January 18:30",
+ "human_short": "19th January",
+ "whole_day": false,
+ "start": "2021-01-19T18:30:00+01:00"
+ },
+ "location": {
+ "short": "Lyon, Auvergne-Rhône-Alpes, France",
+ "detailed": "online, Rue Juliette Récamier, Les Brotteaux, Lyon, Auvergne-Rhône-Alpes, France",
+ "coords": [
+ 4.853832,
+ 45.763808
+ ],
+ "venue": "online"
+ }
+ },
+ {
+ "name": "135. Treffen des OSM-Stammtisches Bonn",
+ "url": "https://osmcal.org/event/393/",
+ "date": {
+ "human": "19th January 19:00 (Europe/Berlin)",
+ "human_short": "19th January",
+ "whole_day": false,
+ "start": "2021-01-19T19:00:00+01:00"
+ }
+ },
+ {
+ "name": "Missing Maps DRK Online Mapathon",
+ "url": "https://osmcal.org/event/380/",
+ "date": {
+ "human": "19th January 19:00 – 22:00 (Europe/Berlin)",
+ "human_short": "19th January",
+ "whole_day": false,
+ "start": "2021-01-19T19:00:00+01:00",
+ "end": "2021-01-19T22:00:00+01:00"
+ }
+ },
+ {
+ "name": "OSM-Verkehrswende #19 (Online)",
+ "url": "https://osmcal.org/event/383/",
+ "date": {
+ "human": "19th January 19:30",
+ "human_short": "19th January",
+ "whole_day": false,
+ "start": "2021-01-19T19:30:00+01:00"
+ },
+ "location": {
+ "short": "Berlin, Berlin, Germany",
+ "detailed": "Online, Link zur Platform siehe Wiki-Link, Unter den Linden, Mitte, Berlin, Berlin, Germany",
+ "coords": [
+ 13.38886,
+ 52.517037
+ ],
+ "venue": "Online, Link zur Platform siehe Wiki-Link"
+ }
+ },
+ {
+ "name": "Lüneburger Mappertreffen (online)",
+ "url": "https://osmcal.org/event/385/",
+ "date": {
+ "human": "19th January 20:30",
+ "human_short": "19th January",
+ "whole_day": false,
+ "start": "2021-01-19T20:30:00+01:00"
+ },
+ "location": {
+ "short": "Lüneburg, Lower Saxony, Germany",
+ "detailed": "9, Friedenstraße, Rotes Feld, Lower Saxony, Germany",
+ "coords": [
+ 10.412018,
+ 53.245632
+ ]
+ }
+ },
+ {
+ "name": "Virtual Civic Hack & Map Night",
+ "url": "https://osmcal.org/event/376/",
+ "date": {
+ "human": "21st January 18:30 – 21:00",
+ "human_short": "21st January",
+ "whole_day": false,
+ "start": "2021-01-21T18:30:00-08:00",
+ "end": "2021-01-21T21:00:00-08:00"
+ },
+ "location": {
+ "short": "San Jose, California, United States",
+ "detailed": "Online, East Santa Clara Street, Japantown, San Jose, California, United States",
+ "coords": [
+ -121.890583,
+ 37.336191
+ ],
+ "venue": "Online"
+ }
+ },
+ {
+ "name": "Virtual community meeting.",
+ "url": "https://osmcal.org/event/402/",
+ "date": {
+ "human": "22nd January 19:00 – 22:00",
+ "human_short": "22nd January",
+ "whole_day": false,
+ "start": "2021-01-22T19:00:00+00:00",
+ "end": "2021-01-22T22:00:00+00:00"
+ },
+ "location": {
+ "short": "Warsaw, Masovian Voivodeship, Poland",
+ "detailed": "Poland, 1, Plac Defilad, Śródmieście, Warsaw, Masovian Voivodeship, Poland",
+ "coords": [
+ 21.006725,
+ 52.231958
+ ],
+ "venue": "Poland"
+ }
+ },
+ {
+ "name": "Bremer Mappertreffen (Online)",
+ "url": "https://osmcal.org/event/406/",
+ "date": {
+ "human": "25th January 19:00",
+ "human_short": "25th January",
+ "whole_day": false,
+ "start": "2021-01-25T19:00:00+01:00"
+ },
+ "location": {
+ "short": "Bremen, Free Hanseatic City of Bremen, Germany",
+ "detailed": "Online via Jitsi, Am Markt, Mitte, Bremen, Free Hanseatic City of Bremen, Germany",
+ "coords": [
+ 8.807165,
+ 53.07582
+ ],
+ "venue": "Online via Jitsi"
+ }
+ },
+ {
+ "name": "Virtual OpenStreetMap Belgium meeting",
+ "url": "https://osmcal.org/event/319/",
+ "date": {
+ "human": "26th January 20:00 – 22:00",
+ "human_short": "26th January",
+ "whole_day": false,
+ "start": "2021-01-26T20:00:00+01:00",
+ "end": "2021-01-26T22:00:00+01:00"
+ },
+ "location": {
+ "short": "Brussels, Brussels-Capital, Belgium",
+ "detailed": "Online, 8, Grand Place, Brussels, Brussels-Capital, Belgium",
+ "coords": [
+ 4.351697,
+ 50.846557
+ ],
+ "venue": "Online"
+ }
+ },
+ {
+ "name": "Virtual community meeting.",
+ "url": "https://osmcal.org/event/403/",
+ "date": {
+ "human": "29th January 19:00 – 22:00",
+ "human_short": "29th January",
+ "whole_day": false,
+ "start": "2021-01-29T19:00:00+00:00",
+ "end": "2021-01-29T22:00:00+00:00"
+ },
+ "location": {
+ "short": "Warsaw, Masovian Voivodeship, Poland",
+ "detailed": "Poland, 1, Plac Defilad, Śródmieście, Warsaw, Masovian Voivodeship, Poland",
+ "coords": [
+ 21.006725,
+ 52.231958
+ ],
+ "venue": "Poland"
+ }
+ },
+ {
+ "name": "Virtual Civic Hack & Map Night",
+ "url": "https://osmcal.org/event/377/",
+ "date": {
+ "human": "4th February 18:30 – 21:00",
+ "human_short": "4th February",
+ "whole_day": false,
+ "start": "2021-02-04T18:30:00-08:00",
+ "end": "2021-02-04T21:00:00-08:00"
+ },
+ "location": {
+ "short": "San Jose, California, United States",
+ "detailed": "Online, East Santa Clara Street, Japantown, San Jose, California, United States",
+ "coords": [
+ -121.890583,
+ 37.336191
+ ],
+ "venue": "Online"
+ }
+ },
+ {
+ "name": "Münchner OSM-Stammtisch",
+ "url": "https://osmcal.org/event/420/",
+ "date": {
+ "human": "10th February 19:00",
+ "human_short": "10th February",
+ "whole_day": false,
+ "start": "2021-02-10T19:00:00+01:00"
+ },
+ "location": {
+ "short": "Munich, Bavaria, Germany",
+ "detailed": "Thiereckstraße, Altstadt-Lehel, Munich, Bavaria, Germany",
+ "coords": [
+ 11.575382,
+ 48.137108
+ ]
+ }
+ },
+ {
+ "name": "OSM-Treffen Zürich",
+ "url": "https://osmcal.org/event/411/",
+ "date": {
+ "human": "11th February 18:30 – 22:00",
+ "human_short": "11th February",
+ "whole_day": false,
+ "start": "2021-02-11T18:30:00+01:00",
+ "end": "2021-02-11T22:00:00+01:00"
+ },
+ "location": {
+ "short": "Zurich, Zurich, Switzerland",
+ "detailed": "online bbb, Hochstrasse, Fluntern, Zurich, Zurich, Switzerland",
+ "coords": [
+ 8.546741,
+ 47.376035
+ ],
+ "venue": "online bbb"
+ }
+ },
+ {
+ "name": "152. Berlin-Brandenburg OpenStreetMap Stammtisch (Online)",
+ "url": "https://osmcal.org/event/408/",
+ "date": {
+ "human": "12th February 19:00",
+ "human_short": "12th February",
+ "whole_day": false,
+ "start": "2021-02-12T19:00:00+01:00"
+ },
+ "location": {
+ "short": "Berlin, Berlin, Germany",
+ "detailed": "Online, Link zur Platform siehe Event-Website, Unter den Linden, Mitte, Berlin, Berlin, Germany",
+ "coords": [
+ 13.38886,
+ 52.517037
+ ],
+ "venue": "Online, Link zur Platform siehe Event-Website"
+ }
+ },
+ {
+ "name": "136. Treffen des OSM-Stammtisches Bonn",
+ "url": "https://osmcal.org/event/394/",
+ "date": {
+ "human": "16th February 20:00 (Europe/Berlin)",
+ "human_short": "16th February",
+ "whole_day": false,
+ "start": "2021-02-16T20:00:00+01:00"
+ }
+ },
+ {
+ "name": "Lüneburger Mappertreffen (online)",
+ "url": "https://osmcal.org/event/386/",
+ "date": {
+ "human": "16th February 20:30",
+ "human_short": "16th February",
+ "whole_day": false,
+ "start": "2021-02-16T20:30:00+01:00"
+ },
+ "location": {
+ "short": "Lüneburg, Lower Saxony, Germany",
+ "detailed": "9, Friedenstraße, Rotes Feld, Lower Saxony, Germany",
+ "coords": [
+ 10.412018,
+ 53.245632
+ ]
+ }
+ },
+ {
+ "name": "OSM-Treffen Zürich",
+ "url": "https://osmcal.org/event/412/",
+ "date": {
+ "human": "11th March 18:30 – 22:00",
+ "human_short": "11th March",
+ "whole_day": false,
+ "start": "2021-03-11T18:30:00+01:00",
+ "end": "2021-03-11T22:00:00+01:00"
+ },
+ "location": {
+ "short": "Zurich, Zurich, Switzerland",
+ "detailed": "online oder cafe BQM, Hochstrasse, Fluntern, Zurich, Zurich, Switzerland",
+ "coords": [
+ 8.546741,
+ 47.376035
+ ],
+ "venue": "online oder cafe BQM"
+ }
+ },
+ {
+ "name": "Münchner OSM-Stammtisch",
+ "url": "https://osmcal.org/event/421/",
+ "date": {
+ "human": "11th March 19:00",
+ "human_short": "11th March",
+ "whole_day": false,
+ "start": "2021-03-11T19:00:00+01:00"
+ },
+ "location": {
+ "short": "Munich, Bavaria, Germany",
+ "detailed": "Thiereckstraße, Altstadt-Lehel, Munich, Bavaria, Germany",
+ "coords": [
+ 11.575382,
+ 48.137108
+ ]
+ }
+ },
+ {
+ "name": "153. Berlin-Brandenburg OpenStreetMap Stammtisch (Online)",
+ "url": "https://osmcal.org/event/409/",
+ "date": {
+ "human": "11th March 19:00",
+ "human_short": "11th March",
+ "whole_day": false,
+ "start": "2021-03-11T19:00:00+01:00"
+ },
+ "location": {
+ "short": "Berlin, Berlin, Germany",
+ "detailed": "Online, Link zur Platform siehe Event-Website, Unter den Linden, Mitte, Berlin, Berlin, Germany",
+ "coords": [
+ 13.38886,
+ 52.517037
+ ],
+ "venue": "Online, Link zur Platform siehe Event-Website"
+ }
+ },
+ {
+ "name": "137. Treffen des OSM-Stammtisches Bonn",
+ "url": "https://osmcal.org/event/395/",
+ "date": {
+ "human": "16th March 20:00 (Europe/Berlin)",
+ "human_short": "16th March",
+ "whole_day": false,
+ "start": "2021-03-16T20:00:00+01:00"
+ }
+ },
+ {
+ "name": "Lüneburger Mappertreffen (online)",
+ "url": "https://osmcal.org/event/387/",
+ "date": {
+ "human": "16th March 20:30",
+ "human_short": "16th March",
+ "whole_day": false,
+ "start": "2021-03-16T20:30:00+01:00"
+ },
+ "location": {
+ "short": "Lüneburg, Lower Saxony, Germany",
+ "detailed": "9, Friedenstraße, Rotes Feld, Lower Saxony, Germany",
+ "coords": [
+ 10.412018,
+ 53.245632
+ ]
+ }
+ },
+ {
+ "name": "Lüneburger Mappertreffen (online)",
+ "url": "https://osmcal.org/event/388/",
+ "date": {
+ "human": "20th April 20:30",
+ "human_short": "20th April",
+ "whole_day": false,
+ "start": "2021-04-20T20:30:00+02:00"
+ },
+ "location": {
+ "short": "Lüneburg, Lower Saxony, Germany",
+ "detailed": "9, Friedenstraße, Rotes Feld, Lower Saxony, Germany",
+ "coords": [
+ 10.412018,
+ 53.245632
+ ]
+ }
+ },
+ {
+ "name": "138. Treffen des OSM-Stammtisches Bonn",
+ "url": "https://osmcal.org/event/396/",
+ "date": {
+ "human": "20th April 21:00 (Europe/Berlin)",
+ "human_short": "20th April",
+ "whole_day": false,
+ "start": "2021-04-20T21:00:00+02:00"
+ }
+ },
+ {
+ "name": "OSM-Treffen Zürich",
+ "url": "https://osmcal.org/event/413/",
+ "date": {
+ "human": "11th May 18:30 – 22:00",
+ "human_short": "11th May",
+ "whole_day": false,
+ "start": "2021-05-11T18:30:00+02:00",
+ "end": "2021-05-11T22:00:00+02:00"
+ },
+ "location": {
+ "short": "Zurich, Zurich, Switzerland",
+ "detailed": "beim Studi-Café bQm (ETH), Zürich, Hochstrasse, Fluntern, Zurich, Zurich, Switzerland",
+ "coords": [
+ 8.546741,
+ 47.376035
+ ],
+ "venue": "beim Studi-Café bQm (ETH), Zürich"
+ }
+ },
+ {
+ "name": "Lüneburger Mappertreffen (online)",
+ "url": "https://osmcal.org/event/389/",
+ "date": {
+ "human": "18th May 20:30",
+ "human_short": "18th May",
+ "whole_day": false,
+ "start": "2021-05-18T20:30:00+02:00"
+ },
+ "location": {
+ "short": "Lüneburg, Lower Saxony, Germany",
+ "detailed": "9, Friedenstraße, Rotes Feld, Lower Saxony, Germany",
+ "coords": [
+ 10.412018,
+ 53.245632
+ ]
+ }
+ },
+ {
+ "name": "139. Treffen des OSM-Stammtisches Bonn",
+ "url": "https://osmcal.org/event/397/",
+ "date": {
+ "human": "18th May 21:00 (Europe/Berlin)",
+ "human_short": "18th May",
+ "whole_day": false,
+ "start": "2021-05-18T21:00:00+02:00"
+ }
+ },
+ {
+ "name": "Lüneburger Mappertreffen (online)",
+ "url": "https://osmcal.org/event/391/",
+ "date": {
+ "human": "15th June 20:30",
+ "human_short": "15th June",
+ "whole_day": false,
+ "start": "2021-06-15T20:30:00+02:00"
+ },
+ "location": {
+ "short": "Lüneburg, Lower Saxony, Germany",
+ "detailed": "9, Friedenstraße, Rotes Feld, Lower Saxony, Germany",
+ "coords": [
+ 10.412018,
+ 53.245632
+ ]
+ }
+ },
+ {
+ "name": "140. Treffen des OSM-Stammtisches Bonn",
+ "url": "https://osmcal.org/event/398/",
+ "date": {
+ "human": "15th June 21:00 (Europe/Berlin)",
+ "human_short": "15th June",
+ "whole_day": false,
+ "start": "2021-06-15T21:00:00+02:00"
+ }
+ },
+ {
+ "name": "OSM-Treffen Zürich",
+ "url": "https://osmcal.org/event/414/",
+ "date": {
+ "human": "11th August 18:30 – 22:00",
+ "human_short": "11th August",
+ "whole_day": false,
+ "start": "2021-08-11T18:30:00+02:00",
+ "end": "2021-08-11T22:00:00+02:00"
+ },
+ "location": {
+ "short": "Zurich, Zurich, Switzerland",
+ "detailed": "beim Studi-Café bQm (ETH), Zürich, Hochstrasse, Fluntern, Zurich, Zurich, Switzerland",
+ "coords": [
+ 8.546741,
+ 47.376035
+ ],
+ "venue": "beim Studi-Café bQm (ETH), Zürich"
+ }
+ },
+ {
+ "name": "OSM-Treffen Zürich",
+ "url": "https://osmcal.org/event/415/",
+ "date": {
+ "human": "11th October 18:30 – 22:00",
+ "human_short": "11th October",
+ "whole_day": false,
+ "start": "2021-10-11T18:30:00+02:00",
+ "end": "2021-10-11T22:00:00+02:00"
+ },
+ "location": {
+ "short": "Zurich, Zurich, Switzerland",
+ "detailed": "beim Studi-Café bQm (ETH), Zürich, Hochstrasse, Fluntern, Zurich, Zurich, Switzerland",
+ "coords": [
+ 8.546741,
+ 47.376035
+ ],
+ "venue": "beim Studi-Café bQm (ETH), Zürich"
+ }
+ },
+ {
+ "name": "OSM-Treffen Zürich",
+ "url": "https://osmcal.org/event/416/",
+ "date": {
+ "human": "11th November 18:30 – 22:00",
+ "human_short": "11th November",
+ "whole_day": false,
+ "start": "2021-11-11T18:30:00+01:00",
+ "end": "2021-11-11T22:00:00+01:00"
+ },
+ "location": {
+ "short": "Zurich, Zurich, Switzerland",
+ "detailed": "beim Studi-Café bQm (ETH), Zürich, Hochstrasse, Fluntern, Zurich, Zurich, Switzerland",
+ "coords": [
+ 8.546741,
+ 47.376035
+ ],
+ "venue": "beim Studi-Café bQm (ETH), Zürich"
+ }
+ },
+ {
+ "name": "State of the Map Africa 2021",
+ "url": "https://osmcal.org/event/392/",
+ "date": {
+ "human": "19th November – 21st November",
+ "human_short": "19th–21st November",
+ "whole_day": true,
+ "start": "2021-11-19T12:00:00+03:00",
+ "end": "2021-11-21T12:00:00+03:00"
+ },
+ "location": {
+ "short": "Nairobi, Nairobi, Kenya",
+ "detailed": "Nairobi, Kenya, Uhuru Highway, Nairobi West, Nairobi, Nairobi, Kenya",
+ "coords": [
+ 36.826061,
+ -1.303169
+ ],
+ "venue": "Nairobi, Kenya"
+ }
+ }
+]
\ No newline at end of file
diff --git a/utils.ts b/utils.ts
index c4db8c9..696fea7 100644
--- a/utils.ts
+++ b/utils.ts
@@ -12,7 +12,7 @@ class utils {
client;
makeQuery = () => {
this.createEventQueries = `INSERT INTO events(title, description, organizer_actor_id,inserted_at,updated_at, uuid, url, status, category, options,participants_stats, begins_on, ends_on) VALUES ${this.agendadulibre.queryToAdd} ${this.osmcal.queryToAdd};`;
- this.writeFile("event_creation_query.psql", this.createEventQueries);
+ this.writeFile("event_creation_query.psql", this.createEventQueries, "psql");
}
runCreationQuery = async () => {
if (this.createEventQueries) {
@@ -31,6 +31,7 @@ class utils {
};
createEventQueries = "";
counterOfEventsToAdd = 0;
+ localMobilizonEventsByTitle=[];
convertRssDate(rssDate) {
@@ -49,12 +50,15 @@ class utils {
console.log("converted", converted);
}
- postgresEventsExisting = [];
- writeFile = (fileName, data) => {
+ writeFile = (fileName, data, formatData) => {
+ let dataToSave = data;
+ if (formatData == 'json') {
+ dataToSave = JSON.stringify(data, null, 4)
+ }
// write file to disk
fs.writeFile(
`./sources_examples/${fileName}`,
- JSON.stringify(data),
+ dataToSave,
"utf8",
(err) => {
if (err) {
@@ -72,7 +76,31 @@ class utils {
},
addQuery: (event) => {
- this.agendadulibre.counterOfEventsToAdd++;
+ if (this.osmcal.queryToAdd) {
+ this.osmcal.queryToAdd += ` , `;
+ }
+ let title = "'" + htmlEscape(event.name+ ' '+ event.location.short) + "'";
+ let content = "'" + htmlEscape(event.date.human+ '
'+ event.location.detailed + '
' + event.location.venue + '
' +event.url + '
' + event.coords[0]+','+event.coords[1]) + "'";
+ console.log(' ')
+ console.log(' title', title)
+ console.log(' content', content)
+
+ let uuid = uuidv4();
+ let uuidString = "'" + uuid + "'";
+ let eventUrl =
+ "'" + parserConfig.mobilizon_public_url + "/events/" + uuid + "'";
+ let begins_on = "'" + this.convertRssDate(event.date.start) + "'";
+ let ends_on = "'" + this.convertRssDate(event.date.end) + "'";
+ let baseOptions =
+ '{"offers": [], "program": null, "attendees": [], "show_end_time": true, "show_start_time": true, "comment_moderation": "allow_all", "anonymous_participation": true, "participation_condition": [], "show_participation_price": false, "maximum_attendee_capacity": 0, "remaining_attendee_capacity": 0, "hide_organizer_when_group_event": false, "show_remaining_attendee_capacity": false}';
+ let baseStats =
+ '{"creator": 1, "rejected": 0, "moderator": 0, "participant": 0, "not_approved": 0, "administrator": 0, "not_confirmed": 0}';
+ // begins_on , ends_on expecting date format like this: "2020-12-17 23:00:00"
+
+ this.osmcal.queryToAdd += `( ${title}, ${content}, ${parserConfig.feeder_mobilizon_user_id}, 'now()','now()', ${uuidString}, ${eventUrl}, 'confirmed' , 'meeting', ${baseOptions}, ${baseStats}, ${begins_on} , ${ends_on} )`;
+
+
+ this.osmcal.counterOfEventsToAdd++;
this.counterOfEventsToAdd++;
},
@@ -80,21 +108,29 @@ class utils {
agendadulibre = {
queryToAdd: "",
counterOfEventsToAdd: 0,
- doesEventExists: (event) => {
+ doesEventExists: (rssEvent) => {
+ const eventAlreadyExists =
+ -1 !== this.localMobilizonEventsByTitle.indexOf(rssEvent.title);
+ if (!eventAlreadyExists) {
+ if (parserConfig.debug) {
+ console.log('ajouter l event ', htmlEscape(rssEvent.title));
+ }
+ this.agendadulibre.addQuery(rssEvent);
+ }
},
- addQuery: (rssEvent) => {
+ addQuery: (event) => {
if (this.agendadulibre.queryToAdd) {
this.agendadulibre.queryToAdd += ` , `;
}
- let title = "'" + htmlEscape(rssEvent.title) + "'";
- let content = "'" + htmlEscape(rssEvent.content) + "'";
+ let title = "'" + htmlEscape(event.title) + "'";
+ let content = "'" + htmlEscape(event.content) + "'";
let uuid = uuidv4();
let uuidString = "'" + uuid + "'";
let eventUrl =
"'" + parserConfig.mobilizon_public_url + "/events/" + uuid + "'";
- let begins_on = "'" + this.convertRssDate(rssEvent.date) + "'";
- let ends_on = "'" + this.convertRssDate(rssEvent.date) + "'";
+ let begins_on = "'" + this.convertRssDate(event.date) + "'";
+ let ends_on = "'" + this.convertRssDate(event.date) + "'";
let baseOptions =
'{"offers": [], "program": null, "attendees": [], "show_end_time": true, "show_start_time": true, "comment_moderation": "allow_all", "anonymous_participation": true, "participation_condition": [], "show_participation_price": false, "maximum_attendee_capacity": 0, "remaining_attendee_capacity": 0, "hide_organizer_when_group_event": false, "show_remaining_attendee_capacity": false}';
let baseStats =