{"id":14986069,"url":"https://github.com/platane/snk","last_synced_at":"2025-05-14T22:03:06.111Z","repository":{"id":37642814,"uuid":"279995113","full_name":"Platane/snk","owner":"Platane","description":"🟩⬜ Generates a snake game from a github user contributions graph and output a screen capture as animated svg or gif","archived":false,"fork":false,"pushed_at":"2025-04-05T15:38:42.000Z","size":32450,"stargazers_count":4840,"open_issues_count":0,"forks_count":1421,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-04-22T17:01:26.496Z","etag":null,"topics":["gif","github-actions","github-contribution-graph","github-contributions","github-profile-readme","snake-game","svg-animations"],"latest_commit_sha":null,"homepage":"https://platane.github.io/snk","language":"TypeScript","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/Platane.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,"zenodo":null}},"created_at":"2020-07-15T22:34:58.000Z","updated_at":"2025-04-22T12:34:36.000Z","dependencies_parsed_at":"2023-10-16T11:07:01.494Z","dependency_job_id":"f36ef7be-e007-4c7b-a768-f7aa9ed45041","html_url":"https://github.com/Platane/snk","commit_stats":{"total_commits":247,"total_committers":9,"mean_commits":"27.444444444444443","dds":"0.10526315789473684","last_synced_commit":"e55fe1f13cb3b2c9b412d2e1eda8d43d6f5ddb5e"},"previous_names":[],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Platane%2Fsnk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Platane%2Fsnk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Platane%2Fsnk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Platane%2Fsnk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Platane","download_url":"https://codeload.github.com/Platane/snk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252842983,"owners_count":21812779,"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":["gif","github-actions","github-contribution-graph","github-contributions","github-profile-readme","snake-game","svg-animations"],"created_at":"2024-09-24T14:12:16.343Z","updated_at":"2025-05-07T08:32:42.588Z","avatar_url":"https://github.com/Platane.png","language":"TypeScript","readme":"# snk\n\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/platane/platane/main.yml?label=action\u0026style=flat-square)](https://github.com/Platane/Platane/actions/workflows/main.yml)\n[![GitHub release](https://img.shields.io/github/release/platane/snk.svg?style=flat-square)](https://github.com/platane/snk/releases/latest)\n[![GitHub marketplace](https://img.shields.io/badge/marketplace-snake-blue?logo=github\u0026style=flat-square)](https://github.com/marketplace/actions/generate-snake-game-from-github-contribution-grid)\n![type definitions](https://img.shields.io/npm/types/typescript?style=flat-square)\n![code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)\n\nGenerates a snake game from a github user contributions graph\n\n\u003cpicture\u003e\n  \u003csource\n    media=\"(prefers-color-scheme: dark)\"\n    srcset=\"https://raw.githubusercontent.com/platane/snk/output/github-contribution-grid-snake-dark.svg\"\n  /\u003e\n  \u003csource\n    media=\"(prefers-color-scheme: light)\"\n    srcset=\"https://raw.githubusercontent.com/platane/snk/output/github-contribution-grid-snake.svg\"\n  /\u003e\n  \u003cimg\n    alt=\"github contribution grid snake animation\"\n    src=\"https://raw.githubusercontent.com/platane/snk/output/github-contribution-grid-snake.svg\"\n  /\u003e\n\u003c/picture\u003e\n\nPull a github user's contribution graph.\nMake it a snake Game, generate a snake path where the cells get eaten in an orderly fashion.\n\nGenerate a [gif](https://github.com/Platane/snk/raw/output/github-contribution-grid-snake.gif) or [svg](https://github.com/Platane/snk/raw/output/github-contribution-grid-snake.svg) image.\n\nAvailable as github action. It can automatically generate a new image each day. Which makes for great [github profile readme](https://docs.github.com/en/free-pro-team@latest/github/setting-up-and-managing-your-github-profile/managing-your-profile-readme)\n\n## Usage\n\n**github action**\n\n```yaml\n- uses: Platane/snk@v3\n  with:\n    # github user name to read the contribution graph from (**required**)\n    # using action context var `github.repository_owner` or specified user\n    github_user_name: ${{ github.repository_owner }}\n\n    # list of files to generate.\n    # one file per line. Each output can be customized with options as query string.\n    #\n    #  supported options:\n    #  - palette:     A preset of color, one of [github, github-dark, github-light]\n    #  - color_snake: Color of the snake\n    #  - color_dots:  Coma separated list of dots color.\n    #                 The first one is 0 contribution, then it goes from the low contribution to the highest.\n    #                 Exactly 5 colors are expected.\n    outputs: |\n      dist/github-snake.svg\n      dist/github-snake-dark.svg?palette=github-dark\n      dist/ocean.gif?color_snake=orange\u0026color_dots=#bfd6f6,#8dbdff,#64a1f4,#4b91f1,#3c7dd9\n```\n\n[example with cron job](https://github.com/Platane/Platane/blob/master/.github/workflows/main.yml#L26-L33)\n\nIf you are only interested in generating a svg, consider using this faster action: `uses: Platane/snk/svg-only@v3`\n\n**dark mode**\n\nFor **dark mode** support on github, use this [special syntax](https://docs.github.com/en/get-started/writing-on-github/getting-started-with-writing-and-formatting-on-github/basic-writing-and-formatting-syntax#specifying-the-theme-an-image-is-shown-to) in your readme.\n\n```html\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"github-snake-dark.svg\" /\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"github-snake.svg\" /\u003e\n  \u003cimg alt=\"github-snake\" src=\"github-snake.svg\" /\u003e\n\u003c/picture\u003e\n```\n\n**interactive demo**\n\n\u003ca href=\"https://platane.github.io/snk\"\u003e\n  \u003cimg height=\"300px\" src=\"https://user-images.githubusercontent.com/1659820/121798244-7c86d700-cc25-11eb-8c1c-b8e65556ac0d.gif\" \u003e\u003c/img\u003e\n\u003c/a\u003e\n\n[platane.github.io/snk](https://platane.github.io/snk)\n\n**local**\n\n```\nnpm install\n\nnpm run dev:demo\n```\n\n## Implementation\n\n[solver algorithm](./packages/solver/README.md)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplatane%2Fsnk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplatane%2Fsnk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplatane%2Fsnk/lists"}