Skip to content

Commit

Permalink
Update contributors.
Browse files Browse the repository at this point in the history
  • Loading branch information
gkellogg committed Dec 19, 2024
1 parent 5d27ad7 commit 582878f
Show file tree
Hide file tree
Showing 3 changed files with 63 additions and 16 deletions.
2 changes: 1 addition & 1 deletion spec/common/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ This repository is meant to be used as a submodule in multiple repository holdin

## Retrieving group participants

The `participants.js` Node script can be used to retrieve the list of working group participants. It requires an API Key.
The `participants.js` Node script can be used to retrieve the list of working group participants. It takes an optional API Key (use empty string to omit).

node participants.js <apikey> wg/rdf-star > participants.html
45 changes: 44 additions & 1 deletion spec/common/participants.html
Original file line number Diff line number Diff line change
@@ -1 +1,44 @@
Members of the RDF-star Working Group Group included Achille Zappa, Adrian Gschwend, Alan Snyder, Amin Anjomshoaa, Andy Seaborne, Antoine Zimmermann, Dan Brickley, Dave Raggett, Dominik Tomaszuk, Dörthe Arndt, Enrico Franconi, Erich Bremer, Fabien Gandon, Felix Sasaki, Gregg Kellogg, Gregory Williams, Jean-Yves Rossi, Jose Emilio Labra Gayo, Julián Arenas-Guerrero, Kurt Cagle, Niklas Lindström, Olaf Hartig, Ora Lassila, Pasquale Lisena, Peter Patel-Schneider, Pierre-Antoine Champin, Raphaël Troncy, Richard Lea, Ruben Taelman, Rémi Ceres, Souripriya Das, Ted Thibodeau Jr, Thomas Lörtsch, Thomas Pellissier Tanon, Timothée Haudebourg, and Vladimir Alexiev.
Members of the RDF-star Working Group Group included
Vladimir Alexiev,
Amin Anjomshoaa,
Julián Arenas-Guerrero,
Dörthe Arndt,
Bilal Ben Mahria,
Erich Bremer,
Kurt Cagle,
Rémi Ceres,
Pierre-Antoine Champin,
Souripriya Das,
Daniil Dobriy,
Enrico Franconi,
Jeffrey Phillips Freeman,
Fabien Gandon,
Benjamin Goering,
Adrian Gschwend,
Olaf Hartig,
Timothée Haudebourg,
Ian Horrocks,
Gregg Kellogg,
Mark Kim,
Jose Emilio Labra Gayo,
Ora Lassila,
Richard Lea,
Niklas Lindström,
Pasquale Lisena,
Thomas Lörtsch,
Matthew Nguyen,
Peter Patel-Schneider,
Thomas Pellissier Tanon,
Dave Raggett,
Jean-Yves ROSSI,
Felix Sasaki,
Andy Seaborne,
Ruben Taelman,
Ted Thibodeau Jr,
Dominik Tomaszuk,
Raphaël Troncy,
William Van Woensel,
Gregory Williams,
Jesse Wright,
Achille Zappa, and
Antoine Zimmermann.
32 changes: 18 additions & 14 deletions spec/common/participants.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,22 @@
const https = require('https');
const process = require('process');

const APIKEY = process.env.APIKEY || process.argv[2];
const APIKEY = process.env.APIKEY || process.argv[2] || '';
const GROUP = process.env.GROUP || process.argv[3] || "wg/rdf-star";

if (!APIKEY) {
console.error('Error: APIKEY must be specified as either an environment variable or a command-line argument.');
process.exit(1);
}
var apikey = APIKEY.length > 0 ? `&apikey=${APIKEY}` : ''

const groupOptions = {
hostname: 'api.w3.org',
path: `/groups/${GROUP}?items=50&apikey=${APIKEY}`,
path: `/groups/${GROUP}?items=50${apikey}`,
headers: {
'Accept': 'application/json'
}
};

const userOptions = {
hostname: 'api.w3.org',
path: `/groups/${GROUP}/users?items=50&apikey=${APIKEY}`,
path: `/groups/${GROUP}/users?items=50${apikey}`,
headers: {
'Accept': 'application/json'
}
Expand All @@ -53,16 +50,23 @@ https.get(groupOptions, (res) => {

res.on('end', () => {
const users = JSON.parse(userData)._links.users.map(u => u.title);
const sortedUsers = users.sort();

if (sortedUsers.length === 1) {
console.log(`The sole member of the ${groupName} Group was ${sortedUsers[0]}.`);
} else if (sortedUsers.length === 2) {
const joinedUsers = sortedUsers.join(' and ');
if (users.length === 1) {
console.log(`The sole member of the ${groupName} Group was ${users[0]}.`);
} else if (users.length === 2) {
const joinedUsers = users.join(' and ');
console.log(`Members of the ${groupName} Group included ${joinedUsers}.`);
} else {
const joinedUsers = sortedUsers.slice(0, -1).join(', ');
console.log(`Members of the ${groupName} Group included ${joinedUsers}, and ${sortedUsers[sortedUsers.length - 1]}.`);
// Find the maximum length of the first part (before the space)
const maxLength = Math.max(...users.map(user => user.split(" ")[0].length));

// Right-align the first component and format the strings
const alignedUsers = users.map(user => {
const [first, ...rest] = user.split(" ");
return first.padStart(maxLength, " ") + " " + rest.join(" ");
});
const joinedUsers = alignedUsers.slice(0, -1).join(",\n");
console.log(`Members of the ${groupName} Group included\n${joinedUsers}, and\n${alignedUsers[users.length - 1]}.`);
}
});
}).on('error', (err) => {
Expand Down

0 comments on commit 582878f

Please sign in to comment.