portfetch 2.3.0__py3-none-any.whl
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.
- portfetch/__init__.py +3 -0
- portfetch/__main__.py +3 -0
- portfetch/art.py +143 -0
- portfetch/cli.py +262 -0
- portfetch/core.py +126 -0
- portfetch/panel.py +52 -0
- portfetch/stats.py +117 -0
- portfetch/svg.py +435 -0
- portfetch/themes.py +88 -0
- portfetch-2.3.0.dist-info/METADATA +350 -0
- portfetch-2.3.0.dist-info/RECORD +15 -0
- portfetch-2.3.0.dist-info/WHEEL +5 -0
- portfetch-2.3.0.dist-info/entry_points.txt +2 -0
- portfetch-2.3.0.dist-info/licenses/LICENSE +21 -0
- portfetch-2.3.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: portfetch
|
|
3
|
+
Version: 2.3.0
|
|
4
|
+
Summary: Your photo as an ASCII portrait in a neofetch-style GitHub profile card, rendered as animated SVG.
|
|
5
|
+
Author: Ethan Brown
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/ethanbrownecon/portfetch
|
|
8
|
+
Keywords: github-profile,readme,ascii-art,neofetch,svg
|
|
9
|
+
Classifier: Programming Language :: Python :: 3
|
|
10
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Requires-Python: >=3.10
|
|
13
|
+
Description-Content-Type: text/markdown
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Requires-Dist: Pillow>=10
|
|
16
|
+
Requires-Dist: PyYAML>=6
|
|
17
|
+
Provides-Extra: test
|
|
18
|
+
Requires-Dist: pytest>=8; extra == "test"
|
|
19
|
+
Dynamic: license-file
|
|
20
|
+
|
|
21
|
+
<h1 align="center">portfetch</h1>
|
|
22
|
+
|
|
23
|
+
<p align="center"><b>Your photo as an ASCII portrait, in an animated neofetch-style card for your GitHub profile.</b></p>
|
|
24
|
+
|
|
25
|
+
<p align="center">
|
|
26
|
+
<a href="https://github.com/ethanbrownecon/portfetch/actions/workflows/ci.yml"><img src="https://github.com/ethanbrownecon/portfetch/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
|
|
27
|
+
<a href="https://github.com/ethanbrownecon/portfetch/releases"><img src="https://img.shields.io/github/v/release/ethanbrownecon/portfetch?color=1f6feb" alt="Latest release"></a>
|
|
28
|
+
<img src="https://img.shields.io/badge/python-3.10%2B-3776ab" alt="Python 3.10+">
|
|
29
|
+
<img src="https://img.shields.io/badge/JavaScript-none-8b949e" alt="No JavaScript">
|
|
30
|
+
<a href="LICENSE"><img src="https://img.shields.io/github/license/ethanbrownecon/portfetch?color=2ea043" alt="MIT license"></a>
|
|
31
|
+
</p>
|
|
32
|
+
|
|
33
|
+
<p align="center"><img src="example/portfetch-showcase.svg" alt="One portfetch card cycling through six looks: boot animation on GitHub dark, typewriter on Dracula in a macOS window, decode on Tokyo Night, scan on a green screen, fade on Catppuccin Latte, and boot on Gruvbox" width="100%"></p>
|
|
34
|
+
|
|
35
|
+
<p align="center"><sub>One config, six looks. This image is made by <code>portfetch showcase</code>, and it loops.</sub></p>
|
|
36
|
+
|
|
37
|
+
<p align="center">
|
|
38
|
+
<a href="#quick-start">Quick start</a> ·
|
|
39
|
+
<a href="#gallery">Gallery</a> ·
|
|
40
|
+
<a href="#commands">Commands</a> ·
|
|
41
|
+
<a href="#config-reference">Config</a> ·
|
|
42
|
+
<a href="#show-us-yours">Show us yours</a>
|
|
43
|
+
</p>
|
|
44
|
+
|
|
45
|
+
Give portfetch a headshot and a short YAML file. It turns the photo into ASCII art, sets your details beside it in aligned `Key: ...... value` lines, and writes a light and a dark SVG that follow each visitor's GitHub theme. The card can animate when someone opens your profile, and a GitHub Action rebuilds it every day so live numbers like stars, commits and uptime stay current.
|
|
46
|
+
|
|
47
|
+
* **Your face, not a logo.** Background removal, contrast and tone controls, and five character sets turn an ordinary headshot into clean ASCII art.
|
|
48
|
+
* **Six animations, twelve themes, three window styles.** Mix them freely, or put several in one looping showcase.
|
|
49
|
+
* **Made for GitHub.** Pure SVG and CSS, no scripts, no web fonts. Columns line up in any monospace font, and visitors who turn off motion see a finished, still card.
|
|
50
|
+
* **Live numbers.** Stars, repos, followers, commits, top languages and uptime, refreshed daily by the Action.
|
|
51
|
+
* **One command to start.** `portfetch init --github you` writes the config, the workflow and the README snippet.
|
|
52
|
+
|
|
53
|
+
Live example: [github.com/ethanbrownecon](https://github.com/ethanbrownecon).
|
|
54
|
+
|
|
55
|
+
## Quick start
|
|
56
|
+
|
|
57
|
+
Run these in your profile repository (the public repo named after your username):
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
pipx install git+https://github.com/ethanbrownecon/portfetch # or: pip install git+https://...
|
|
61
|
+
portfetch init --github YOUR_USERNAME --photo assets/photo.jpg # starter config + workflow
|
|
62
|
+
portfetch preview --all # opens every animation style in your browser
|
|
63
|
+
portfetch render # writes assets/portfetch-light.svg and -dark.svg
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
`init` fills the config from your public profile and writes `.github/workflows/portfetch.yml`. It also prints this snippet for your `README.md`:
|
|
67
|
+
|
|
68
|
+
```html
|
|
69
|
+
<picture>
|
|
70
|
+
<source media="(prefers-color-scheme: dark)" srcset="assets/portfetch-dark.svg">
|
|
71
|
+
<img alt="Your name: profile card" src="assets/portfetch-light.svg">
|
|
72
|
+
</picture>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Commit everything and push. From then on the workflow re-renders the card every day and whenever you change the config or the photo.
|
|
76
|
+
|
|
77
|
+
Python 3.10 or newer is required. The only dependencies are Pillow and PyYAML.
|
|
78
|
+
|
|
79
|
+
### Getting a good portrait
|
|
80
|
+
|
|
81
|
+
* A plain backdrop works best. `remove_background: true` flood-fills a gray or off-white wall from the edges and stops at your outline, so a light shirt survives. For a busy background, cut yourself out first with a tool like [remove.bg](https://www.remove.bg).
|
|
82
|
+
* Crop to head and shoulders and commit a resized copy (about 1000px tall). Everything in a public repo is public, and a 6MB original makes every clone slower.
|
|
83
|
+
* Run `portfetch preview` while you adjust `columns`, `charset`, `contrast` and `brightness`. The Replay button restarts the animation.
|
|
84
|
+
|
|
85
|
+
## Gallery
|
|
86
|
+
|
|
87
|
+
Every option, side by side. Each card names its own settings, and the animated ones replay every few seconds.
|
|
88
|
+
|
|
89
|
+
### Animations
|
|
90
|
+
|
|
91
|
+
<table>
|
|
92
|
+
<tr><td align="center" width="50%"><img src="docs/gallery/animation-boot.svg" alt="boot animation" width="100%"><br><code>boot</code></td><td align="center" width="50%"><img src="docs/gallery/animation-typewriter.svg" alt="typewriter animation" width="100%"><br><code>typewriter</code></td></tr>
|
|
93
|
+
<tr><td align="center" width="50%"><img src="docs/gallery/animation-decode.svg" alt="decode animation" width="100%"><br><code>decode</code></td><td align="center" width="50%"><img src="docs/gallery/animation-scan.svg" alt="scan animation" width="100%"><br><code>scan</code></td></tr>
|
|
94
|
+
<tr><td align="center" width="50%"><img src="docs/gallery/animation-fade.svg" alt="fade animation" width="100%"><br><code>fade</code></td></tr>
|
|
95
|
+
</table>
|
|
96
|
+
|
|
97
|
+
### Themes
|
|
98
|
+
|
|
99
|
+
<table>
|
|
100
|
+
<tr><td align="center" width="33%"><img src="docs/gallery/theme-github-dark.svg" alt="github-dark theme" width="100%"><br><code>github-dark</code></td><td align="center" width="33%"><img src="docs/gallery/theme-github-light.svg" alt="github-light theme" width="100%"><br><code>github-light</code></td><td align="center" width="33%"><img src="docs/gallery/theme-dracula.svg" alt="dracula theme" width="100%"><br><code>dracula</code></td></tr>
|
|
101
|
+
<tr><td align="center" width="33%"><img src="docs/gallery/theme-nord.svg" alt="nord theme" width="100%"><br><code>nord</code></td><td align="center" width="33%"><img src="docs/gallery/theme-tokyo-night.svg" alt="tokyo-night theme" width="100%"><br><code>tokyo-night</code></td><td align="center" width="33%"><img src="docs/gallery/theme-catppuccin-mocha.svg" alt="catppuccin-mocha theme" width="100%"><br><code>catppuccin-mocha</code></td></tr>
|
|
102
|
+
<tr><td align="center" width="33%"><img src="docs/gallery/theme-catppuccin-latte.svg" alt="catppuccin-latte theme" width="100%"><br><code>catppuccin-latte</code></td><td align="center" width="33%"><img src="docs/gallery/theme-gruvbox-dark.svg" alt="gruvbox-dark theme" width="100%"><br><code>gruvbox-dark</code></td><td align="center" width="33%"><img src="docs/gallery/theme-gruvbox-light.svg" alt="gruvbox-light theme" width="100%"><br><code>gruvbox-light</code></td></tr>
|
|
103
|
+
<tr><td align="center" width="33%"><img src="docs/gallery/theme-solarized-dark.svg" alt="solarized-dark theme" width="100%"><br><code>solarized-dark</code></td><td align="center" width="33%"><img src="docs/gallery/theme-solarized-light.svg" alt="solarized-light theme" width="100%"><br><code>solarized-light</code></td><td align="center" width="33%"><img src="docs/gallery/theme-green-screen.svg" alt="green-screen theme" width="100%"><br><code>green-screen</code></td></tr>
|
|
104
|
+
</table>
|
|
105
|
+
|
|
106
|
+
### Windows
|
|
107
|
+
|
|
108
|
+
<table>
|
|
109
|
+
<tr><td align="center" width="33%"><img src="docs/gallery/window-card.svg" alt="card window" width="100%"><br><code>card</code></td><td align="center" width="33%"><img src="docs/gallery/window-macos.svg" alt="macos window" width="100%"><br><code>macos</code></td><td align="center" width="33%"><img src="docs/gallery/window-none.svg" alt="none window" width="100%"><br><code>none</code></td></tr>
|
|
110
|
+
</table>
|
|
111
|
+
|
|
112
|
+
### Character sets
|
|
113
|
+
|
|
114
|
+
<table>
|
|
115
|
+
<tr><td align="center" width="33%"><img src="docs/gallery/charset-letters.svg" alt="letters charset" width="100%"><br><code>letters</code></td><td align="center" width="33%"><img src="docs/gallery/charset-detailed.svg" alt="detailed charset" width="100%"><br><code>detailed</code></td><td align="center" width="33%"><img src="docs/gallery/charset-simple.svg" alt="simple charset" width="100%"><br><code>simple</code></td></tr>
|
|
116
|
+
<tr><td align="center" width="33%"><img src="docs/gallery/charset-dots.svg" alt="dots charset" width="100%"><br><code>dots</code></td><td align="center" width="33%"><img src="docs/gallery/charset-binary.svg" alt="binary charset" width="100%"><br><code>binary</code></td></tr>
|
|
117
|
+
</table>
|
|
118
|
+
|
|
119
|
+
You can also pass your own string, ordered from light to dense: `charset: " .oO@"`.
|
|
120
|
+
|
|
121
|
+
## Commands
|
|
122
|
+
|
|
123
|
+
| Command | What it does |
|
|
124
|
+
| --- | --- |
|
|
125
|
+
| `portfetch init` | Write a starter `portfetch.yml` and workflow. `--github USER` fills in your profile, `--photo PATH` sets the portrait. |
|
|
126
|
+
| `portfetch render` | Write the SVGs. `--offline` skips the GitHub API and uses sample numbers. |
|
|
127
|
+
| `portfetch preview` | Open a local page with the light and dark cards. `--all` adds every animation style. |
|
|
128
|
+
| `portfetch showcase` | Write one SVG that cycles through several animations, themes and windows. `-o PATH` sets the file. |
|
|
129
|
+
| `portfetch print` | Print the card in your terminal, in color. |
|
|
130
|
+
| `portfetch themes` | List the color themes with swatches. |
|
|
131
|
+
| `portfetch animations` | List the animation and window styles. |
|
|
132
|
+
|
|
133
|
+
All commands take `-c PATH` for a config file other than `portfetch.yml`.
|
|
134
|
+
|
|
135
|
+
## GitHub Action
|
|
136
|
+
|
|
137
|
+
`portfetch init` writes this for you:
|
|
138
|
+
|
|
139
|
+
```yaml
|
|
140
|
+
name: portfetch
|
|
141
|
+
on:
|
|
142
|
+
workflow_dispatch:
|
|
143
|
+
schedule:
|
|
144
|
+
- cron: "0 6 * * *"
|
|
145
|
+
push:
|
|
146
|
+
branches: [main]
|
|
147
|
+
paths: ["portfetch.yml", "assets/**"]
|
|
148
|
+
permissions:
|
|
149
|
+
contents: write
|
|
150
|
+
jobs:
|
|
151
|
+
render:
|
|
152
|
+
runs-on: ubuntu-latest
|
|
153
|
+
steps:
|
|
154
|
+
- uses: actions/checkout@v4
|
|
155
|
+
- uses: ethanbrownecon/portfetch@v2.3.0
|
|
156
|
+
# with:
|
|
157
|
+
# config: portfetch.yml
|
|
158
|
+
# commit-message: Update portfetch card
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
The action renders the cards and commits them only when they changed.
|
|
162
|
+
|
|
163
|
+
## Animations
|
|
164
|
+
|
|
165
|
+
Set `animation:` to a style name, or to a mapping for more control:
|
|
166
|
+
|
|
167
|
+
```yaml
|
|
168
|
+
animation:
|
|
169
|
+
style: boot # see the table
|
|
170
|
+
duration: 2.5 # seconds for the whole intro
|
|
171
|
+
delay: 0.2 # seconds before it starts
|
|
172
|
+
cursor: true # a blinking prompt under the info lines
|
|
173
|
+
prompt: "~ $" # text before the cursor, after your header
|
|
174
|
+
loop: 4 # optional: hold the finished card 4 seconds, then replay forever
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
| Style | What visitors see |
|
|
178
|
+
| --- | --- |
|
|
179
|
+
| `none` | A still card. |
|
|
180
|
+
| `fade` | The portrait fades in, then the info lines rise in one after another. |
|
|
181
|
+
| `boot` | The portrait draws row by row, then the info prints line by line, like a boot log. |
|
|
182
|
+
| `typewriter` | The portrait fades in while every info line types itself out. |
|
|
183
|
+
| `scan` | A scanline sweeps down and reveals the portrait, then the info fades in. |
|
|
184
|
+
| `decode` | The portrait flickers through random characters before it resolves. |
|
|
185
|
+
|
|
186
|
+
By default animations play once, when the page loads; `loop` makes them replay. Visitors who turn on reduced motion in their system settings see the finished card with no animation.
|
|
187
|
+
|
|
188
|
+
## Showcase
|
|
189
|
+
|
|
190
|
+
`portfetch showcase` puts several versions of your card in one SVG. Each one plays its intro, holds, and crossfades into the next, forever. The next card fades in on top of the current one, so the image never flashes empty. It's how the image at the top of this page was made, and it works as a profile card too if you can't pick one look.
|
|
191
|
+
|
|
192
|
+
```yaml
|
|
193
|
+
showcase:
|
|
194
|
+
output: assets/portfetch-showcase.svg # `portfetch render` and the Action keep it updated
|
|
195
|
+
hold: 2.5 # seconds each finished card stays up
|
|
196
|
+
fade: 0.9 # seconds for each crossfade
|
|
197
|
+
scenes: # optional; without it you get the six above
|
|
198
|
+
- {animation: boot, theme: github-dark, window: card}
|
|
199
|
+
- {animation: typewriter, theme: dracula, window: macos}
|
|
200
|
+
- {animation: decode, theme: {preset: nord, key: "#ff7b72"}, caption: "my favorite"}
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
Each scene takes `animation` (a name or a mapping), `theme` (a preset or a mapping), `window` and `caption`. The default caption names the combination; set `caption: ""` to hide it. Visitors with reduced motion see only the first scene, standing still.
|
|
204
|
+
|
|
205
|
+
| Scene | Animation | Theme | Window |
|
|
206
|
+
| --- | --- | --- | --- |
|
|
207
|
+
| 1 | `boot` | `github-dark` | `card` |
|
|
208
|
+
| 2 | `typewriter` | `dracula` | `macos` |
|
|
209
|
+
| 3 | `decode` | `tokyo-night` | `card` |
|
|
210
|
+
| 4 | `scan` | `green-screen` | `macos` |
|
|
211
|
+
| 5 | `fade` | `catppuccin-latte` | `card` |
|
|
212
|
+
| 6 | `boot` | `gruvbox-dark` | `macos` |
|
|
213
|
+
|
|
214
|
+
## Windows
|
|
215
|
+
|
|
216
|
+
| `window:` | Look |
|
|
217
|
+
| --- | --- |
|
|
218
|
+
| `card` | A rounded card with a thin border (the default). |
|
|
219
|
+
| `macos` | A terminal window with traffic lights and a title bar. Set `title:` to change the title. |
|
|
220
|
+
| `none` | No frame or background, so the card sits directly on the page. |
|
|
221
|
+
|
|
222
|
+
## Themes
|
|
223
|
+
|
|
224
|
+
Each output (`light`, `dark`, or any name you add) takes a preset, optionally with colors overridden:
|
|
225
|
+
|
|
226
|
+
```yaml
|
|
227
|
+
theme:
|
|
228
|
+
light: catppuccin-latte
|
|
229
|
+
dark:
|
|
230
|
+
preset: tokyo-night
|
|
231
|
+
key: "#ff9e64"
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Presets: `github-light`, `github-dark` (the defaults), `dracula`, `nord`, `tokyo-night`, `catppuccin-mocha`, `catppuccin-latte`, `gruvbox-dark`, `gruvbox-light`, `solarized-dark`, `solarized-light` and `green-screen`.
|
|
235
|
+
|
|
236
|
+
Colors you can override: `background`, `border`, `titlebar`, `art`, `header`, `key`, `value`, `dots`, `section`, `cursor`.
|
|
237
|
+
|
|
238
|
+
To ship one theme only, list one output: `output: {dark: assets/card.svg}`.
|
|
239
|
+
|
|
240
|
+
## Config reference
|
|
241
|
+
|
|
242
|
+
```yaml
|
|
243
|
+
header: you@github # first line of the panel; also the window title and prompt
|
|
244
|
+
width: 58 # panel width in characters; every line is padded to this
|
|
245
|
+
font_size: 14 # panel font size in px (line_height, padding, gap also work)
|
|
246
|
+
github_user: you # enables the GitHub placeholders
|
|
247
|
+
uptime_since: 2020-04-01 # enables {uptime}, e.g. "6 years, 7 months, 29 days"
|
|
248
|
+
|
|
249
|
+
ascii:
|
|
250
|
+
image: assets/photo.jpg # or `text: art.txt` for ASCII art you made yourself
|
|
251
|
+
columns: 64 # art width in characters; more columns, more detail
|
|
252
|
+
charset: letters # detailed | letters | simple | dots | binary | your own string
|
|
253
|
+
contrast: 1.3 # 1.0 = unchanged
|
|
254
|
+
brightness: 1.0
|
|
255
|
+
crop: [0.1, 0, 0.9, 1] # optional [left, top, right, bottom] as fractions
|
|
256
|
+
remove_background: true # flood-fill a plain backdrop from the edges
|
|
257
|
+
background_tolerance: 18 # how much the backdrop may vary between neighboring cells
|
|
258
|
+
background_threshold: 245 # pixels brighter than this become blank (0-255)
|
|
259
|
+
equalize: false # spread the subject's tones across the whole charset
|
|
260
|
+
invert: false # dense characters for bright pixels instead of dark ones
|
|
261
|
+
font_size: 8 # optional; by default the art matches the panel height
|
|
262
|
+
|
|
263
|
+
animation: boot # or a mapping, see Animations
|
|
264
|
+
window: card # card | macos | none
|
|
265
|
+
|
|
266
|
+
lines:
|
|
267
|
+
- Role: Data scientist # "Key: value" becomes ". Key: ........ value"
|
|
268
|
+
- Research: Causal inference
|
|
269
|
+
- Research: Labor economics # keys can repeat
|
|
270
|
+
- Methods.Learning: Reinforcement learning # and contain dots
|
|
271
|
+
- # a bare dash is a blank "." spacer
|
|
272
|
+
- section: Contact # a "─ Contact ─────" divider
|
|
273
|
+
- Stars: "{stars}" # placeholders are filled at render time
|
|
274
|
+
- Plain text works too
|
|
275
|
+
|
|
276
|
+
output:
|
|
277
|
+
light: assets/portfetch-light.svg
|
|
278
|
+
dark: assets/portfetch-dark.svg
|
|
279
|
+
|
|
280
|
+
showcase: # optional, see Showcase
|
|
281
|
+
output: assets/portfetch-showcase.svg
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Placeholders
|
|
285
|
+
|
|
286
|
+
| Placeholder | Value |
|
|
287
|
+
| --- | --- |
|
|
288
|
+
| `{repos}`, `{stars}`, `{forks}` | Public repos you own (not forks), and their stars and forks |
|
|
289
|
+
| `{followers}`, `{following}`, `{gists}` | From your profile |
|
|
290
|
+
| `{joined}` | The year you joined GitHub |
|
|
291
|
+
| `{commits}` | Public commits you authored, from the commit search API |
|
|
292
|
+
| `{prs}` | Pull requests you opened |
|
|
293
|
+
| `{top_language}`, `{top_languages}` | Your most common repo language, or the top three |
|
|
294
|
+
| `{uptime}` | Time since `uptime_since` |
|
|
295
|
+
| `{updated}`, `{year}` | The render date and year |
|
|
296
|
+
|
|
297
|
+
Numbers get thousands separators. Locally, portfetch uses `GITHUB_TOKEN`, `GH_TOKEN` or `gh auth token` if available; without a token it still works, with lower API rate limits.
|
|
298
|
+
|
|
299
|
+
Links can't be clickable inside an SVG shown as an image, so put them in Markdown under the card:
|
|
300
|
+
|
|
301
|
+
```markdown
|
|
302
|
+
[Website](https://example.com) · [LinkedIn](https://linkedin.com/in/you) · [Email](mailto:you@example.com)
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
## How it works
|
|
306
|
+
|
|
307
|
+
GitHub shows README images through `<img>`, which allows CSS animation but no scripts and no web fonts. portfetch is built around those limits:
|
|
308
|
+
|
|
309
|
+
* **Alignment in any font.** Visitors see the card in their own monospace font, and those differ in width. Every line has the same character count and a fixed `textLength`, so the browser adjusts letter spacing to fit and the columns line up in Menlo, Consolas or DejaVu Sans Mono alike.
|
|
310
|
+
* **Proportions.** A monospace glyph is about 0.6 times as wide as it is tall, so the photo is squashed vertically before it's sampled. The portrait keeps its shape.
|
|
311
|
+
* **Animation that fails safe.** Every element is visible in its resting state. The animations only hide things while they run, so if animation is turned off, the card is still complete.
|
|
312
|
+
* **One clock per file.** Each animated element is an event with a start time and a length. For a one-time intro those become CSS delays. For loops and the showcase, every event becomes keyframes placed inside one shared period, so many cards can take turns in a single image without JavaScript.
|
|
313
|
+
|
|
314
|
+
## Show us yours
|
|
315
|
+
|
|
316
|
+
Made a card you like? Post it in [Show and tell](https://github.com/ethanbrownecon/portfetch/discussions/categories/show-and-tell) or open a pull request that adds your profile here.
|
|
317
|
+
|
|
318
|
+
* [ethanbrownecon](https://github.com/ethanbrownecon): boot animation, GitHub themes
|
|
319
|
+
|
|
320
|
+
If portfetch made your profile, a small credit helps others find it:
|
|
321
|
+
|
|
322
|
+
```markdown
|
|
323
|
+
<sub>Profile card made with [portfetch](https://github.com/ethanbrownecon/portfetch)</sub>
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
or as a badge: [](https://github.com/ethanbrownecon/portfetch)
|
|
327
|
+
|
|
328
|
+
```markdown
|
|
329
|
+
[](https://github.com/ethanbrownecon/portfetch)
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
## Development
|
|
333
|
+
|
|
334
|
+
```sh
|
|
335
|
+
git clone https://github.com/ethanbrownecon/portfetch && cd portfetch
|
|
336
|
+
python -m venv .venv && .venv/bin/pip install -e ".[test]"
|
|
337
|
+
.venv/bin/pytest
|
|
338
|
+
.venv/bin/portfetch preview -c example/portfetch.yml --all --offline
|
|
339
|
+
.venv/bin/python scripts/gallery.py # rebuild the gallery images
|
|
340
|
+
```
|
|
341
|
+
|
|
342
|
+
Ideas, bug reports and new themes are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
343
|
+
|
|
344
|
+
## Credits
|
|
345
|
+
|
|
346
|
+
The card follows the layout of [neofetch](https://github.com/dylanaraps/neofetch) and its successors. [readmefetch](https://github.com/aurelioochoa/readmefetch) by aurelioochoa showed what an animated, terminal-style profile README can do; portfetch takes a different route, turning your own photo into the art. Thanks also to the profile READMEs that put ASCII portraits next to neofetch panels.
|
|
347
|
+
|
|
348
|
+
## License
|
|
349
|
+
|
|
350
|
+
MIT
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
portfetch/__init__.py,sha256=7mammxkj9uyYfgE6PcRERe3vagSh5Rj5JMg0-LootGs,106
|
|
2
|
+
portfetch/__main__.py,sha256=Zl6r1Brt-2KPI8_4ifgVf_POXp8MRxORkFMoZTAl9Nc,39
|
|
3
|
+
portfetch/art.py,sha256=lxBE7DaaZgS98N7ec5qMxUOH9BWWj-1hsN8iR6nTV_k,5108
|
|
4
|
+
portfetch/cli.py,sha256=jCPURbHckxXsITr_BQmXfIZfIbp-d6yUaq9aKmOR-QY,10407
|
|
5
|
+
portfetch/core.py,sha256=eaTyr5p8qlcwSV8J_A1vO__ighlpg1dZOjJYyVU1_tc,5000
|
|
6
|
+
portfetch/panel.py,sha256=djyGumNu922bMjy3G8_Xfss8viwF7MCrfu_8eKrxLX4,2000
|
|
7
|
+
portfetch/stats.py,sha256=Tk8nGBV5HuUN4nvTvxX7u9VOyBTx_N_QFAOtXVOBvio,4243
|
|
8
|
+
portfetch/svg.py,sha256=le7nZx6mqEf26fv_PjviACZWoIGlh2qad4FDM05srUY,18308
|
|
9
|
+
portfetch/themes.py,sha256=zc2zuOp660vrXvNoq9B1IYJE-fZoAyK_Vwf7Fgq5YJ0,4285
|
|
10
|
+
portfetch-2.3.0.dist-info/licenses/LICENSE,sha256=vvQYGJkxx_vGExb4ZfIpvZ1LB-Lf9UezA9j51IkoUSA,1068
|
|
11
|
+
portfetch-2.3.0.dist-info/METADATA,sha256=IbM4RdhF2-GvWyEFBFh2HCx_jpMG2HIfNKtdVRshmpI,19509
|
|
12
|
+
portfetch-2.3.0.dist-info/WHEEL,sha256=mOdXR9C3wMVov7cSY8PY-XCzo3SmmWCHvGQr5csJoao,91
|
|
13
|
+
portfetch-2.3.0.dist-info/entry_points.txt,sha256=_2A4T9QM2Resl-VyiB2d_1YBvza5mP_3Rlo76gMz8Cs,49
|
|
14
|
+
portfetch-2.3.0.dist-info/top_level.txt,sha256=Sw7mViFpQINC39CTDCbifoSkq3MXApI7bFy1021tNPk,10
|
|
15
|
+
portfetch-2.3.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ethan Brown
|
|
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 all
|
|
13
|
+
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 THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
portfetch
|