Git Product home page Git Product logo

gamesdonequickcalendarfactory's People

Contributors

aldaviva avatar dependabot[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

gamesdonequickcalendarfactory's Issues

Add a reminder for the first run of the event

As a viewer who doesn't keep track of GDQ and its dozens if not hundreds of unpredictable annual events, I want to be notified by my calendar client when an event is about to start, so that I don't miss it.

  • Notification some time before first run, such as 1 day or 1 week

Exclude break and filler events like sleep and intermissions

The schedule unfortunately insists on putting fake runs in empty times when nothing is happening, like intermissions between days in schedules that aren't 24 hours per day, for example the "Sleep" events in GDQ Express 2023. These result in unnecessary clutter in the calendar, and unhelpful alerts that no one cares about.

These are hard to identify because there is no consistent naming or tagging for these filler events, so it might just be subject name whack-a-mole each time they dream up a new one.

Identifying filler events

The duration, host, runners, and subject are all unreliable, but subject seems the most consistent.

Maybe a heuristic like this would work:

subject == "Sleep" || duration > TimeSpan.FromHours(11)

Enhance run exclusion logic

  • Currently, "sleep" runs are excluded when generating the calendar, but this happens after the readme badge is generated, so the number of runs shown on the badge is too high because it includes the sleep runs. Move the run exclusion logic from CalendarGeneratorImpl to EventDownloaderImpl.
  • There are additional events to exclude, such as Finales, Daily Previews, The Checkpoint, and Pre-Shows. We can identify them based on the ID of the runner (there is only 1 runner for all of these events to exclude, but in general a run should be excluded if any of its runners match these IDs).
    • 367 - Tech Crew
    • 1434 - Interview Crew
    • 1884 - Faith
    • 1885 - Everyone!
    • 2071 - Frame Fatales Interstitial Team

Rewrite everything to handle GDQ's new JSON schedule

For many years, GDQ's schedule was a server-side rendered HTML page with progressive JS enhancement, and this project parsed that HTML to generate an iCalendar file.

Now, right when AGDQ 2024 started, the schedule page switched to a client-side rendered JS webapp based on a JSON API. The two schedule pages are 0% compatible with each other. This project is currently returning an empty calendar because it can't find the HTML elements it expects.

In order to make this project work with the new JSON API, it needs to be almost completely rewritten.

Details

  1. Get the event ID. AGDQ 2024 has ID 46.
    1. Send an HTTP HEAD request to https://gamesdonequick.com/schedule
    2. Inspect the 302 response's Location header, which will contain a URL with the event ID in a path parameter, and will be in the form https://gamesdonequick.com/schedule/46.
  2. Send an HTTP GET request to https://gamesdonequick.com/tracker/api/v2/events/{id}/runs/
  3. It's not clear how pagination works, because the response object contains null values for both the previous and next properties (with count equal to 140) for AGDQ 2024.
  4. Extract the required properties from each object in the results array in order to construct GameRun instances.
    • start - starttime, which is a zoned ISO 8601 datetime
    • duration - endtime-starttime, subtract two zoned ISO 8601 datetimes to get the TimeSpan. Don't use runtime because that gets mutated after a run finishes to be the actual duration, instead of the expected duration.
    • name - either name or display_name, which both seem to always contain the same value
    • description - category + " โ€” " + console; don't use the description property, which is always the empty string in AGDQ 2024
    • runners - runners[*].name
    • host - hosts[0].name; previously there were either 0 or 1 hosts for each run, but in AGDQ 2024 there is one run (The Legend of Zelda: Majora's Mask) with two hosts (brutal_melo and cartridgeblowers), which I think is a mistake because there are 0 commentators for that run
    • setupDuration - setuptime which is an ISO 8601 duration (h:mm:ss), or it can be 0. Not used for anything and probably safe to remove, unless we want to add it to the starttime in an attempt to make the event start when the run starts, not when the waiting screen appears.
    • The new JSON document includes the commentators for the first time, so we could add them too. commentators[*].name

Keep workflows continuously enabled

After almost three months with no commits, GitHub showed a warning on the Publish Calendar workflow page that the workflow was going to be disabled unless there was repository activity or I clicked a button.

This is inconvenient because it will be confusing for viewers of this iCalendar file when it's mysteriously out-of-date while a new GDQ event is running. This repository doesn't need new commits or other activity to justify running the workflows because the calendar needs to be rebuilt when external data changes (the GDQ calendar), not when the repository contents change. The code is reusable across events because it's written generically, so we don't need to commit every time a new event starts.

Maybe making an action that commits something to the repo would be enough? Another possibility might be using an external API client in a scheduled task to do the equivalent of pressing the button in the workflow warning.

Show name of current event and maybe event count as a badge on Readme using shields.io

Static visual example: Static Badge

Endpoint Badge to return from a new API GET method on the webapp server
Try to get a vector logo from https://gamesdonequick.com/crowd/, turn it white, and minify it through SVGO to pass as a custom logo.

Logos

GDQ

data:image/svg+xml;base64,PHN2ZyB4bWx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IgNTQuMyI+PHN0eWxlPi5ze2ZpbGw6I2ZmZn08L3N0eWxlPjxwYXRoIGQ9Ik02Mi4yIDE5LjZINDljLTIuNSAwLTQuOS43LTYuOSAyLjFsLTcuNSA1LjQgNi4xIDcuNmgxMy41YzIgMCAzLjktMS4zIDQuNC0zLjFsMy42LTEyek0xNi40IDQ5LjJsLTEuMyA1LjFoMTIuMmM0LjggMCA0LjctMi45IDUuNC00LjhsMy44LTEyLjgtMTQuMS0xNy4xSDhjLTIgMC0zLjkgMS4zLTQuNCAzLjFMMCAzNC43aDcuOGM4LjggMCAxNi41LTIgMTkuMy00LjQtMS4zIDQuMS03LjkgNy43LTcuOSA3LjdsLTIuOCAxMS4yek00Ny40IDBIMzQuNWMtMiAwLTMuOCAxLjMtNC4zIDMuMmwtNCAxMy41IDUuNyA2LjlMNDIuNiAxNmwxLjItNCAzLjYtMTJ6IiBjbGFzcz0icyIvPjwvc3ZnPg==

API JSON response

Endpoint Badge

{
	"schemaVersion": 1,
	"label": "AGDQ 2024",
	"message": "150 runs",
	"color": "success",
	"isError": false,
	"logoSvg": "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewBox=\"0 0 62.2 54.3\"><style>.s{fill:#fff}</style><path d=\"M62.2 19.6H49c-2.5 0-4.9.7-6.9 2.1l-7.5 5.4 6.1 7.6h13.5c2 0 3.9-1.3 4.4-3.1l3.6-12zM16.4 49.2l-1.3 5.1h12.2c4.8 0 4.7-2.9 5.4-4.8l3.8-12.8-14.1-17.1H8c-2 0-3.9 1.3-4.4 3.1L0 34.7h7.8c8.8 0 16.5-2 19.3-4.4-1.3 4.1-7.9 7.7-7.9 7.7l-2.8 11.2zM47.4 0H34.5c-2 0-3.8 1.3-4.3 3.2l-4 13.5 5.7 6.9L42.6 16l1.2-4 3.6-12z\" class=\"s\"/></svg>"
}

Hide past events

Problem

It's visually annoying when GDQ is over but the old events from a week ago are cluttering up my calendar and making it hard to read future events. They will eventually disappear when a new GDQ event becomes marked as current, but this can take weeks or months.

Idea

When all events in the GDQ calendar are in the past, or maybe more than 24 hours in the past, return 0 events. This cleans up the calendar once GDQ ends, but still lets you see previous events during GDQ week that you may want to refer to or watch a replay of.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.