{"id":19042948,"url":"https://github.com/thepython10110/countdown_test","last_synced_at":"2025-10-08T14:01:44.928Z","repository":{"id":250631423,"uuid":"835002629","full_name":"ThePython10110/countdown_test","owner":"ThePython10110","description":"A thing","archived":false,"fork":false,"pushed_at":"2024-08-16T16:44:47.000Z","size":1284,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-02T07:45:31.927Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ThePython10110.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-29T00:28:28.000Z","updated_at":"2024-08-16T16:44:50.000Z","dependencies_parsed_at":"2024-11-08T22:40:04.298Z","dependency_job_id":"f9bdc55c-e02a-4604-beb9-4382c5663413","html_url":"https://github.com/ThePython10110/countdown_test","commit_stats":null,"previous_names":["thepython10110/countdown_test"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThePython10110%2Fcountdown_test","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThePython10110%2Fcountdown_test/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThePython10110%2Fcountdown_test/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ThePython10110%2Fcountdown_test/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ThePython10110","download_url":"https://codeload.github.com/ThePython10110/countdown_test/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240100564,"owners_count":19747689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T22:39:37.251Z","updated_at":"2025-10-08T14:01:44.850Z","avatar_url":"https://github.com/ThePython10110.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Countdown Test\n\nThis is a programming experiment where my goal is to learn languages by making\nthe same countdown app in several of them. I'll start with C++, then move on to\nwhatever other programming language I want to learn (or relearn). Maybe Python,\nBash, Rust, JavaScript (HTML frontend?), I don't know. I just think it would be\na good way to learn programming languages. And honestly, I've never made a TUI\nbefore, so that will probably be a good thing to learn.\n\n## The features:\n\nI will hopefully be able to implement all of these...\n\n- All data stored in JSON.\n- Themes stored in separate files in a `themes` subdirectory.\n- Fields to be stored for each event:\n  - Date/time: Stored as `\"YYYY-MM-DDThh:mm:ss\"`.\n  - Title: The title of the event, not allowing newlines.\n  - Details (optional): Details of the event, allowing newlines\n  - Repeat (optional): If the event repeats, this shows when. More information\n    further down.\n  - Theme (optional): A theme (either an existing theme name or a full theme\n    object) that overrides the global theme (see Themes below).\n- User actions:\n  - Keyboard and mouse compatibility\n  - Edit all fields of an event\n  - Add events\n  - Remove events (with confirmation).\n  - Add, remove, and edit themes (more details on themes below).\n- Command line argument to choose config file and theme\n\n## JSON structure:\n\n```json\n{\n  \"theme\": \"default\",\n  \"events\": [\n    {\n      \"title\": \"Christmas\",\n      \"time\": \"2024-12-25T00:00:00\",\n      \"repeat\": \"Y\",\n      \"theme\": \"special_christmas_theme\",\n      \"details\": \"A holiday that exists\"\n    }\n  ]\n}\n```\n`\"theme\"` can either be the name (without the extension) of a JSON file in the\n`themes` directory, or a theme JSON object.\n\nFor more information about the JSON format, check the schemas in the `schemas`\ndirectory.\n\n## Repeats\n\nI made a separate section for this because I felt like it. Basically, the repeat\nvalue can be stored in two different ways:\n\n- `\"[#]u\"`\n  This is the simplest method. `[#]` is an optional number that defaults to 1 if\n  omitted. `u` is a unit, either `s|m|h|D|W|M|Y|C`. After the event happens, this\n  amount is added to it. For example, `\"Y\"` would schedule an event as yearly,\n  and `\"5D\"` would schedule an event to be every five days.\n- `\"Wu[#][u]\"`\n  Here, `\"W\"` is a literal \"W\" character. Both units must be either `M|Y` (the\n  last one is optional, assumed to be `Y` if omitted). It's basically just\n  saying \"the same occurence of the same day of the week of the `u` every `[#]`\n  `[u]`. Which is incredibly confusing. For example, to encode Thanksgiving (the\n  fourth Thursday in November), you would create an event set to Thanksgiving\n  one year, then set the repeat to be `\"WM\"`. This will set it to be on the\n  fourth Thursday of November every year(assuming that the original event is set\n  to the fourth Thursday in November). It's confusing, but that's the best way I\n  can think of doing it.\n\n### Notes\n\nLeap years are always respected, since it's literally just incrementing the year\nnumber.\n\nIf an event ends up scheduled (for example) on the ninth Sunday of the\nmonth or the 202nd day of March, it will overflow into future months/years.\n\nAll dates are stored and processed internally as UTC, only being converted to\nlocal time when necessary.\n\n## Themes\n\nThis is the basic format of a theme:\n\n```json\n{\n    \"bg\": \"transparent\",\n    \"fg\": \"#ffffff\"\n    \"events\": [\n            {\n                \"time\": \"3D\",\n                \"fg\": \"#000000\",\n                \"bg\": \"#ffffff\"\n            },\n            {\n                \"time\": \"W\",\n                \"fg\": \"#ffff00\"\n            },\n            {\n                \"fg\": \"#00ffff\"\n            }\n        ]\n    ]\n}\n```\nThemes are all about overrides. The default theme (defined in `countdown.hpp`)\nis overridden by the top-level theme in the given theme file, which is then\noverridden by the `\"events\"` objects (shorter times have higher precedence, but\nare only active if the event is \u003c= that far away), and finally those are\noverridden by the `\"theme\"` property of the events. The `\"time\"` property is the\nsame format as the first `\"repeat\"` format.\n\nIf you're confused, I don't care... it makes enough sense for me to code it. The\ntheme shown above has a global style that sets it to white on transparent.\nEvents are cyan by default. Events that are \u003c= 1 week away are yellow, and\nevents that are \u003c= 3 days away are white on black. Of course, this theme would\nalso be overridden by any event-specific themes...\n\nMore than `fg` and `bg` may eventually be added (such as `font` for GUI\nversions, if I ever make GUI versions).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthepython10110%2Fcountdown_test","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthepython10110%2Fcountdown_test","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthepython10110%2Fcountdown_test/lists"}