Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update contributors. #20

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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, Andy Seaborne, Antoine Zimmermann, Dan Brickley, David Chaves-Fraga, Dominik Tomaszuk, Dörthe Arndt, Enrico Franconi, Fabien Gandon, Gregg Kellogg, Gregory Williams, Jesse Wright, Jose Emilio Labra Gayo, Julián Arenas-Guerrero, Olaf Hartig, Ora Lassila, Pasquale Lisena, Peter Patel-Schneider, Pierre-Antoine Champin, Raphaël Troncy, Ruben Taelman, Rémi Ceres, Souripriya Das, Stuart Sutton, Ted Thibodeau, 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
Loading