This project contains the tools required to generate announcements, forum threads and related content for osu!'s Project Loved. See cl8n/project-loved-web for the website.
- Node.js 16+
- jpeg-recompress 2.1.1+
- Download the jpeg-archive binaries and place jpeg-recompress(.exe) in
bin
.
- Download the jpeg-archive binaries and place jpeg-recompress(.exe) in
- git (optional, for auto-updating the repository when running commands)
A typical round of Project Loved involves:
- Messaging mappers of nominated mapsets:
npm run messages
- Creating a news post:
npm run news -- <osu-wiki folder>
- Opening forum polls and optionally updating the news post:
npm run news:forum [-- <osu-wiki folder>]
- Posting results when forum polls have concluded:
npm run results
npm run setup
will create the needed config files and runtime folders.
config/config.json
contains these options:
Option | Description |
---|---|
apiClient.id |
API client ID for chat announcements |
apiClient.secret |
API client secret for chat announcements |
cloudflare.id |
https://osu.ppy.sh's __cfduid cookie |
cloudflare.clearance |
https://osu.ppy.sh's cf_clearance cookie |
csrf |
https://osu.ppy.sh's XSRF-TOKEN cookie |
lovedApiKey |
API key for https://loved.sh |
lovedBaseUrl |
Base URL for https://loved.sh |
lovedRoundId |
ID of the round on https://loved.sh |
osuBaseUrl |
Base URL for https://osu.ppy.sh |
pollStartGuess |
Guess for when the polls will be published. Used in PMs |
session |
https://osu.ppy.sh's osu_session cookie |
userAgent |
User-Agent header of the browser used to obtain Cloudflare cookies |
When creating the API client for chat announcements, set the "Application Callback URL" field to http://localhost:18888
.
In addition to config.json
, you need to provide beatmap backgrounds for each of the mapsets included in the current round. Their filenames (not including the extension) must match the beatmapset ID. Run npm run maps:download
to download most of them automatically.