The in-house app used by Tip of the Hats to award Steam Promo items (i.e. in-game TF2 medals) to qualifying donors.
This is a command-line program written in TypeScript. As such, we don't bother compiling it down to normal JavaScript for distribution. Instead, we run the *.ts files directly via ts-node. This is handled automatically by this package's npm scripts.
npm run mock-servernpm start- Take a backup of the database post-close.
- Update everything for the new year (all queries, promo IDs, amounts, etc.)
- Run the query to get raw cash donations (these will include cash and ScrapTF donations) and grab the file. Be sure to add the appropriate CSV headers.
- Run anything else for other donation ingresses, such as Marketplace.tf roundups.
- Place
raw-cash-donations.csvand any other relevant files indata. npm run convertto get donations.json.- Test out all three tiers of medals by using a custom
donations.jsonthat only has your user in it and runningnpm run start. - Use the real
donations.jsonand do the needful. Be sure to capture the output to a log file (npm run start 2>&1 | tee -a log.log).