Can be used to help produce new editions of This Week in Matrix
  • TypeScript 96.9%
  • Pug 2.9%
  • CSS 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Alexandre Franke f38cee373b ✨ Get author name dynamically
Signed-off-by: Alexandre Franke <alexandre.franke@gmail.com>
2021-10-25 18:45:44 +02:00
.vscode start rendering to a page 2020-08-28 10:49:43 +01:00
config fix: Move twim room id to config file 2021-02-27 17:42:48 +01:00
data update senders 2021-09-04 10:20:53 +01:00
views improve web preview 2020-11-02 23:09:25 +00:00
.gitignore update readme, fixes #3, #6 2020-10-09 11:11:43 +01:00
getProjectInfo.ts handle section from input 2020-07-02 13:07:37 +01:00
getSection.ts add sorting data 2020-06-19 17:42:17 +01:00
package-lock.json ⬆️ Update dependencies 2021-09-13 16:13:00 +02:00
package.json ⬆️ Update dependencies 2021-09-13 16:13:00 +02:00
ping.ts feat: Allow for multiple ping rooms. 2021-02-27 17:35:23 +01:00
readme.md readme: fix bad space breaking Setup heading 2021-07-07 06:59:19 -10:00
render.ts ✨ Get author name dynamically 2021-10-25 18:45:44 +02:00
tsconfig.json initial version 2019-10-07 17:57:20 +01:00
watch.ts Merge branch 'master' into MTRNord/fix-8-and-7 2021-03-01 13:24:53 +01:00

twim-o-matic

Can be used to help produce new editions of https://matrix.org/twim.

Setup

Install everything from npm (Node 12 minimum needed) and setup needed dirs:

npm i
mkdir events
mkdir blog
mkdir blog/img

To use, create a file at config/access_token.json and include three fields:

  • accessToken - the accessToken of the account that will used for watching (in the live environment this is @twim-o-matic:bpulse.org)
  • homeserver - the homeserver of the watching account
  • userId - the userId which we permit to add new emoji

Then build from TypeScript (sourcemap used for debugging):

npx tsc --watch *.ts --sourcemap

Run node watch.js, then use your nominated mxid to react with one of the emoji below on a story to include. This will start logging event IDs.

To clear the stored list, use node watch.js -c. Do this for each new post or you will include previous entries.

When you have a collection, run: node render.js. This will read from the test room state list, and render the entries by writing some markdown to out.md, which will need some editing to make it presentable.

If an entry is from the userId nominated in the config, that entry will not be prefixed with >, since we don't consider it to be quoted.

Note the options for render in the section below. In general, to produce a final output you will use render -mp, -m to process media, and -p to process results from #ping:maunium.net.

Deploy

render will produce a file, out.md. Make any final fixes needed to this markdown, then copy it to the relevent location at https://github.com/matrix-org/matrix.org/tree/master/gatsby/content/blog, making sure to use a *.mdx extension.

node watch --help

% node watch --help
Usage: watch [options]

Options:
  -c, --clear  clear the stored events
  -h, --help   display help for command

node render --help

% node render --help
Usage: render [options]

Options:
  -d, --debug    output all the json blocks, suppress header
  -s, --summary  highlight missing summary blocks
  -m, --media    download and process media
  -p, --pings    get ping-room data
  -w, --web      start a server to render the result
  -h, --help     display help for command

Emoji-Section map

  • 🌡️: Dept of Status of Matrix 🌡️
  • 📜: Dept of Spec 📜
  • 🎓️: Dept of GSoC 🎓️
  • 👥: Dept of P2P 👥
  • 🏢: Dept of Servers 🏢
  • 📥️: Homeserver Deployment 📥️
  • 🌉: Dept of Bridges 🌉
  • 📱: Dept of Clients 📱
  • 🔐: Dept of Encryption 🔐
  • 🧰: Dept of SDKs and Frameworks 🧰
  • 🛠️: Dept of Ops 🛠
  • 🚀: Dept of Services 🚀
  • 🤷: Dept of Blockchain 🤷‍
  • 💡: Dept of Internet of Things 💡
  • 🤖: Dept of Bots 🤖
  • 📹: Dept of Event Videos 📹
  • 🗣️: Dept of Events and Talks 🗣️
  • 🛰️: Dept of Interesting Projects 🛰️
  • 🏗: Dept of Built on Matrix 🏗
  • 🧭: Dept of Guides 🧭
  • 🍕: Dept of Hackathons 🍕
  • 💰️: Dept of Jobs 💰️
  • 📰: Matrix in the News 📰
  • 🏟: New Public Rooms 🏟
  • 👐: Dept of Welcomes 👐
  • 💭: Final Thoughts 💭