Skip to content

Commit f4ed147

Browse files
committed
Remove antique Twitter integration.
Unused and likely no longer works with X.
1 parent a6adb43 commit f4ed147

File tree

6 files changed

+4
-114
lines changed

6 files changed

+4
-114
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,13 @@ There are several more options available.
7575
-d, --directory <directory> The directory to process.
7676
-m, --html If set, write the minutes to an index.html file
7777
-e, --email If set, publish the minutes to the mailing list
78-
-t, --twitter If set, publish the minutes to Twitter
7978
-g, --google If set, publish the minutes to G+
8079
-i, --index Build meeting index
8180
-q, --quiet Don't print status information to the console
8281
8382
```
8483
85-
The Google and Twitter related switches also require some custom
84+
The Google related switch also requires some custom
8685
environment variables to be setup. For examples of those, see the
8786
[publish.sh.example](publish.sh.example).
8887

config.yaml.example

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,3 @@ gplus: # required for -g
3939
{{{minutes_base_url}}}{{gDate}}/
4040

4141
#w3c #json-ld
42-
twitter: # required for -t
43-
# Mustache template - vars: group, message, gDate, minutes_base_url
44-
body: |-
45-
JSON-LD CG discusses {{message}}:
46-
{{{minutes_base_url}}}{{gDate}}/ #w3c #json-ld

index.js

Lines changed: 1 addition & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ var path = require('path');
77
var program = require('commander');
88
const Mustache = require('mustache');
99
var scrawl = require('./www/scrawl');
10-
var Twitter = require('twitter');
1110
const yaml = require('js-yaml');
1211

1312
program
@@ -18,7 +17,6 @@ program
1817
// the do something switches
1918
.option('-m, --html', 'If set, write the minutes to an index.html file')
2019
.option('-e, --email', 'If set, publish the minutes to the mailing list')
21-
.option('-t, --twitter', 'If set, publish the minutes to Twitter')
2220
.option('-g, --google', 'If set, publish the minutes to G+')
2321
.option('-i, --index', 'Build meeting index')
2422
// the tweak the cli switch
@@ -43,8 +41,7 @@ if(!program.directory) {
4341
process.exit(1);
4442
}
4543

46-
if (!program.html && !program.email && !program.twitter
47-
&& !program.google && !program.index) {
44+
if (!program.html && !program.email && !program.google && !program.index) {
4845
console.error('Error: Nothing to do...');
4946
program.outputHelp();
5047
process.exit(1);
@@ -396,55 +393,6 @@ Full text of the discussion follows for archival purposes.
396393
} else {
397394
callback();
398395
}
399-
}, function(callback) {
400-
// publish the minutes to Twitter
401-
if(program.twitter) {
402-
if(!process.env.SCRAWL_TWITTER_CONSUMER_KEY ||
403-
!process.env.SCRAWL_TWITTER_SECRET ||
404-
!process.env.SCRAWL_TWITTER_TOKEN_KEY ||
405-
!process.env.SCRAWL_TWITTER_TOKEN_SECRET) {
406-
console.log('scrawl: You must set the following environment variables ' +
407-
'for twitter\nposting to work: SCRAWL_TWITTER_CONSUMER_KEY, ' +
408-
'SCRAWL_TWITTER_SECRET,\nSCRAWL_TWITTER_TOKEN_KEY, ' +
409-
'SCRAWL_TWITTER_TOKEN_SECRET.');
410-
return callback();
411-
}
412-
// create the twitter client
413-
var twitter = new Twitter({
414-
consumer_key: process.env.SCRAWL_TWITTER_CONSUMER_KEY,
415-
consumer_secret: process.env.SCRAWL_TWITTER_SECRET,
416-
access_token_key: process.env.SCRAWL_TWITTER_TOKEN_KEY,
417-
access_token_secret: process.env.SCRAWL_TWITTER_TOKEN_SECRET
418-
});
419-
420-
// get the tweet text
421-
console.log('scrawl: Creating new tweet.');
422-
var prompt = require('prompt');
423-
prompt.start();
424-
prompt.get({
425-
properties: {
426-
message: {
427-
description: 'Enter the tweet contents (what was discussed)',
428-
pattern: /^.{4,100}$/,
429-
message: 'The message must be between 4-100 characters.'
430-
}
431-
}
432-
}, function(err, results) {
433-
// construct the tweet
434-
var tweet = Mustache.render(TWITTER_BODY,
435-
{group: scrawl.group,
436-
message: results.message, gDate,
437-
minutes_base_url: scrawl.minutes_base_url});
438-
439-
// send the tweet
440-
twitter.updateStatus(tweet, function(data) {
441-
console.log('scrawl: Tweet sent:', data.text);
442-
callback();
443-
});
444-
});
445-
} else {
446-
callback();
447-
}
448396
}], function(err) {
449397
// check to ensure there were no errors
450398
if(err) {

package-lock.json

Lines changed: 1 addition & 48 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"mime": "^2.3.1",
2828
"moment": "~2.19.3",
2929
"mustache": "^2.3.0",
30-
"prompt": "^1.0.0",
31-
"twitter": "~0.2.5"
30+
"prompt": "^1.0.0"
3231
}
3332
}

publishing.cfg.example

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,5 @@ export SCRAWL_EMAIL_SERVER=
1212
# Optional port and SSL. Default SSL is false
1313
# export SCRAWL_EMAIL_PORT=
1414
# export SCRAWL_EMAIL_SSL=
15-
export SCRAWL_TWITTER_CONSUMER_KEY=
16-
export SCRAWL_TWITTER_SECRET=
17-
export SCRAWL_TWITTER_TOKEN_KEY=
18-
export SCRAWL_TWITTER_TOKEN_SECRET=
1915
export SCRAWL_LINKEDIN_CLIENT_ID=
2016
export SCRAWL_LINKEDIN_CLIENT_SECRET=

0 commit comments

Comments
 (0)