|
|
|
@ -1,4 +1,4 @@ |
|
|
|
const { hasPath, pathOr, props } = require('ramda'); |
|
|
|
const { hasPath, pathOr, props, uniqBy, eqBy, prop, union } = require('ramda'); |
|
|
|
const parseArgs = require('minimist'); |
|
|
|
const parseArgs = require('minimist'); |
|
|
|
const process = require('process'); |
|
|
|
const process = require('process'); |
|
|
|
|
|
|
|
|
|
|
|
@ -139,14 +139,17 @@ const has_upcoming_events = (body) => |
|
|
|
const has_past_events = (body) => |
|
|
|
const has_past_events = (body) => |
|
|
|
body.includes('past events') && !body.includes('not have any past events'); |
|
|
|
body.includes('past events') && !body.includes('not have any past events'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const merge_events = (a, b) => uniqBy(eqBy(prop('event_id')))(union(a, b)); |
|
|
|
|
|
|
|
|
|
|
|
module.exports = { |
|
|
|
module.exports = { |
|
|
|
has_past_events, |
|
|
|
|
|
|
|
get_body_inner_text, |
|
|
|
get_body_inner_text, |
|
|
|
has_upcoming_events, |
|
|
|
|
|
|
|
get_upcoming_events_from_page, |
|
|
|
|
|
|
|
get_past_events_from_page, |
|
|
|
get_past_events_from_page, |
|
|
|
|
|
|
|
get_upcoming_events_from_page, |
|
|
|
|
|
|
|
has_past_events, |
|
|
|
|
|
|
|
has_upcoming_events, |
|
|
|
map_event, |
|
|
|
map_event, |
|
|
|
merge_edges, |
|
|
|
merge_edges, |
|
|
|
|
|
|
|
merge_events, |
|
|
|
parse_args, |
|
|
|
parse_args, |
|
|
|
read_previous_events, |
|
|
|
read_previous_events, |
|
|
|
}; |
|
|
|
}; |
|
|
|
|