headreel 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +59 -117
  2. package/package.json +13 -4
package/README.md CHANGED
@@ -1,53 +1,25 @@
1
1
  # headreel
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/headreel)](https://www.npmjs.com/package/headreel)
4
+ [![GitHub Marketplace](https://img.shields.io/badge/marketplace-headreel-blue?logo=github)](https://github.com/marketplace/actions/headreel)
4
5
  [![CI](https://github.com/arifszn/headreel/actions/workflows/ci.yml/badge.svg)](https://github.com/arifszn/headreel/actions/workflows/ci.yml)
5
6
  [![License: MIT](https://img.shields.io/badge/license-MIT-blue)](LICENSE)
6
7
 
7
- An animated banner for your GitHub profile, made from your own GitHub activity.
8
+ An animated banner for your GitHub profile, made from your GitHub activity.
8
9
 
9
10
  ![Contribution City banner](https://raw.githubusercontent.com/arifszn/headreel/main/docs/samples/contribution-city.gif)
10
11
 
11
- headreel turns your contributions into a looping GIF. You can use it in two ways:
12
+ Pick one way to make your banner:
12
13
 
13
- - **One command on your computer.** Run `npx headreel` and get your banner. You do not install or set up anything. It works on macOS, Windows, and Linux.
14
- - **A GitHub Action that keeps it current.** Add one workflow file, and your banner updates every day by itself.
14
+ - [GitHub Action](#github-action): updates the banner every day. No setup on your computer.
15
+ - [Command](#command): makes the banner once on your computer.
15
16
 
16
- Every style works on both light and dark GitHub themes.
17
+ ## GitHub Action
17
18
 
18
- ## Make your banner now
19
+ The Action is on the [GitHub Marketplace](https://github.com/marketplace/actions/headreel).
19
20
 
20
- Run this command. Replace `octocat` with your GitHub username.
21
-
22
- ```bash
23
- npx headreel --style contribution-city --user octocat
24
- ```
25
-
26
- The command saves your banner as `headreel.gif` in the current folder. The first run downloads headreel. After that, a banner takes a few seconds.
27
-
28
- Add your tagline and website:
29
-
30
- ```bash
31
- npx headreel --style contribution-city --user octocat \
32
- --tagline "Open source maintainer" \
33
- --website https://example.com
34
- ```
35
-
36
- You need [Node.js](https://nodejs.org) 22 (22.22.2 or later), 24 (24.15.0 or later), or 26 and later. You also need a GitHub token. If you use the [GitHub CLI](https://cli.github.com), log in with `gh auth login`, and headreel finds the token. For other ways, see [Command options](#command-options).
37
-
38
- To put the banner on your profile, add `headreel.gif` to your profile repository. Then add this line to its `README.md`:
39
-
40
- ```markdown
41
- ![My GitHub activity](headreel.gif)
42
- ```
43
-
44
- ## Keep it updated with the GitHub Action
45
-
46
- A banner that you make on your computer does not change. The Action makes a new banner every day.
47
-
48
- Your profile repository has the same name as your username, for example `octocat/octocat`. Do these steps in that repository.
49
-
50
- 1. Create the file `.github/workflows/headreel.yml` with this content:
21
+ 1. Open your profile repository. This is the public repository with the same name as your username, for example `octocat/octocat`.
22
+ 2. Add `.github/workflows/headreel.yml`:
51
23
 
52
24
  ```yaml
53
25
  name: headreel
@@ -55,7 +27,7 @@ Your profile repository has the same name as your username, for example `octocat
55
27
  on:
56
28
  schedule:
57
29
  - cron: '0 0 * * *' # every day at 00:00 UTC
58
- workflow_dispatch: # lets you run it from the Actions tab
30
+ workflow_dispatch:
59
31
 
60
32
  permissions:
61
33
  contents: write
@@ -68,107 +40,77 @@ Your profile repository has the same name as your username, for example `octocat
68
40
  - uses: arifszn/headreel@v1
69
41
  with:
70
42
  style: contribution-city
71
- tagline: Senior Software Engineer · Distributed Systems
43
+ publish_mode: branch
44
+ tagline: Open source maintainer
72
45
  website: https://example.com
73
46
  ```
74
47
 
75
- 2. Open the **Actions** tab of the repository. Select **headreel**, then select **Run workflow**.
76
- 3. Wait for the run to finish. The workflow adds `headreel.gif` to the repository.
77
- 4. Add this line to your `README.md`:
48
+ 3. Run the workflow once from the **Actions** tab. It adds `headreel.gif` to the `headreel` branch.
49
+ 4. Add the image line to your `README.md`. The workflow run page shows it, ready to copy. It looks like this:
78
50
 
79
51
  ```markdown
80
- ![My GitHub activity](headreel.gif)
52
+ ![My GitHub activity](https://raw.githubusercontent.com/octocat/octocat/headreel/headreel.gif)
81
53
  ```
82
54
 
83
- > [!NOTE]
84
- > The workflow makes a commit only when the banner changes. Your contribution count changes most days, so expect about one commit each day.
55
+ The workflow updates the banner only when it changes. After an update, the new banner can take up to 5 minutes to show. See [Settings](#settings) for all inputs.
85
56
 
86
- ## Action inputs
57
+ ### Keep your repository small
87
58
 
88
- | Input | Default | Description |
89
- | ---------------- | ------------------------------- | ------------------------------------------------------------------ |
90
- | `style` | (required) | The banner style. See [Styles](#styles). |
91
- | `username` | repository owner | The GitHub user to show. |
92
- | `tagline` | empty | One line under your name. Empty means no tagline. |
93
- | `website` | empty | Your website, for example `https://example.com`. Empty means none. |
94
- | `handle` | empty | A handle, for styles that show one. |
95
- | `options` | empty | Style settings, one `key: value` on each line. |
96
- | `output` | `headreel.gif` | The path of the banner in your repository. |
97
- | `commit_to` | the checked-out branch | The branch that gets the banner. |
98
- | `commit_message` | `chore: update headreel banner` | The commit message for each update. |
99
- | `token` | `github.token` | The token that reads your contribution data. |
59
+ The setup above uses `publish_mode: branch`. The banner lives on its own `headreel` branch, and each update replaces the old banner, so your repository does not grow.
100
60
 
101
- Your name comes from your GitHub profile. If your profile has no name, the banner shows your username.
61
+ If you remove `publish_mode: branch`, each update adds a new commit to your main branch. Old banners stay in your history, and each one is a few MB.
102
62
 
103
- ## Styles
63
+ ## Command
104
64
 
105
- ### Contribution City
65
+ Run this command. Replace `octocat` with your GitHub username.
106
66
 
107
- `style: contribution-city`
67
+ ```bash
68
+ npx headreel --style contribution-city --user octocat --tagline "Open source maintainer" --website https://example.com
69
+ ```
108
70
 
109
- Each day of the last 12 months is one building. A taller building means more contributions on that day. A light beam moves across the city, and beacons glow on your busiest days.
71
+ The command saves `headreel.gif` in the current folder. Add the file to your profile repository, and add `![My GitHub activity](headreel.gif)` to its `README.md`.
110
72
 
111
- The banner shows your name, your tagline, your total contributions, and your website.
73
+ You need:
112
74
 
113
- | Option | Default | Description |
114
- | --------- | ------- | -------------------------------------------------- |
115
- | `beacons` | `8` | The number of busiest days with a beacon, 0 to 10. |
75
+ - A GitHub token. headreel uses `--token`, then `GITHUB_TOKEN`, then your [GitHub CLI](https://cli.github.com) login (`gh auth login`).
116
76
 
117
- Example:
77
+ ## Settings
118
78
 
119
- ```yaml
120
- - uses: arifszn/headreel@v1
121
- with:
122
- style: contribution-city
123
- options: |
124
- beacons: 5
125
- ```
79
+ The Action and the command use the same settings.
126
80
 
127
- ## Command options
128
-
129
- | Option | Description |
130
- | ---------------------- | ----------------------------------------------------- |
131
- | `--style <id>` | The banner style (required). See [Styles](#styles). |
132
- | `--user <login>` | Your GitHub username (required). |
133
- | `--out <file>` | Where to save the GIF. The default is `headreel.gif`. |
134
- | `--tagline <text>` | One line under your name. |
135
- | `--website <url>` | Your website. |
136
- | `--handle <text>` | A handle, for styles that show one. |
137
- | `--option <key=value>` | A style setting. Use it again for each setting. |
138
- | `--config <file>` | A JSON file with your settings. |
139
- | `--token <token>` | A GitHub token. See the token order below. |
140
-
141
- headreel needs a GitHub token to read your contributions. It looks for a token in this order:
142
-
143
- 1. The `--token` option.
144
- 2. The `GITHUB_TOKEN` environment variable.
145
- 3. The [GitHub CLI](https://cli.github.com), if you are logged in with `gh auth login`.
146
-
147
- You can keep your settings in a JSON file:
148
-
149
- ```json
150
- {
151
- "style": "contribution-city",
152
- "user": "octocat",
153
- "tagline": "Open source maintainer",
154
- "website": "https://example.com",
155
- "options": { "beacons": 5 }
156
- }
157
- ```
81
+ | Action input | Command flag | Default | Description |
82
+ | ---------------- | ---------------------- | ------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
83
+ | `style` | `--style` | (required) | The banner style. See [Styles](#styles). |
84
+ | `username` | `--user` | repository owner | The GitHub user to show. The command requires it. |
85
+ | `tagline` | `--tagline` | empty | One line under your name. |
86
+ | `website` | `--website` | empty | Your website. |
87
+ | `handle` | `--handle` | empty | A handle, for styles that show one. |
88
+ | `options` | `--option <key=value>` | empty | Style options. Action: one `key: value` on each line. Command: repeat the flag, for example `--option beacons=5`. |
89
+ | `output` | `--out` | `headreel.gif` | The path of the banner. |
90
+ | `token` | `--token` | `github.token` | The token that reads your contribution data. |
91
+ | `publish_mode` | - | `commit` | `commit` adds a commit on every update. `branch` keeps one commit on its own branch, replaced on every update. |
92
+ | `commit_to` | - | checked-out branch / `headreel` | The branch that gets the banner. The default is `headreel` in `branch` mode. |
93
+ | `commit_message` | - | `chore: update headreel banner` | The commit message. |
94
+ | - | `--config <file>` | - | A JSON file with these settings. Flags replace its values. |
158
95
 
159
- ```bash
160
- npx headreel --config headreel.json
161
- ```
96
+ Empty settings do not show on the banner. Your name comes from your GitHub profile. If your profile has no name, the banner shows your username.
162
97
 
163
- Options on the command line replace the values in the file. To see all options, run `npx headreel --help`.
98
+ ## Styles
164
99
 
165
- ## Troubleshooting
100
+ ### Contribution City
166
101
 
167
- **The workflow fails with "Permission denied" or a 403 error.**
168
- Make sure that the workflow file contains `permissions: contents: write`.
102
+ `contribution-city`: each day of the last 12 months is one building. A taller building means more contributions. Beacons glow on your busiest days.
169
103
 
170
- **The workflow fails with "Could not resolve to a User".**
171
- Check the `username` input. It must be a GitHub username.
104
+ | Option | Default | Description |
105
+ | --------- | ------- | -------------------------------------------------- |
106
+ | `beacons` | `8` | The number of busiest days with a beacon, 0 to 10. |
107
+
108
+ Set an option with `options: 'beacons: 5'` in the Action, or `--option beacons=5` in the command.
109
+
110
+ ## Troubleshooting
172
111
 
173
- **The command fails with "No GitHub token found".**
174
- Log in with `gh auth login`, or set the `GITHUB_TOKEN` environment variable.
112
+ | Problem | Fix |
113
+ | -------------------------------- | -------------------------------------------------------- |
114
+ | "Permission denied" or 403 error | Add `permissions: contents: write` to the workflow file. |
115
+ | "Could not resolve to a User" | Set `username` to a valid GitHub username. |
116
+ | "No GitHub token found" | Run `gh auth login`, or set `GITHUB_TOKEN`. |
package/package.json CHANGED
@@ -1,15 +1,24 @@
1
1
  {
2
2
  "name": "headreel",
3
- "version": "1.0.0",
4
- "description": "Animated GitHub profile banner, rendered from your GitHub data. GitHub Action and CLI.",
3
+ "version": "1.1.0",
4
+ "description": "Animated GitHub profile banner made from your GitHub activity, with a GitHub Action or CLI.",
5
5
  "keywords": [
6
6
  "github",
7
- "profile",
7
+ "github-profile",
8
+ "github-profile-readme",
9
+ "profile-readme",
8
10
  "readme",
9
11
  "banner",
10
12
  "gif",
13
+ "animation",
11
14
  "github-action",
12
- "contributions"
15
+ "github-actions",
16
+ "cli",
17
+ "npx",
18
+ "contributions",
19
+ "contribution-graph",
20
+ "generative-art",
21
+ "p5js"
13
22
  ],
14
23
  "homepage": "https://github.com/arifszn/headreel#readme",
15
24
  "bugs": {