Home

Awesome

Generate Minutes in your Browser!

RSSAgent IRC Logs Into Minutes in Markdown

This script takes an IRC output as produced by the RRSAgent on W3C’s IRC, and converts it into minutes in markdown. Most of the features of David Booth's script are retained. See also a separate feature summary for an easier reference. The IRC log can either be provided as an input to the script on the command line, or can be fetched directly from the W3C site. The generated minutes are either stored locally or are committed to a GitHub repository directly.

The reason of writing this script is that the current approach of producing HTML minutes on the W3C date space has become difficult to handle these days when Working Groups typically work on GitHub and WG members do not have CVS access to W3C. The current process relies heavily on the staff contact on the slightest possible change of the minutes. In a GitHub working environment the “obvious” approach is to produce the minutes in markdown and push that onto the group’s repository; if so, the minutes can be read and, if necessary, updated, changed, improved, etc, by other Group members. As an extra bonus, if the group’s Web site is also on github, the minutes can become integral part of that Web Site (including the look-and-feel).

Usage

Browser

The BrowserView/ directory contains an HTML file which provides a basic UI for loading and editing IRC logs and processing them into Markdown (see the service on-line). See the Installation section below for more information.

Command Line

The script runs on top of node.js. The “entry point” is the main.js file, which accepts the following command line arguments:

scribejs [options] [filename]
[--date|-d] date:    Date of the meeting in ISO (i.e., YYYY-MM-DD) format.
                     Default: today.
[--group|-g] group:  Name of the IRC channel used by the group.
[--config|-c] cfile: JSON configuration file (see below). Command line arguments
                     have a higher priority.
[--nick|-n] nfile:   JSON nickname mapping URL or filename (see below).
[--output|-o] ofile: Output file name. See below on how the final output is chosen.
[--final|-f]:        The minutes are final, i.e., they will not be labeled as "DRAFT".
[--auto|-a]:         Whether the draft label is to be generated automatically into
                     the minutes via a separate script.
[--repo|-r]:         Whether the output should be stored in a github repository.
                     Default: false.
[--pandoc|-p]:       Whether the output is meant to be converted further by pandoc.
                     Default: false.
[--jekyll|-j]:       Whether the output should be adapted to a Github+Jekyll
                     combination. Value can be "none", "md", or "kd"; (see below
                     for further details.)
                     Default: "md".
[--irc|-i] client:   Whether the input is of the log format of a particular IRC client.
                     Value can be "textual", "irccloud", or "lounge, for the Textual,
                     IRCCloud, or The Lounge clients, respectively. It can also be
                     "rdf" to consume the RRSAgent RDF/XML dump directly.
                     Other values are (currently) ignored.
                     Default: undefined, meaning that the log provided by the W3C
                     RRSAgent is used.

Some notes:

Configuration files

While some of the values can be set on a command line, most of the configuration values are set in a JSON configuration file. The file name can be provided on the command line (see above). Otherwise, a user-level configuration file ~/.scribejs.json will be used, if present. A separate, ~/.credentials.json can also be used (and shared with other applications), typically used to store the user’s GitHub and SMTP credentials. The detailed specification of the configuration file is documented separately

The final configuration is a combination of the command line arguments, the (optional) configuration file provided through the command line, and the user-level configuration file (if it exists), in decreasing priority.

A typical usage of the configuration files is:

There is a JSON schema to validate the configuration file. The validation is also done run-time; the script warns (on stderr) if the configuration file is invalid, and a minimal default configuration is used instead.

Note that this repository contains the current configuration files for active WG-s; external tools, local scripts, etc., are welcome to use them. Using these pre-set configuration files may make it easier to deploy the script.

Choice of the output

The script’s choice of where resulting file is stored is as follows:

This means that the simplest possible usage of the script boils down to:

scribejs IRC-log-file

which takes the log from the local IRC-log-file and sends the markdown minutes to standard output.

Nickname mapping

This JSON file is used to provide mapping among IRC nicknames and real names. The file itself is an array of objects; each object can use the following keys (use only those with a meaningful value):

There is a JSON schema to validate the nickname mapping file. The validation is also done run-time; the script warns (on stderr) if the nickname mapping file is invalid, and an empty mapping is used instead.

Pandoc

The generated minutes may be converted into some other format using pandoc. If so, a special title header is added, to be used by pandoc when generating HTML or LaTeX.

Jekyll option

The generated minutes may be part of a page hosted by GitHub via the Github+Jekyll combination. The possible options, and their meaning, are as follows.

Generated class names

If the generated minutes are in kramdown format then a number of sections/paragraphs/etc. get specific class names. These can be used for CSS styling when the minutes are generated by Jekyll in HTML. These are:

Section contentclass name
resolutionresolution
proposed resolutionproposed_resolution
summarysummary
actionaction
Draft notice at the top of the minutesdraft_notice
H1 element at the top of the minutes (if the --auto flag is used)draft_notice_needed

Schema.org data in JSON-LD

The generated minutes may contain schema.org metadata like URL, dates, participants, scribes, etc., encoded in JSON-LD as part of the page header. The metadata also includes the list of resolutions and actions, when applicable. Client-side scripts can make use of that data.

At the moment, a companion post-processing script performs the following post-processing actions:

Installation

Setup the project locally and install Node.js dependencies:

git clone https://github.com/w3c/scribejs.git
cd scribejs
npm install

The code itself is in TypeScript. The sources are in the src directory in the repository. If you do any change, run

tsc

to generate the javascript files. All instructions below refer to the generated javascript versions.

Follow specific instructions based on your needs/interests below.

Browser

npm run build
npm run serve

You should be able to load the UX via http://localhost:8080 (or whichever port was chosen by http-server). Of course, if you run a server on your machine already, that can be used as well, in which case the second command is irrelevant.

Command Line

Standard Node.js practices have been followed.

cp config.json.sample ~/.scribejs.json
$EDITOR ~/.scribejs.json                  # Fill in details: your GH token, etc

To run scribejs (in its own directory):

node main.js

Optionally, you can also run

ts-node src/main.ts

which will compile the TypeScript source into Javascript on the fly and run the results. (You will have to install ts-node separately, though.)

You can install it globally with:

sudo npm i -g .

which will create a symbolic link to main.js in the user's search path with the name scribejs, so you should be able to invoke it this way, too:

scribejs

The schemas directory also includes two JSON schemas files for the configuration and the nickname json files, respectively. These can be used with a suitable schema processor (e.g., the CLI for ajv) to check the validity of the configuration files. This schemas are used by the running code, too, to check configuration and nickname files.

Testing

npm test

If you have Growl setup for your platform, you can use it like so:

npm test -- --growl

Linting

We like clean code, so we've introduced tools to help our shared consistency. You can use eslint in the context of this project by running:

npm run lint

It will be run using the configuration settings found in .eslintrc.js.


Maintainers: Ivan Herman and BigBlueHat