gh-space-shooter 0.0.1__tar.gz
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.
- gh_space_shooter-0.0.1/.github/dependabot.yml +8 -0
- gh_space_shooter-0.0.1/.github/workflows/publish.yml +55 -0
- gh_space_shooter-0.0.1/.gitignore +19 -0
- gh_space_shooter-0.0.1/.python-version +1 -0
- gh_space_shooter-0.0.1/LICENSE +21 -0
- gh_space_shooter-0.0.1/PKG-INFO +141 -0
- gh_space_shooter-0.0.1/README.md +127 -0
- gh_space_shooter-0.0.1/czl9707_contributions.json +2015 -0
- gh_space_shooter-0.0.1/example.gif +0 -0
- gh_space_shooter-0.0.1/pyproject.toml +50 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/__init__.py +19 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/cli.py +177 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/console_printer.py +65 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/constants.py +11 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/__init__.py +27 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/animator.py +101 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/drawables/__init__.py +17 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/drawables/bullet.py +83 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/drawables/drawable.py +29 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/drawables/enemy.py +58 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/drawables/explosion.py +72 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/drawables/ship.py +107 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/drawables/starfield.py +65 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/game_state.py +80 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/render_context.py +56 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/renderer.py +44 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/strategies/__init__.py +14 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/strategies/base_strategy.py +43 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/strategies/column_strategy.py +46 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/strategies/random_strategy.py +61 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/game/strategies/row_strategy.py +41 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/github_client.py +172 -0
- gh_space_shooter-0.0.1/src/gh_space_shooter/py.typed +0 -0
- gh_space_shooter-0.0.1/uv.lock +255 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
release_type:
|
|
7
|
+
description: "Release Type"
|
|
8
|
+
required: true
|
|
9
|
+
type: choice
|
|
10
|
+
default: "patch"
|
|
11
|
+
options:
|
|
12
|
+
- major
|
|
13
|
+
- minor
|
|
14
|
+
- patch
|
|
15
|
+
|
|
16
|
+
env:
|
|
17
|
+
PYTHON_LATEST: 3.13
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
build:
|
|
21
|
+
name: Publish
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- name: Install uv
|
|
28
|
+
uses: astral-sh/setup-uv@v7
|
|
29
|
+
|
|
30
|
+
- name: Install Python ${{ env.PYTHON_LATEST }}
|
|
31
|
+
run: uv python install ${{ env.PYTHON_LATEST }}
|
|
32
|
+
|
|
33
|
+
- name: Build
|
|
34
|
+
run: uv build
|
|
35
|
+
|
|
36
|
+
- name: Bump version
|
|
37
|
+
id: bump
|
|
38
|
+
uses: callowayproject/bump-my-version@master
|
|
39
|
+
env:
|
|
40
|
+
BUMPVERSION_TAG: "false"
|
|
41
|
+
with:
|
|
42
|
+
args: ${{ inputs.release_type }}
|
|
43
|
+
github-token: ${{ secrets.GH_TOKEN }}
|
|
44
|
+
|
|
45
|
+
- name: Publish
|
|
46
|
+
run: uv publish --token ${{ secrets.PYPI_API_TOKEN }}
|
|
47
|
+
|
|
48
|
+
- name: GitHub Release v${{ steps.bump.outputs.current-version }}
|
|
49
|
+
uses: ncipollo/release-action@v1
|
|
50
|
+
with:
|
|
51
|
+
name: pytest-asyncio-concurrent v${{ steps.bump.outputs.current-version }}
|
|
52
|
+
tag: v${{ steps.bump.outputs.current-version }}
|
|
53
|
+
body: "Automated release of version v${{ steps.bump.outputs.current-version }}"
|
|
54
|
+
artifacts: dist/*
|
|
55
|
+
token: ${{ secrets.GH_TOKEN }}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3.13
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Zane Chen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: gh-space-shooter
|
|
3
|
+
Version: 0.0.1
|
|
4
|
+
Summary: A CLI tool that visualizes GitHub contribution graphs as gamified GIFs
|
|
5
|
+
Author-email: zane <czl970721@gmail.com>
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
Requires-Python: >=3.13
|
|
8
|
+
Requires-Dist: httpx>=0.27.0
|
|
9
|
+
Requires-Dist: pillow>=10.0.0
|
|
10
|
+
Requires-Dist: python-dotenv>=1.0.0
|
|
11
|
+
Requires-Dist: rich>=13.0.0
|
|
12
|
+
Requires-Dist: typer>=0.12.0
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
|
|
15
|
+
# gh-space-shooter 🚀
|
|
16
|
+
|
|
17
|
+
Transform your GitHub contribution graph into an epic space shooter game!
|
|
18
|
+
|
|
19
|
+

|
|
20
|
+
|
|
21
|
+
## Features
|
|
22
|
+
|
|
23
|
+
- 🚀 **Galaga-style space shooter** - Classic arcade gameplay with your contribution data
|
|
24
|
+
- 📊 **GitHub integration** - Fetches your last 52 weeks of contributions automatically
|
|
25
|
+
- 🎮 **Smart enemy AI** - Multiple attack strategies (columns, rows, random patterns)
|
|
26
|
+
- 💥 **Particle effects** - Explosions with randomized particles and smooth animations
|
|
27
|
+
- 🎨 **Polished graphics** - Rounded enemies, smooth ship design, starfield background
|
|
28
|
+
- 📈 **Contribution stats** - View your coding activity statistics
|
|
29
|
+
- 💾 **Export options** - Save both the GIF and raw JSON data
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
### From PyPI (Recommended)
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
pip install gh-space-shooter
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### From Source
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Clone the repository
|
|
43
|
+
git clone https://github.com/yourusername/gh-space-shooter.git
|
|
44
|
+
cd gh-space-shooter
|
|
45
|
+
|
|
46
|
+
# Install with uv
|
|
47
|
+
uv sync
|
|
48
|
+
|
|
49
|
+
# Or with pip
|
|
50
|
+
pip install -e .
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Setup
|
|
54
|
+
|
|
55
|
+
1. Create a GitHub Personal Access Token:
|
|
56
|
+
- Go to https://github.com/settings/tokens
|
|
57
|
+
- Click "Generate new token (classic)"
|
|
58
|
+
- Select scopes: `read:user`
|
|
59
|
+
- Copy the generated token
|
|
60
|
+
|
|
61
|
+
2. Set up your environment:
|
|
62
|
+
```bash
|
|
63
|
+
# Copy the example env file
|
|
64
|
+
touch .env
|
|
65
|
+
echo "GH_TOKEN=your_token_here" >> .env
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Alternatively, export the token directly:
|
|
69
|
+
```bash
|
|
70
|
+
export GH_TOKEN=your_token_here
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Usage
|
|
74
|
+
|
|
75
|
+
### Generate Your Game GIF
|
|
76
|
+
|
|
77
|
+
Transform your GitHub contributions into an epic space shooter!
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Basic usage - generates username-gh-space-shooter.gif
|
|
81
|
+
gh-space-shooter <username>
|
|
82
|
+
|
|
83
|
+
# Examples
|
|
84
|
+
gh-space-shooter torvalds
|
|
85
|
+
gh-space-shooter octocat
|
|
86
|
+
|
|
87
|
+
# Specify custom output filename
|
|
88
|
+
gh-space-shooter torvalds --output my-epic-game.gif
|
|
89
|
+
gh-space-shooter torvalds -o my-game.gif
|
|
90
|
+
|
|
91
|
+
# Choose enemy attack strategy
|
|
92
|
+
gh-space-shooter torvalds --strategy column # Enemies attack in columns
|
|
93
|
+
gh-space-shooter torvalds --strategy row # Enemies attack in rows
|
|
94
|
+
gh-space-shooter torvalds -s random # Random chaos (default)
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
This creates an animated GIF showing:
|
|
98
|
+
- Your contribution graph as enemies (more contributions = stronger enemies)
|
|
99
|
+
- A Galaga-style spaceship battling through your coding history
|
|
100
|
+
- Enemy attack patterns based on your chosen strategy
|
|
101
|
+
- Smooth animations with randomized particle effects
|
|
102
|
+
- Your contribution stats displayed in the console
|
|
103
|
+
|
|
104
|
+
### Advanced Options
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
# Save raw contribution data to JSON
|
|
108
|
+
gh-space-shooter torvalds --raw-output data.json
|
|
109
|
+
|
|
110
|
+
# Load from previously saved JSON (saves API rate limits)
|
|
111
|
+
gh-space-shooter --raw-input data.json --output game.gif
|
|
112
|
+
|
|
113
|
+
# Combine options
|
|
114
|
+
gh-space-shooter torvalds -o game.gif -ro data.json -s column
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Data Format
|
|
118
|
+
|
|
119
|
+
When saved to JSON, the data includes:
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"username": "torvalds",
|
|
123
|
+
"total_contributions": 1234,
|
|
124
|
+
"weeks": [
|
|
125
|
+
{
|
|
126
|
+
"days": [
|
|
127
|
+
{
|
|
128
|
+
"date": "2024-01-01",
|
|
129
|
+
"count": 5,
|
|
130
|
+
"level": 2
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"fetched_at": "2024-12-30T12:00:00"
|
|
136
|
+
}
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## License
|
|
140
|
+
|
|
141
|
+
MIT
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
# gh-space-shooter 🚀
|
|
2
|
+
|
|
3
|
+
Transform your GitHub contribution graph into an epic space shooter game!
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
|
|
9
|
+
- 🚀 **Galaga-style space shooter** - Classic arcade gameplay with your contribution data
|
|
10
|
+
- 📊 **GitHub integration** - Fetches your last 52 weeks of contributions automatically
|
|
11
|
+
- 🎮 **Smart enemy AI** - Multiple attack strategies (columns, rows, random patterns)
|
|
12
|
+
- 💥 **Particle effects** - Explosions with randomized particles and smooth animations
|
|
13
|
+
- 🎨 **Polished graphics** - Rounded enemies, smooth ship design, starfield background
|
|
14
|
+
- 📈 **Contribution stats** - View your coding activity statistics
|
|
15
|
+
- 💾 **Export options** - Save both the GIF and raw JSON data
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
### From PyPI (Recommended)
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install gh-space-shooter
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### From Source
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
# Clone the repository
|
|
29
|
+
git clone https://github.com/yourusername/gh-space-shooter.git
|
|
30
|
+
cd gh-space-shooter
|
|
31
|
+
|
|
32
|
+
# Install with uv
|
|
33
|
+
uv sync
|
|
34
|
+
|
|
35
|
+
# Or with pip
|
|
36
|
+
pip install -e .
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Setup
|
|
40
|
+
|
|
41
|
+
1. Create a GitHub Personal Access Token:
|
|
42
|
+
- Go to https://github.com/settings/tokens
|
|
43
|
+
- Click "Generate new token (classic)"
|
|
44
|
+
- Select scopes: `read:user`
|
|
45
|
+
- Copy the generated token
|
|
46
|
+
|
|
47
|
+
2. Set up your environment:
|
|
48
|
+
```bash
|
|
49
|
+
# Copy the example env file
|
|
50
|
+
touch .env
|
|
51
|
+
echo "GH_TOKEN=your_token_here" >> .env
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Alternatively, export the token directly:
|
|
55
|
+
```bash
|
|
56
|
+
export GH_TOKEN=your_token_here
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Usage
|
|
60
|
+
|
|
61
|
+
### Generate Your Game GIF
|
|
62
|
+
|
|
63
|
+
Transform your GitHub contributions into an epic space shooter!
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
# Basic usage - generates username-gh-space-shooter.gif
|
|
67
|
+
gh-space-shooter <username>
|
|
68
|
+
|
|
69
|
+
# Examples
|
|
70
|
+
gh-space-shooter torvalds
|
|
71
|
+
gh-space-shooter octocat
|
|
72
|
+
|
|
73
|
+
# Specify custom output filename
|
|
74
|
+
gh-space-shooter torvalds --output my-epic-game.gif
|
|
75
|
+
gh-space-shooter torvalds -o my-game.gif
|
|
76
|
+
|
|
77
|
+
# Choose enemy attack strategy
|
|
78
|
+
gh-space-shooter torvalds --strategy column # Enemies attack in columns
|
|
79
|
+
gh-space-shooter torvalds --strategy row # Enemies attack in rows
|
|
80
|
+
gh-space-shooter torvalds -s random # Random chaos (default)
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
This creates an animated GIF showing:
|
|
84
|
+
- Your contribution graph as enemies (more contributions = stronger enemies)
|
|
85
|
+
- A Galaga-style spaceship battling through your coding history
|
|
86
|
+
- Enemy attack patterns based on your chosen strategy
|
|
87
|
+
- Smooth animations with randomized particle effects
|
|
88
|
+
- Your contribution stats displayed in the console
|
|
89
|
+
|
|
90
|
+
### Advanced Options
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# Save raw contribution data to JSON
|
|
94
|
+
gh-space-shooter torvalds --raw-output data.json
|
|
95
|
+
|
|
96
|
+
# Load from previously saved JSON (saves API rate limits)
|
|
97
|
+
gh-space-shooter --raw-input data.json --output game.gif
|
|
98
|
+
|
|
99
|
+
# Combine options
|
|
100
|
+
gh-space-shooter torvalds -o game.gif -ro data.json -s column
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Data Format
|
|
104
|
+
|
|
105
|
+
When saved to JSON, the data includes:
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"username": "torvalds",
|
|
109
|
+
"total_contributions": 1234,
|
|
110
|
+
"weeks": [
|
|
111
|
+
{
|
|
112
|
+
"days": [
|
|
113
|
+
{
|
|
114
|
+
"date": "2024-01-01",
|
|
115
|
+
"count": 5,
|
|
116
|
+
"level": 2
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"fetched_at": "2024-12-30T12:00:00"
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## License
|
|
126
|
+
|
|
127
|
+
MIT
|