1 | #!/usr/bin/env node
|
2 |
|
3 | var open = require('open'),
|
4 | JnnData = require('./lib'),
|
5 | program = require('commander'),
|
6 | path = require('path'),
|
7 | pkg = require( path.join(__dirname, 'package.json') ),
|
8 | nextMeeting;
|
9 |
|
10 | program
|
11 | .version(pkg.version)
|
12 | .option('-d, --details', 'More details about the meetup')
|
13 | .option('-m, --map', 'Google Map to Meetup location')
|
14 | .option('-l, --link', 'Open the home page url')
|
15 | .option('-a, --address', 'Show the venue address')
|
16 | .parse(process.argv);
|
17 |
|
18 | JnnData.getNextMeeting(function (nextMeeting) {
|
19 | var mapurl = 'https://www.google.com/maps/place/' + nextMeeting.meeting.venue.name + '/@' + nextMeeting.meeting.venue.lat + ',' + nextMeeting.meeting.venue.lon + 'z18';
|
20 | var meetingText = 'The next JaxNode meeting will be on ' + nextMeeting.meeting.time + ' at ' + nextMeeting.meeting.venue.name;
|
21 | console.log('@@O==@@@%==#@@&==#@@==&@@@@@@@@@@@@@@@@@!?@@@@@@@@');
|
22 | console.log('@@O==@@@===*@@@o==@$=o@@@@@@@@@@@@@@@@@@e ?@@@@@@@');
|
23 | console.log('@@O==@@@====@@@@==$==@@@@@@@@@@@@@@@@@@@e ?@@@@@@@');
|
24 | console.log('@@O==@@%=O==&@@@$===%@@@@o@@@@@@$@@@@@@%e ?@@@?@@@');
|
25 | console.log('@@O==@@==@i=*@@@@===@@@! +@@O===!@@O ?@O ;@');
|
26 | console.log('@@O==@@==@$==@@@$===%@@ = #@=====#@ _ ?@ : ?');
|
27 | console.log('@@O==@%======&@@==?==@@ @+ #@=====#@ @e ?@ =e!@');
|
28 | console.log('O#i==@==$$$==e@*=$@==o@ @+ #@=====#@ ` ?@ #@@');
|
29 | console.log('o===O@==@@@%==&==@@#==&=@@@?&@@o==#@@@. ?@@@_ #@');
|
30 | console.log('#?%@@&#&@@@@####&@@@###@@@@@@@@@@@@@@@@&@@@@@@@@@@');
|
31 | console.log();
|
32 | console.log(meetingText);
|
33 | if (program.details) {
|
34 | console.log(nextMeeting.meeting.name + ':' + nextMeeting.meeting.description);
|
35 | }
|
36 | if (program.map) {
|
37 | open(mapurl);
|
38 | }
|
39 | if (program.link) {
|
40 | open('http://www.jaxnode.com');
|
41 | }
|
42 | if (program.address) {
|
43 | console.log(nextMeeting.meeting.venue.name);
|
44 | console.log(nextMeeting.meeting.venue.address_1);
|
45 | console.log(nextMeeting.meeting.venue.city + ', ' + nextMeeting.meeting.venue.state);
|
46 | }
|
47 | });
|
48 |
|