diff --git a/node-w3capi/README.md b/node-w3capi/README.md index 2e928e3..b961f9f 100644 --- a/node-w3capi/README.md +++ b/node-w3capi/README.md @@ -31,4 +31,8 @@ Output can be found in `data` directory. ### participants.html +### participants.txt + +A snapshot of CG participants (humans) as plaintext + ### users.json diff --git a/node-w3capi/index.js b/node-w3capi/index.js index 253f0b6..fff8740 100644 --- a/node-w3capi/index.js +++ b/node-w3capi/index.js @@ -39,6 +39,7 @@ const filenames = { designated: "affiliation-designated-voters.md", }, txt: { + participants: "participants.txt", voters: "eligible-voters.txt", }, }; @@ -116,6 +117,12 @@ if (nonSingularOrgs.length === 0) { spinner.succeed("Generated markdown"); } +spinner.start("🤖 Generating TXT"); +const participants = data.users.map((user) => user.name); +participants.sort(alphaSort); +fs.writeFileSync(paths.txt.participants, participants.join("\n") + "\n"); +spinner.succeed("Generated TXT"); + if (localDataExists(paths.md)) { spinner.start("🤖 Generating eligible voters list"); const representativesTable = fs