Skip to content

Commit 3958843

Browse files
committed
Upgrade all dependencies; reorg code
Also added an example/test log and audio from JSON-LD land https://github.com/json-ld/minutes/tree/master/2011-07-04 The upgrades address several dependency vulnerabilities. The `wporg` dependency was replaced by a much farther along `wordpress` dependency which has a matching API. Also included output of help text on error (when no directory is stated). Oh, and a README.
1 parent 7b0bb10 commit 3958843

File tree

13 files changed

+621
-127
lines changed

13 files changed

+621
-127
lines changed

README.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Scrawl.js
2+
3+
Handy scribe tool for W3C group scribes.
4+
5+
## Installation
6+
7+
Clone the repo locally, and in this repositories working directory run the
8+
following commands:
9+
10+
```sh
11+
$ npm i
12+
$ npm start
13+
```
14+
15+
## Usage
16+
17+
Scrawl works on directories structured like:
18+
```
19+
2011-07-04/
20+
./irc.log
21+
./audio.ogg
22+
```
23+
24+
* The directory name MUST be in ISO 8601 format.
25+
* The log file MUST be named `irc.log`.
26+
* The (optional) audio file MUST be named `audio.ogg`.
27+
28+
The output files will be added to the same directory for simpler hosting of
29+
all the things.
30+
31+
Now, we need to setup the nicknames of all the people in the group.
32+
So, copy `people.json.example` to `people.json` and fill in names, homepages,
33+
and nicknames as needed.
34+
35+
Then...
36+
```sh
37+
$ npm start -- -d test/fixtures/2011-07-04/
38+
```
39+
(change the `test/fixture/2011-07-04/` to point to your directory)
40+
41+
If that went as planned, there will be an `index.html` file in that directory!
42+
43+
## License
44+
45+
BSD-3-clause

index.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ var email = require('emailjs');
44
var fs = require('fs');
55
var path = require('path');
66
var program = require('commander');
7-
var scrawl = require('./scrawl');
7+
var scrawl = require('./www/scrawl');
88
var Twitter = require('twitter');
9-
var wp = require('wporg');
9+
var wp = require('wordpress');
1010

1111
program
12-
.version('0.3.0')
12+
.version('0.4.0')
1313
.option('-d, --directory <directory>', 'The directory to process.')
1414
.option('-m, --html', 'If set, write the minutes to an index.html file')
1515
.option('-w, --wordpress', 'If set, publish the minutes to the blog')
@@ -21,7 +21,8 @@ program
2121
.parse(process.argv);
2222

2323
if(!program.directory) {
24-
console.log('Error: You must specify a directory to process');
24+
console.error('Error: You must specify a directory to process');
25+
program.outputHelp();
2526
process.exit(1);
2627
}
2728

@@ -31,9 +32,9 @@ var logFile = path.resolve(path.join(program.directory, 'irc.log'));
3132
var audioFile = path.resolve(path.join(program.directory, 'audio.ogg'));
3233
var indexFile = path.resolve(path.join(program.directory, 'index.html'));
3334
var htmlHeader = fs.readFileSync(
34-
__dirname + '/header.html', {encoding: 'utf8'});
35+
__dirname + '/www/_partials/header.html', {encoding: 'utf8'});
3536
var htmlFooter = fs.readFileSync(
36-
__dirname + '/footer.html', {encoding: 'utf8'});
37+
__dirname + '/www/_partials/footer.html', {encoding: 'utf8'});
3738
var peopleJson = fs.readFileSync(
3839
__dirname + '/people.json', {encoding: 'utf8'});
3940
var gLogData = '';

0 commit comments

Comments
 (0)