webuild-events
Get a list of free developer-related events in your city from facebook, meetup.com, eventbrite, ics url and manual entries.
install
npm i webuild-events
usage
-
we will create the following folder structure:
. ├── .env ├── config │ ├── blacklistEvents.json │ ├── facebookGroups.json │ ├── icsGroups.json │ └── whitelistEvents.json ├── config.js ├── node_modules │ ├── dotenv │ └── webuild-events └── index.js
-
create a
.env
file to store all the environment variables:NODE_ENV=developmentLOCATION=Singapore # name of cityWEBUILD_API_SECRET=secret # any random string - used as a password when remotely refreshing the feedsMEETUP_API_KEY=secret # generate it from https://secure.meetup.com/meetup_api/key/ to get meetup.com eventsEVENTBRITE_TOKEN=secret # generate it from http://developer.eventbrite.com/ to get eventbrite events# Create an Auth0 https://auth0.com/ account and a Facebook app and link them (https://docs.auth0.com/facebook-clientid). Configure the `WEBUILD_AUTH0_CLIENT_*` environment variables.`WEBUILD_AUTH0_CLIENT_ID=secretWEBUILD_AUTH0_CLIENT_SECRET=secret -
create a
json
fileconfig/facebookGroups.json
to list all the Facebook pages / groups you want to list the upcoming events:"name": "Adobe InDesign Singapore User Group" // name of the facebook page / group"id": "116531348396769" // id of the facebook page / groups: https://lookup-id.com/... -
create 2
json
filesconfig/blacklistEvents.json
andconfig/whitelistEvents.json
to add / remove events manually:"id": "999999999""name": "This is a sample event on how to fill up this file. For whitelistEvents.json: all fields are required. For blacklistEvents.json: id, formatted_time and url are required. Time fields are filled in as an example for time format DD MMM YYYY, ddd, h:mm a.""description": "sample description""location": "sample location""url": "http://www.sample.com/event""group_name": "sample group name""group_url": "http://www.group.com""formatted_time": "14 Nov 2014, Fri, 6:00 pm""start_time": "2014-11-14T10:00:00.000Z""end_time": "2014-11-16T09:00:00.000Z"... -
create a
json
fileconfig/icsGroups.json
to list all urls ofics
formatted events:"group_name": "KopiJS""group_url": "http://kopi.io/""ics_url": "https://www.google.com/calendar/ical/dnhunu42fotmefouusg4j8ip0k%40group.calendar.google.com/public/basic.ics"... -
create a file
config.js
with the following contents:var city = 'Singapore'; // name of your city E.g. 'Sydney'var country = 'Singapore'; // name of your country E.g. 'Australia'var locationSymbol = 'SG'; // country code: https://en.wikipedia.org/wiki/ISO_3166-1#Officially_assigned_code_elements{var requiredData;tryrequiredData = ;catcherequiredData = ;return requiredData;}var facebookGroups = ;var blacklistEvents =var icsGroups = ;var whitelistEvents = ;var duplicateWords = 0words; // see sample in examples/duplicateWords.jsonmoduleexports =location: citycity: citycountry: countrysymbol: locationSymbolapi_version: 'v1'displayTimeformat: 'DD MMM YYYY, ddd, h:mm a' // format date: http://momentjs.com/docs/#/displaying/dateFormat: 'YYYY-MM-DD HH:mm Z' // format time: http://momentjs.com/docs/#/displaying/timezone: '+0800' // timezone UTC offset: https://en.wikipedia.org/wiki/List_of_tz_database_time_zonestimezoneInfo: 'Asia/Singapore' // timezone name: https://en.wikipedia.org/wiki/List_of_tz_database_time_zonesdebug: processenvNODE_ENV === 'development'ignoreWordsInDuplicateEvents: duplicateWords // array of words to ignore in detecting duplicate eventsauth0:domain: 'webuildsg.auth0.com'clientId: processenvWEBUILD_AUTH0_CLIENT_IDclientSecret: processenvWEBUILD_AUTH0_CLIENT_SECRETmeetupParams:key: processenvMEETUP_API_KEYcountry: locationSymbolstate: locationSymbolcity: citycategory_id: 34 // Tech categorypage: 500fields: 'next_event'blacklistGroups:blacklistWords:eventbriteParams:token: processenvEVENTBRITE_TOKENurl: 'https://www.eventbriteapi.com/v3/events/search'categories:'102''119'blacklistOrganiserId:; -
create
index.js
:;var config = ;var events = events;; -
install the relevant dependencies:
npm i webuild-eventnpm i dotenv -
run the file with
node index.js
contribute
Please see CONTRIBUTING.md
for details.
versioning
Following the Semantic Versioning guidelines, run the grunt bump
, grunt bump:minor
or grunt bump:major
commands to bump the version accordingly.
license
webuild-events is released under the MIT License.