Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixing data, adding the rest of meetup.com
  • Loading branch information
mikeal committed Nov 25, 2015
commit 0839d95b1f07d49b914d60c84201f3c2b82a4ab6
36 changes: 35 additions & 1 deletion events/pull-meetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ var countryMap =
, NG: 'Africa'
, KE: 'Africa'
, ZA: 'Africa'
, MA: 'Africa'
, EG: 'Africa'
, IL: 'Asia'
, TH: 'Asia'
, KR: 'Asia'
Expand All @@ -27,6 +29,20 @@ var countryMap =
, PH: 'Asia'
, IN: 'Asia'
, HK: 'Asia'
, CN: 'Asia'
, VN: 'Asia'
, TW: 'Asia'
, LK: 'Asia'
, NP: 'Asia'
, JP: 'Asia'
, AE: 'Asia'
, BD: 'Asia'
, LT: 'Europe'
, RS: 'Europe'
, HR: 'Europe'
, CZ: 'Europe'
, PT: 'Europe'
, TR: 'Europe'
, GR: 'Europe'
, DE: 'Europe'
, RO: 'Europe'
Expand All @@ -49,14 +65,25 @@ var countryMap =
, FR: 'Europe'
, PL: 'Europe'
, SK: 'Europe'
, IT: 'Europe'
, SI: 'Europe'
, LU: 'Europe'
, BY: 'Europe'
, ME: 'Europe'
, CA: 'North America'
, US: 'North America'
, DO: 'Latin America'
, AR: 'Latin America'
, PE: 'Latin America'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CO: 'Latin America'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only have all of the ones in here that we need for the meetups currently coming out of meetup.com, I wonder why there isn't one showing up for Colombia.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like they need to be tagged with the topic?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now they need to be tagged with "nodejs" and they need to have "node" in the name, but we may remove that second part later.

, MX: 'Latin America'
, BR: 'Latin America'
, VE: 'Latin America'
, CL: 'Latin America'
, CO: 'Latin America'
, UY: 'Latin America'
, PA: 'Latin America'
, GT: 'Latin America'
, EC: 'Latin America'
, AU: 'South Pacific'
, SG: 'South Pacific'
, NZ: 'South Pacific'
Expand All @@ -70,8 +97,10 @@ function clean (event) {
}

function finish (events) {
// return console.log(JSON.stringify(events))
events.forEach(function(event) {
if (!countryMap[event.country]) {
console.log(event)
throw new Error("Do not have map for "+event.country)
}
var region = yml.getRegion(countryMap[event.country])
Expand All @@ -88,7 +117,12 @@ function _go (u) {
request(u, function (e, resp, body) {
var results = body.results
results.forEach(function (result) {
if (result.name.toLowerCase().indexOf('node') !== -1) allresults.push(result)
var title = result.name.toLowerCase()
if (title.indexOf('nodeschool') !== -1) return
if (title.indexOf('mongodb') !== -1 && title.indexOf('node') === -1) return
if (title.indexOf('find a tech job') !== -1 && title.indexOf('node') === -1) return
// if (title.indexOf('node') !== -1) return allresults.push(result)
allresults.push(result)
})
if (body.meta.next) {
_go(body.meta.next)
Expand Down
13 changes: 13 additions & 0 deletions events/yaml-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,16 @@ exports.save = function () {
var str = ['---', yaml.dump(store), '---'].join('\n')
fs.writeFileSync(p, str)
}

function rebalance () {
store.regions = store.regions.slice(0,6)
exports.save()
}

function clearMeetups () {
store.regions.forEach(function (reg) {
delete reg.meetups
})
exports.save()
}
// clearMeetups()
Loading