Zurück zum Ranking

Platane/snk

TypeScriptplatane.github.io/snk

🟩⬜ Generates a snake game from a github user contributions graph and output a screen capture as animated svg or gif

github-actionsgithub-profile-readmesnake-gamegifsvg-animationsgithub-contribution-graphgithub-contributions
Sterne-Wachstum
Sterne
6k
Forks
2.3k
Wochenwachstum
Issues
3
2k4k
Jan. 2021Nov. 2022Sept. 2024Juli 2026
Artefaktenpmnpm install snk
README

snk

GitHub Workflow Status GitHub release GitHub marketplace type definitions code style

Generates a snake game from a github user contributions graph

github contribution grid snake animation

Pull a github user's contribution graph. Make it a snake Game, generate a snake path where the cells get eaten in an orderly fashion.

Generate a gif or svg image. Colors can be customized.

Available as github action. It can automatically generate a new image each day. Which makes for great github profile readme

Usage

github action

- uses: Platane/snk@v3
  with:
    # github user name to read the contribution graph from (**required**)
    # using action context var `github.repository_owner` or specified user
    github_user_name: ${{ github.repository_owner }}

    # list of files to generate.
    # one file per line. Each output can be customized with options as query string.
    #
    #  supported options:
    #  - palette:           A preset of color, one of [github, github-dark, github-light]
    #  - color_snake:       Color of the snake
    #  - color_dots:        Coma separated list of dots color.
    #                       The first one is 0 contribution, then it goes from the low contribution to the highest.
    #                       Exactly 5 colors are expected.
    #  - color_background:  Color of the background (for gif only)
    outputs: |
      dist/github-snake.svg
      dist/github-snake-dark.svg?palette=github-dark
      dist/ocean.gif?color_snake=orange&color_dots=#bfd6f6,#8dbdff,#64a1f4,#4b91f1,#3c7dd9&color_background=#aaaaaa

example with cron job

svg

If you are only interested in generating a svg (not a gif), consider using this faster action: uses: Platane/snk/svg-only@v3

dark mode

dark mode

For dark mode support on github, use this special syntax in your readme.

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="github-snake-dark.svg" />
  <source media="(prefers-color-scheme: light)" srcset="github-snake.svg" />
  <img alt="github-snake" src="github-snake.svg" />
</picture>

interactive demo

platane.github.io/snk

npm package

import { generateSnakeAnimation } from "generate-snake-animation";

const outputs = [
  {
    format: "svg",
    drawOptions: {
      // ..
    },
  },
];

const results = await generateSnakeAnimation(
  {
    platform: "github", // supports github, gitlab and forgejo (codeberg)
    username: "platane",
    githubToken: process.env.GITHUB_TOKEN,
  },
  outputs,
);

fs.writeFileSync("snake.svg", results[0]);

or with npx

npx generate-snake-animation@3 --forgejo_user codeberg.org/JasterV --output snake.svg?palette=codeberg

Implementation

solver algorithm

Contribution Policy

This project does not accept pull request.

Reporting or fixing issues is appreciated, but change in the API or implementation should be discussed in issue first and is likely not going be greenlighted.

Ähnliche Repositories
nektos/act

Run your GitHub Actions locally 🚀

GoGo ModulesMIT Licensegithub-actionsgolang
nektosact.com
71.2k2k
go-gitea/gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD

GoGo ModulesMIT Licensegiteagolang
gitea.com
57k6.9k
sdras/awesome-actions

A curated list of awesome actions to use on GitHub

Creative Commons Zero v1.0 Universalawesomegithub
28.1k1.7k
goreleaser/goreleaser

Release engineering, simplified

GoGo ModulesMIT Licenserelease-automationpackage
goreleaser.com
15.9k1.1k
ubicloud/ubicloud

Open source alternative to AWS. Elastic compute, block storage (non replicated), firewall and load balancer, managed Postgres, K8s, AI inference, and IAM services.

RubyRubyGemsGNU Affero General Public License v3.0cloudportable
ubicloud.com
12.2k575
cobusgreyling/loop-engineering

Practical patterns, starters & CLI tools for loop engineering with AI coding agents. Design systems that prompt and orchestrate agents (inspired by Addy Osmani and Boris Cherny). Includes loop-audit, loop-init, loop-cost.

JavaScriptnpmMIT Licenseagentic-aiai-agents
cobusgreyling.github.io/loop-engineering/
9k1.2k
community/community

Public feedback discussions for: GitHub Mobile, GitHub Discussions, GitHub Codespaces, GitHub Sponsors, GitHub Issues and more!

RubyRubyGemsCreative Commons Attribution 4.0 Internationalgithubgithub-enterprise
8.6k4.1k
P3TERX/Actions-OpenWrt

A template for building OpenWrt with GitHub Actions | 使用 GitHub Actions 在线云编译 OpenWrt 固件

ShellMIT Licenseopenwrtactions-openwrt
p3terx.com/archives/build-openwrt-with-github-actions.html
7.6k6.9k
hect0x7/JMComic-Crawler-Python

Python API for JMComic | 提供Python API访问禁漫天堂,同时支持网页端和移动端 | 禁漫天堂GitHub Actions下载器🚀

PythonPyPIMIT License18comiccrawler
jmcomic.readthedocs.io/zh-cn/latest/option_file_syntax/
6.7k11.4k
actions/actions-runner-controller

Kubernetes controller for GitHub Actions self-hosted runners

GoGo ModulesApache License 2.0github-actionskubernetes
6.4k1.4k
SuLingGG/OpenWrt-Rpi

Raspberry Pi & NanoPi R2S/R4S & G-Dock & x86 OpenWrt Compile Project. (Based on Github Action / Daily Update)

ShellMIT Licenseopenwrtgithub-actions
6.3k1.2k
Agents365-ai/drawio-skill

Generate draw.io diagrams from natural language — 11 presets (UML, SysML/MBSE, BPMN, network, C4…), 36 tools: codebase/CI/infra-to-diagram, image→editable diagram, mind maps, build-up animation, exec-view compression, click-through runbooks, PR diff bot. Vision self-check, 10,000+ shapes. Exports PNG/SVG/PDF/JPG.

PythonPyPIMIT Licensedrawiodiagram
agents365-ai.github.io/drawio-skill/
6.3k490