Shuoxun Wen 中文 GitHub

Development notes

Implementation notes, limits and fixes by project. You can also search all articles.

Study Kit

A course is more than its PDFs: building the materials exporter

How Study Kit 1.8–1.11.1 turns Moodle pages, Books, assignment briefs, Ed Lessons and linked Google files into a local course package, with offline PDF printing, isolated accounts and an explicit list of what is missing.

  • Python
  • Moodle
  • Ed
  • Google Drive
  • PDF
  • Privacy

One download button, three codebases: zipping a unit's Ed materials

Ed Web could zip a whole unit's Ed materials and Study Kit could not, even though it already downloaded them. Closing that gap meant renaming files without downloading them again, catching attachments, a bug the tests had hidden, and deploying to a server that was not running what I thought it was.

Study Kit gets school mail and attendance, and asks before it changes anything

Study Kit 1.5.0 can optionally read your school mail and attendance. Anything that changes something shows you a full preview first and runs only after you confirm. Attendance reads two weeks in seconds without a browser, and students who never open a terminal can connect it by asking their AI app.

Letting ChatGPT reach Study Kit, for one person only

Study Kit 1.4.0 can now be reached from ChatGPT and Claude on the web. It stays a server for one person: a pairing code from your own terminal, a short list of callback addresses, rotating tokens, and only the tools that read.

Which source wins when an AI reads your assignment

Monash Study Kit lets an AI read your own Moodle and Ed. When you ask it what an assignment wants, it now follows a fixed order of sources: the brief and rubric, then staff answers on Ed, with dates and a source for every rule. How that rule is written, and the test that keeps the agent instructions true.

Homelab

SecureView

100 users, 3% CPU, and most uploads failing

At 100 concurrent users, up to 78% of uploads failed while the CPU sat at 3%. How the cause was found, a first fix that made things worse, and the fix that brought failures to zero.

Sharing files the server cannot read

In SecureView the browser encrypts every file and the server never holds a key that opens one. How sharing works under that rule, and what happens when someone forgets their passphrase.

Monash Hub

One question, two campuses

Visas, insurance, intermission and closing units follow different rules at Monash's Australian and Malaysian campuses. How Monash Hub answers both side by side, and the test that fails an answer that forgets which country it is about.

Blog

Algorithms

quotegate

Turning a bot's quote check into a package

The word-for-word check in my WeChat bot is now its own Python package with no dependencies. What it keeps and drops, why it does not use a second model as a judge, and how a release gets from a tag to PyPI.

Attendance Helper

Getting a Chrome extension ready for the Web Store

Before putting my attendance extension on the Chrome Web Store, I removed a permission, deleted URLs from a library I never call, and made the build refuse to package remote code. What the store checks, and how I checked it myself first.

Ed Web

Q&A bot

A Q&A bot where the model is only allowed to quote

A WeChat bot answers students and parents about visas, exams and enrolment. Why the language model in it may only quote sentences, how the code checks every quote, and which true sentences it still refuses to send.