{"id":20007433,"url":"https://github.com/mystpi/scratchstatus","last_synced_at":"2025-07-03T08:34:22.298Z","repository":{"id":201006977,"uuid":"706732305","full_name":"MystPi/scratchstatus","owner":"MystPi","description":"Dynamic status systems for Scratch and the web.","archived":false,"fork":false,"pushed_at":"2023-10-19T22:03:19.000Z","size":77,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-20T10:04:15.004Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MystPi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-10-18T14:09:23.000Z","updated_at":"2023-11-02T15:57:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"5fd4eb3a-92f0-472f-abb3-73ce87982c7c","html_url":"https://github.com/MystPi/scratchstatus","commit_stats":null,"previous_names":["mystpi/scratchstatus"],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MystPi%2Fscratchstatus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MystPi%2Fscratchstatus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MystPi%2Fscratchstatus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MystPi%2Fscratchstatus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MystPi","download_url":"https://codeload.github.com/MystPi/scratchstatus/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241212201,"owners_count":19927900,"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-13T06:16:34.254Z","updated_at":"2025-03-02T01:18:30.357Z","avatar_url":"https://github.com/MystPi.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Scratch Status\n\nDynamic status systems for Scratch and the web.\n\n## Using the pre-made [Scratch status system](/src/scratchstatus/)\n\nThis system was made for use in [ocular](https://ocular.jeffalo.net).\n\n```ts\nimport { scratchstatus } from 'scratchstatus';\n\nconst status = `I have {followers} followers.`;\n\nscratchstatus.run(status, 'NFlex23').then(console.log);\n```\n\n## Creating a custom status system\n\n```ts\nimport { createConfig, createSystem } from 'scratchstatus';\n\nconst config = createConfig({\n  initState: (username) =\u003e ({\n    username,\n    count: 1,\n  }),\n});\n\nconst system = createSystem(config, {\n  username: {\n    args: [],\n    description: 'Returns your username',\n    do: (_, { username }) =\u003e username,\n  },\n  join: {\n    args: ['a', 'b'],\n    description: 'Joins a and b together',\n    do: ([a, b]) =\u003e `${a}${b}`,\n  },\n  count: {\n    args: [],\n    description: 'Count by 1',\n    do: (_, state) =\u003e {\n      return state.count++;\n    },\n  },\n});\n\nconst status = `I am {username}. {join \"Hello, \" \"World!\"}. Counting 1-3: {count}, {count}, {count}`;\n\nsystem.run(status, 'MystPi').then(console.log);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmystpi%2Fscratchstatus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmystpi%2Fscratchstatus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmystpi%2Fscratchstatus/lists"}