anifetch-cli 1.0.2__tar.gz → 1.0.5__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.
- {anifetch_cli-1.0.2/src/anifetch_cli.egg-info → anifetch_cli-1.0.5}/PKG-INFO +70 -43
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5}/README.md +65 -38
- anifetch_cli-1.0.5/pyproject.toml +60 -0
- anifetch_cli-1.0.5/src/anifetch/ansi2txt.py +56 -0
- anifetch_cli-1.0.5/src/anifetch/ansi_process.py +226 -0
- anifetch_cli-1.0.5/src/anifetch/ansi_process2.py +199 -0
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5}/src/anifetch/cli.py +11 -1
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5}/src/anifetch/core.py +86 -43
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5}/src/anifetch/renderer.py +14 -3
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5}/src/anifetch/utils.py +126 -11
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5/src/anifetch_cli.egg-info}/PKG-INFO +70 -43
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5}/src/anifetch_cli.egg-info/SOURCES.txt +3 -0
- anifetch_cli-1.0.5/src/anifetch_cli.egg-info/requires.txt +4 -0
- anifetch_cli-1.0.2/pyproject.toml +0 -56
- anifetch_cli-1.0.2/src/anifetch_cli.egg-info/requires.txt +0 -4
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5}/LICENSE +0 -0
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5}/setup.cfg +0 -0
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5}/src/anifetch/__init__.py +0 -0
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5}/src/anifetch/__main__.py +0 -0
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5}/src/anifetch/assets/example.mp4 +0 -0
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5}/src/anifetch/keyreader.py +0 -0
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5}/src/anifetch_cli.egg-info/dependency_links.txt +0 -0
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5}/src/anifetch_cli.egg-info/entry_points.txt +0 -0
- {anifetch_cli-1.0.2 → anifetch_cli-1.0.5}/src/anifetch_cli.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: anifetch-cli
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.5
|
|
4
4
|
Summary: Animated terminal fetch with video and audio support.
|
|
5
5
|
Author-email: Notenlish <notenlish@gmail.com>
|
|
6
6
|
Maintainer: Immelancholy
|
|
@@ -19,10 +19,10 @@ Classifier: Operating System :: MacOS
|
|
|
19
19
|
Requires-Python: >=3.11
|
|
20
20
|
Description-Content-Type: text/markdown
|
|
21
21
|
License-File: LICENSE
|
|
22
|
-
Requires-Dist: platformdirs
|
|
23
|
-
Requires-Dist: wcwidth
|
|
24
|
-
Requires-Dist: rich
|
|
25
|
-
Requires-Dist: pynput
|
|
22
|
+
Requires-Dist: platformdirs==4.5.1
|
|
23
|
+
Requires-Dist: wcwidth==0.2.14
|
|
24
|
+
Requires-Dist: rich==14.3.1
|
|
25
|
+
Requires-Dist: pynput==1.8.1
|
|
26
26
|
Dynamic: license-file
|
|
27
27
|
|
|
28
28
|

|
|
@@ -33,11 +33,34 @@ This is a small tool built with fastfetch/neofetch, ffmpeg and chafa. It allows
|
|
|
33
33
|
|
|
34
34
|
## Installation
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
**Quick Links Installation Guide For:**
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
[Linux](#installation-for-linux-system) • [Windows](#installation-for-windows-winget-or-scoop) • [macOS](#installation-for-macos-homebrew) • [Manual](#manual-installation) • [Development](#developer-installation)
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
### Installation for Linux System
|
|
41
|
+
Recommended Python version: 3.11 and later.
|
|
42
|
+
|
|
43
|
+
#### Installation for Arch / Arch-based distros (Community maintained)
|
|
44
|
+
|
|
45
|
+
Anifetch is available in the AUR package [anifetch-cli](https://aur.archlinux.org/packages/anifetch-cli), maintained by @AmmarSyamil.
|
|
46
|
+
|
|
47
|
+
Install it from the terminal. For example, with Yay:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
yay -S anifetch-cli
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
After installation, run this to test if anifetch was installed correctly:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
anifetch example.mp4
|
|
57
|
+
```
|
|
58
|
+
Please read our [User guide](#user-guide) for more info on how to use anifetch.
|
|
59
|
+
|
|
60
|
+
#### Installation for other Linux Distro.
|
|
61
|
+
If you use NixOS refer to Installation for [NixOS](#installation-for-nixos).
|
|
62
|
+
|
|
63
|
+
Install it from the terminal. For example, with Yay:
|
|
41
64
|
|
|
42
65
|
```bash
|
|
43
66
|
curl https://raw.githubusercontent.com/Notenlish/anifetch/refs/heads/main/install.sh | bash
|
|
@@ -72,7 +95,9 @@ After installing the necessary dependencies using winget/scoop, install anifetch
|
|
|
72
95
|
> [!WARNING]
|
|
73
96
|
> **Do not** install `anifetch` on pypi, it is not related with this project. Install `anifetch-cli`.
|
|
74
97
|
|
|
75
|
-
|
|
98
|
+
Please read our [Post installation](#post-installation) and [User guide](#user-guide) for more info on how to use anifetch.
|
|
99
|
+
|
|
100
|
+
### Installation for macOS (HomeBrew)
|
|
76
101
|
|
|
77
102
|
Install homebrew if you haven't installed it already by following the guide [here](https://brew.sh/).
|
|
78
103
|
|
|
@@ -127,7 +152,6 @@ You can then run the `anifetch` command directly in your terminal.
|
|
|
127
152
|
|
|
128
153
|
Since pipx installs packages in an isolated environment, you won't have to worry about dependency conflicts or polluting your global python environment. `anifetch` will behave just like a native cli tool. You can upgrade your installation with `pipx upgrade anifetch`
|
|
129
154
|
|
|
130
|
-
|
|
131
155
|
---
|
|
132
156
|
|
|
133
157
|
### Installation for NixOS
|
|
@@ -136,12 +160,12 @@ Add the anifetch repo as a flake input:
|
|
|
136
160
|
|
|
137
161
|
```nix
|
|
138
162
|
{
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
};
|
|
163
|
+
inputs = {
|
|
164
|
+
anifetch = {
|
|
165
|
+
url = "github:Notenlish/anifetch";
|
|
166
|
+
inputs.nixpkgs.follows = "nixpkgs";
|
|
144
167
|
};
|
|
168
|
+
};
|
|
145
169
|
}
|
|
146
170
|
```
|
|
147
171
|
|
|
@@ -154,9 +178,9 @@ Remember to add:
|
|
|
154
178
|
to your nixos configuration, like I've done here on my system:
|
|
155
179
|
|
|
156
180
|
```nix
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
181
|
+
nixosConfigurations = {
|
|
182
|
+
Enlil = nixpkgs.lib.nixosSystem {
|
|
183
|
+
specialArgs = { inherit inputs outputs; };
|
|
160
184
|
```
|
|
161
185
|
|
|
162
186
|
#### ❄️ As a package:
|
|
@@ -164,12 +188,13 @@ to your nixos configuration, like I've done here on my system:
|
|
|
164
188
|
Add anifetch to your packages list like so:
|
|
165
189
|
|
|
166
190
|
```nix
|
|
167
|
-
{inputs, pkgs, ...}:
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
191
|
+
{ inputs, pkgs, ... }:
|
|
192
|
+
{
|
|
193
|
+
environment.systemPackages = with pkgs; [
|
|
194
|
+
inputs.anifetch.packages.${pkgs.stdenv.hostPlatform.system}.default
|
|
195
|
+
fastfetch # Choose either fastfetch or neofetch to run anifetch with
|
|
196
|
+
neofetch
|
|
197
|
+
];
|
|
173
198
|
}
|
|
174
199
|
```
|
|
175
200
|
|
|
@@ -178,18 +203,19 @@ Add anifetch to your packages list like so:
|
|
|
178
203
|
Add the overlay to nixpkgs overlays, then add the package to your package list as you would a package from the normal nixpkgs repo.
|
|
179
204
|
|
|
180
205
|
```nix
|
|
181
|
-
{inputs, pkgs, ...}:
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
};
|
|
187
|
-
|
|
188
|
-
environment.systemPackages = with pkgs; [
|
|
189
|
-
anifetch
|
|
190
|
-
fastfetch # Choose either fastfetch or neofetch to run anifetch with
|
|
191
|
-
neofetch
|
|
206
|
+
{ inputs, pkgs, ... }:
|
|
207
|
+
{
|
|
208
|
+
nixpkgs = {
|
|
209
|
+
overlays = [
|
|
210
|
+
inputs.anifetch.overlays.default
|
|
192
211
|
];
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
environment.systemPackages = with pkgs; [
|
|
215
|
+
anifetch
|
|
216
|
+
fastfetch # Choose either fastfetch or neofetch to run anifetch with
|
|
217
|
+
neofetch
|
|
218
|
+
];
|
|
193
219
|
}
|
|
194
220
|
```
|
|
195
221
|
|
|
@@ -199,7 +225,7 @@ After you've done these steps, rebuild your system.
|
|
|
199
225
|
|
|
200
226
|
---
|
|
201
227
|
|
|
202
|
-
### Developer Installation
|
|
228
|
+
### Developer Installation
|
|
203
229
|
|
|
204
230
|
```bash
|
|
205
231
|
git clone https://github.com/Notenlish/anifetch.git
|
|
@@ -210,7 +236,6 @@ pip install -e .
|
|
|
210
236
|
```
|
|
211
237
|
> on windows do this to activate the venv instead: `venv\Scripts\activate`. Also on windows you should use `py` instead of `python3`.
|
|
212
238
|
|
|
213
|
-
|
|
214
239
|
This installs `anifetch` in editable mode within a local virtual environment for development.
|
|
215
240
|
|
|
216
241
|
You can then run the program in two ways:
|
|
@@ -224,14 +249,13 @@ On Nix you can run:
|
|
|
224
249
|
|
|
225
250
|
```bash
|
|
226
251
|
nix develop
|
|
227
|
-
pip install -e .
|
|
228
252
|
```
|
|
229
253
|
|
|
230
|
-
|
|
254
|
+
To install the package into a devshell. However, it is recommended to use [nix-direnv](https://github.com/nix-community/nix-direnv) to enter the development environment automatically, much like a python venv.
|
|
231
255
|
|
|
232
256
|
## User Guide
|
|
233
257
|
|
|
234
|
-
You don't need to configure anything for `fastfetch` or `neofetch`. If they already work on your machine, `anifetch` will detect and use them automatically. Please note that at least one of these must be installed, otherwise anifetch won't work. **By default, `anifetch` will use fastfetch**.
|
|
258
|
+
You don't need to configure anything for `fastfetch` or `neofetch`. If they already work on your machine, `anifetch` will detect and use them automatically. Please note that at least one of these must be installed, otherwise anifetch won't work. **By default, `anifetch` will use fastfetch**.
|
|
235
259
|
|
|
236
260
|
> We dont recommend using neofetch as it is archived. **To use neofetch**, you must append `-nf` to the anifetch command. For some distros you may need to append `--force` to the command too since neofetch is deprecated.
|
|
237
261
|
|
|
@@ -258,13 +282,14 @@ _Note : by default, the video `example.mp4` can directly be used as an example._
|
|
|
258
282
|
- `--cleanup`: Clears the screen on program exit.
|
|
259
283
|
- `-nf` / `--neofetch`: uses `neofetch` instead of `fastfetch`
|
|
260
284
|
- `-fr` / `--force-render`: Forcefully re-renders the animation while not caring about the cache. Useful if the cache is broken or the contents of the video file has changed.
|
|
261
|
-
- `-i` / `--interval`: Use this to make anifetch update the fetch information over time, sets fetch refresh interval in seconds. Default is -1(never).
|
|
285
|
+
- `-i` / `--interval`: Use this to make anifetch update the fetch information over time, sets fetch refresh interval in seconds. Default is -1(never).
|
|
262
286
|
- `-b` / `--benchmark`: For testing, prints how long it took to process in seconds.
|
|
263
287
|
- `--force`: Add this argument if you want to use neofetch even if it is deprecated on your system.
|
|
264
288
|
- `--chroma`: Add this argument to chromakey a hexadecimal color from the video using ffmpeg. Syntax: '--chroma \<hex-color>:\<similiarity>:\<blend>'
|
|
265
289
|
- `--quality`: Changes the output quality of ffmpeg when extracting frames. This doesn't have much effect on the quality or speed from my testing, so you shouldn't need to change this. 2 highest quality, 10 lowest quality.
|
|
266
290
|
- `--loop`: Determines how many times the animation should loop. Default is -1(always loop).
|
|
267
291
|
- `--no-key-exit`: Don't exit anifetch when user presses a key.
|
|
292
|
+
- `--no-input-restore`: Disable restoring pressed keys back into the terminal after stopping Anifetch. Use this if your OS gives security prompts saying `"Anifetch" is requesting special priviliges` when you press a key to stop Anifetch.
|
|
268
293
|
- `-c` / `--config`: Specify a non-default config for Neofetch/Fastfetch.
|
|
269
294
|
- Accepts a path or preset name (e.g. `main`).
|
|
270
295
|
- Neofetch (Linux/macOS): `~/.config/neofetch/main.conf`
|
|
@@ -300,14 +325,12 @@ Add this to the end of `.bashrc`:
|
|
|
300
325
|
anifetch [video_file] [other_args_if_needed]
|
|
301
326
|
```
|
|
302
327
|
|
|
303
|
-
|
|
304
328
|
## Customizing Fastfetch/Neofetch output
|
|
305
329
|
|
|
306
330
|
For customizing fastfetch/neofetch output, you can check out these pages:
|
|
307
331
|
- [Fastfetch Customization](https://github.com/fastfetch-cli/fastfetch/wiki/Configuration)
|
|
308
332
|
- [Neofetch Customization](https://github.com/dylanaraps/neofetch/wiki/Customizing-Info)
|
|
309
333
|
|
|
310
|
-
|
|
311
334
|
## 📊 Benchmarks
|
|
312
335
|
|
|
313
336
|
Here's the benchmark from running each cli 10 times. Tested on Windows 11 with Intel I5-12500H processor.
|
|
@@ -326,6 +349,8 @@ Make sure to install the dependencies listed on [Prerequisites](#Prerequisites).
|
|
|
326
349
|
|
|
327
350
|
If weird characters are appearing in your terminal then your terminals font probably can't render some characters. Consider installling [nerdfonts](https://www.nerdfonts.com/).
|
|
328
351
|
|
|
352
|
+
If your OS is prompting you about `"Anifetch" is requesting special priviliges` or something similiar after pressing a key to stop the running Anifetch instance, add this argument: `--no-input-restore`. The technical reason for this is that Anifetch records the keys you press and enters them back to the terminal on your behalf. That way you can immediately run whatever command you want, without having to re-enter a key or two. Certain OS's have built-in protections against this as a security notice, which is why you might encounter a security prompt.
|
|
353
|
+
|
|
329
354
|
## Notes
|
|
330
355
|
|
|
331
356
|
Anifetch attempts to cache the animation so that it doesn't need to render them again when you run it with the same file. However, if the name of the file is the same, but it's contents has changed, it won't re-render it. In that case, you will need to add `--force-render` as an argument to `anifetch.py` so that it re-renders it. You only have to do this only once when you change the file contents.
|
|
@@ -334,6 +359,8 @@ Also, ffmpeg can generate the the same image for 2 consecutive frames, which may
|
|
|
334
359
|
|
|
335
360
|
Currently only the `symbols` format of chafa is supported, formats like kitty, iterm etc. are not supported. If you try to tell chafa to use iterm, kitty etc. it will just override your format with `symbols` mode.
|
|
336
361
|
|
|
362
|
+
Most fastfetch configs/presets should work out of the box. If you run into an issue with a particular preset, just open an issue and paste your config.
|
|
363
|
+
|
|
337
364
|
## What's Next
|
|
338
365
|
|
|
339
366
|
- [ ] Support different formats like iterm, kitty, sixel etc.
|
|
@@ -6,11 +6,34 @@ This is a small tool built with fastfetch/neofetch, ffmpeg and chafa. It allows
|
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
**Quick Links Installation Guide For:**
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
[Linux](#installation-for-linux-system) • [Windows](#installation-for-windows-winget-or-scoop) • [macOS](#installation-for-macos-homebrew) • [Manual](#manual-installation) • [Development](#developer-installation)
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
### Installation for Linux System
|
|
14
|
+
Recommended Python version: 3.11 and later.
|
|
15
|
+
|
|
16
|
+
#### Installation for Arch / Arch-based distros (Community maintained)
|
|
17
|
+
|
|
18
|
+
Anifetch is available in the AUR package [anifetch-cli](https://aur.archlinux.org/packages/anifetch-cli), maintained by @AmmarSyamil.
|
|
19
|
+
|
|
20
|
+
Install it from the terminal. For example, with Yay:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
yay -S anifetch-cli
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
After installation, run this to test if anifetch was installed correctly:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
anifetch example.mp4
|
|
30
|
+
```
|
|
31
|
+
Please read our [User guide](#user-guide) for more info on how to use anifetch.
|
|
32
|
+
|
|
33
|
+
#### Installation for other Linux Distro.
|
|
34
|
+
If you use NixOS refer to Installation for [NixOS](#installation-for-nixos).
|
|
35
|
+
|
|
36
|
+
Install it from the terminal. For example, with Yay:
|
|
14
37
|
|
|
15
38
|
```bash
|
|
16
39
|
curl https://raw.githubusercontent.com/Notenlish/anifetch/refs/heads/main/install.sh | bash
|
|
@@ -45,7 +68,9 @@ After installing the necessary dependencies using winget/scoop, install anifetch
|
|
|
45
68
|
> [!WARNING]
|
|
46
69
|
> **Do not** install `anifetch` on pypi, it is not related with this project. Install `anifetch-cli`.
|
|
47
70
|
|
|
48
|
-
|
|
71
|
+
Please read our [Post installation](#post-installation) and [User guide](#user-guide) for more info on how to use anifetch.
|
|
72
|
+
|
|
73
|
+
### Installation for macOS (HomeBrew)
|
|
49
74
|
|
|
50
75
|
Install homebrew if you haven't installed it already by following the guide [here](https://brew.sh/).
|
|
51
76
|
|
|
@@ -100,7 +125,6 @@ You can then run the `anifetch` command directly in your terminal.
|
|
|
100
125
|
|
|
101
126
|
Since pipx installs packages in an isolated environment, you won't have to worry about dependency conflicts or polluting your global python environment. `anifetch` will behave just like a native cli tool. You can upgrade your installation with `pipx upgrade anifetch`
|
|
102
127
|
|
|
103
|
-
|
|
104
128
|
---
|
|
105
129
|
|
|
106
130
|
### Installation for NixOS
|
|
@@ -109,12 +133,12 @@ Add the anifetch repo as a flake input:
|
|
|
109
133
|
|
|
110
134
|
```nix
|
|
111
135
|
{
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
};
|
|
136
|
+
inputs = {
|
|
137
|
+
anifetch = {
|
|
138
|
+
url = "github:Notenlish/anifetch";
|
|
139
|
+
inputs.nixpkgs.follows = "nixpkgs";
|
|
117
140
|
};
|
|
141
|
+
};
|
|
118
142
|
}
|
|
119
143
|
```
|
|
120
144
|
|
|
@@ -127,9 +151,9 @@ Remember to add:
|
|
|
127
151
|
to your nixos configuration, like I've done here on my system:
|
|
128
152
|
|
|
129
153
|
```nix
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
154
|
+
nixosConfigurations = {
|
|
155
|
+
Enlil = nixpkgs.lib.nixosSystem {
|
|
156
|
+
specialArgs = { inherit inputs outputs; };
|
|
133
157
|
```
|
|
134
158
|
|
|
135
159
|
#### ❄️ As a package:
|
|
@@ -137,12 +161,13 @@ to your nixos configuration, like I've done here on my system:
|
|
|
137
161
|
Add anifetch to your packages list like so:
|
|
138
162
|
|
|
139
163
|
```nix
|
|
140
|
-
{inputs, pkgs, ...}:
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
164
|
+
{ inputs, pkgs, ... }:
|
|
165
|
+
{
|
|
166
|
+
environment.systemPackages = with pkgs; [
|
|
167
|
+
inputs.anifetch.packages.${pkgs.stdenv.hostPlatform.system}.default
|
|
168
|
+
fastfetch # Choose either fastfetch or neofetch to run anifetch with
|
|
169
|
+
neofetch
|
|
170
|
+
];
|
|
146
171
|
}
|
|
147
172
|
```
|
|
148
173
|
|
|
@@ -151,18 +176,19 @@ Add anifetch to your packages list like so:
|
|
|
151
176
|
Add the overlay to nixpkgs overlays, then add the package to your package list as you would a package from the normal nixpkgs repo.
|
|
152
177
|
|
|
153
178
|
```nix
|
|
154
|
-
{inputs, pkgs, ...}:
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
};
|
|
160
|
-
|
|
161
|
-
environment.systemPackages = with pkgs; [
|
|
162
|
-
anifetch
|
|
163
|
-
fastfetch # Choose either fastfetch or neofetch to run anifetch with
|
|
164
|
-
neofetch
|
|
179
|
+
{ inputs, pkgs, ... }:
|
|
180
|
+
{
|
|
181
|
+
nixpkgs = {
|
|
182
|
+
overlays = [
|
|
183
|
+
inputs.anifetch.overlays.default
|
|
165
184
|
];
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
environment.systemPackages = with pkgs; [
|
|
188
|
+
anifetch
|
|
189
|
+
fastfetch # Choose either fastfetch or neofetch to run anifetch with
|
|
190
|
+
neofetch
|
|
191
|
+
];
|
|
166
192
|
}
|
|
167
193
|
```
|
|
168
194
|
|
|
@@ -172,7 +198,7 @@ After you've done these steps, rebuild your system.
|
|
|
172
198
|
|
|
173
199
|
---
|
|
174
200
|
|
|
175
|
-
### Developer Installation
|
|
201
|
+
### Developer Installation
|
|
176
202
|
|
|
177
203
|
```bash
|
|
178
204
|
git clone https://github.com/Notenlish/anifetch.git
|
|
@@ -183,7 +209,6 @@ pip install -e .
|
|
|
183
209
|
```
|
|
184
210
|
> on windows do this to activate the venv instead: `venv\Scripts\activate`. Also on windows you should use `py` instead of `python3`.
|
|
185
211
|
|
|
186
|
-
|
|
187
212
|
This installs `anifetch` in editable mode within a local virtual environment for development.
|
|
188
213
|
|
|
189
214
|
You can then run the program in two ways:
|
|
@@ -197,14 +222,13 @@ On Nix you can run:
|
|
|
197
222
|
|
|
198
223
|
```bash
|
|
199
224
|
nix develop
|
|
200
|
-
pip install -e .
|
|
201
225
|
```
|
|
202
226
|
|
|
203
|
-
|
|
227
|
+
To install the package into a devshell. However, it is recommended to use [nix-direnv](https://github.com/nix-community/nix-direnv) to enter the development environment automatically, much like a python venv.
|
|
204
228
|
|
|
205
229
|
## User Guide
|
|
206
230
|
|
|
207
|
-
You don't need to configure anything for `fastfetch` or `neofetch`. If they already work on your machine, `anifetch` will detect and use them automatically. Please note that at least one of these must be installed, otherwise anifetch won't work. **By default, `anifetch` will use fastfetch**.
|
|
231
|
+
You don't need to configure anything for `fastfetch` or `neofetch`. If they already work on your machine, `anifetch` will detect and use them automatically. Please note that at least one of these must be installed, otherwise anifetch won't work. **By default, `anifetch` will use fastfetch**.
|
|
208
232
|
|
|
209
233
|
> We dont recommend using neofetch as it is archived. **To use neofetch**, you must append `-nf` to the anifetch command. For some distros you may need to append `--force` to the command too since neofetch is deprecated.
|
|
210
234
|
|
|
@@ -231,13 +255,14 @@ _Note : by default, the video `example.mp4` can directly be used as an example._
|
|
|
231
255
|
- `--cleanup`: Clears the screen on program exit.
|
|
232
256
|
- `-nf` / `--neofetch`: uses `neofetch` instead of `fastfetch`
|
|
233
257
|
- `-fr` / `--force-render`: Forcefully re-renders the animation while not caring about the cache. Useful if the cache is broken or the contents of the video file has changed.
|
|
234
|
-
- `-i` / `--interval`: Use this to make anifetch update the fetch information over time, sets fetch refresh interval in seconds. Default is -1(never).
|
|
258
|
+
- `-i` / `--interval`: Use this to make anifetch update the fetch information over time, sets fetch refresh interval in seconds. Default is -1(never).
|
|
235
259
|
- `-b` / `--benchmark`: For testing, prints how long it took to process in seconds.
|
|
236
260
|
- `--force`: Add this argument if you want to use neofetch even if it is deprecated on your system.
|
|
237
261
|
- `--chroma`: Add this argument to chromakey a hexadecimal color from the video using ffmpeg. Syntax: '--chroma \<hex-color>:\<similiarity>:\<blend>'
|
|
238
262
|
- `--quality`: Changes the output quality of ffmpeg when extracting frames. This doesn't have much effect on the quality or speed from my testing, so you shouldn't need to change this. 2 highest quality, 10 lowest quality.
|
|
239
263
|
- `--loop`: Determines how many times the animation should loop. Default is -1(always loop).
|
|
240
264
|
- `--no-key-exit`: Don't exit anifetch when user presses a key.
|
|
265
|
+
- `--no-input-restore`: Disable restoring pressed keys back into the terminal after stopping Anifetch. Use this if your OS gives security prompts saying `"Anifetch" is requesting special priviliges` when you press a key to stop Anifetch.
|
|
241
266
|
- `-c` / `--config`: Specify a non-default config for Neofetch/Fastfetch.
|
|
242
267
|
- Accepts a path or preset name (e.g. `main`).
|
|
243
268
|
- Neofetch (Linux/macOS): `~/.config/neofetch/main.conf`
|
|
@@ -273,14 +298,12 @@ Add this to the end of `.bashrc`:
|
|
|
273
298
|
anifetch [video_file] [other_args_if_needed]
|
|
274
299
|
```
|
|
275
300
|
|
|
276
|
-
|
|
277
301
|
## Customizing Fastfetch/Neofetch output
|
|
278
302
|
|
|
279
303
|
For customizing fastfetch/neofetch output, you can check out these pages:
|
|
280
304
|
- [Fastfetch Customization](https://github.com/fastfetch-cli/fastfetch/wiki/Configuration)
|
|
281
305
|
- [Neofetch Customization](https://github.com/dylanaraps/neofetch/wiki/Customizing-Info)
|
|
282
306
|
|
|
283
|
-
|
|
284
307
|
## 📊 Benchmarks
|
|
285
308
|
|
|
286
309
|
Here's the benchmark from running each cli 10 times. Tested on Windows 11 with Intel I5-12500H processor.
|
|
@@ -299,6 +322,8 @@ Make sure to install the dependencies listed on [Prerequisites](#Prerequisites).
|
|
|
299
322
|
|
|
300
323
|
If weird characters are appearing in your terminal then your terminals font probably can't render some characters. Consider installling [nerdfonts](https://www.nerdfonts.com/).
|
|
301
324
|
|
|
325
|
+
If your OS is prompting you about `"Anifetch" is requesting special priviliges` or something similiar after pressing a key to stop the running Anifetch instance, add this argument: `--no-input-restore`. The technical reason for this is that Anifetch records the keys you press and enters them back to the terminal on your behalf. That way you can immediately run whatever command you want, without having to re-enter a key or two. Certain OS's have built-in protections against this as a security notice, which is why you might encounter a security prompt.
|
|
326
|
+
|
|
302
327
|
## Notes
|
|
303
328
|
|
|
304
329
|
Anifetch attempts to cache the animation so that it doesn't need to render them again when you run it with the same file. However, if the name of the file is the same, but it's contents has changed, it won't re-render it. In that case, you will need to add `--force-render` as an argument to `anifetch.py` so that it re-renders it. You only have to do this only once when you change the file contents.
|
|
@@ -307,6 +332,8 @@ Also, ffmpeg can generate the the same image for 2 consecutive frames, which may
|
|
|
307
332
|
|
|
308
333
|
Currently only the `symbols` format of chafa is supported, formats like kitty, iterm etc. are not supported. If you try to tell chafa to use iterm, kitty etc. it will just override your format with `symbols` mode.
|
|
309
334
|
|
|
335
|
+
Most fastfetch configs/presets should work out of the box. If you run into an issue with a particular preset, just open an issue and paste your config.
|
|
336
|
+
|
|
310
337
|
## What's Next
|
|
311
338
|
|
|
312
339
|
- [ ] Support different formats like iterm, kitty, sixel etc.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "anifetch-cli"
|
|
7
|
+
classifiers = [
|
|
8
|
+
"Development Status :: 5 - Production/Stable",
|
|
9
|
+
"Environment :: Console",
|
|
10
|
+
"Topic :: Terminals",
|
|
11
|
+
"Operating System :: Microsoft :: Windows",
|
|
12
|
+
"Operating System :: POSIX",
|
|
13
|
+
"Operating System :: Unix",
|
|
14
|
+
"Operating System :: MacOS",
|
|
15
|
+
]
|
|
16
|
+
keywords = [
|
|
17
|
+
"fetch",
|
|
18
|
+
"terminal",
|
|
19
|
+
"cli",
|
|
20
|
+
"animated",
|
|
21
|
+
"neofetch",
|
|
22
|
+
"fastfetch",
|
|
23
|
+
"anifetch",
|
|
24
|
+
]
|
|
25
|
+
version = "1.0.5"
|
|
26
|
+
description = "Animated terminal fetch with video and audio support."
|
|
27
|
+
# If I put everyone here it messes with the "author" meta section.
|
|
28
|
+
authors = [{ name = "Notenlish", email = "notenlish@gmail.com" }]
|
|
29
|
+
maintainers = [
|
|
30
|
+
# If I make it start with immelancholy for some reason it uses gallophostix's gmail for immelancholy.
|
|
31
|
+
{ name = "Gallophostrix", email = "gallophostrix@gmail.com" },
|
|
32
|
+
{ name = "Immelancholy" },
|
|
33
|
+
{ name = "Notenlish", email = "notenlish@gmail.com" },
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
readme = "README.md"
|
|
37
|
+
license = { text = "MIT" }
|
|
38
|
+
requires-python = ">=3.11"
|
|
39
|
+
dependencies = [
|
|
40
|
+
"platformdirs==4.5.1",
|
|
41
|
+
"wcwidth==0.2.14",
|
|
42
|
+
"rich==14.3.1",
|
|
43
|
+
"pynput==1.8.1",
|
|
44
|
+
# "regex==2026.5.9"
|
|
45
|
+
]
|
|
46
|
+
|
|
47
|
+
[project.urls]
|
|
48
|
+
Homepage = "https://github.com/Notenlish/anifetch"
|
|
49
|
+
Issues = "https://github.com/Notenlish/anifetch/issues"
|
|
50
|
+
|
|
51
|
+
[project.scripts]
|
|
52
|
+
anifetch = "anifetch.__init__:main"
|
|
53
|
+
anifetch-cli = "anifetch.__init__:main"
|
|
54
|
+
|
|
55
|
+
[tool.setuptools]
|
|
56
|
+
packages = ["anifetch"]
|
|
57
|
+
package-dir = { "" = "src" }
|
|
58
|
+
|
|
59
|
+
[tool.setuptools.package-data]
|
|
60
|
+
anifetch = ["assets/**/*"]
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env python
|
|
2
|
+
|
|
3
|
+
# SPDX-License-Identifier: MIT AND AGPL-3.0-only
|
|
4
|
+
|
|
5
|
+
# Original code from https://github.com/mmlb/ansi2txt
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def ansi2txt(text: str) -> str:
|
|
9
|
+
EOF = ""
|
|
10
|
+
pos = 0
|
|
11
|
+
output = []
|
|
12
|
+
|
|
13
|
+
def getchar():
|
|
14
|
+
nonlocal pos
|
|
15
|
+
if pos >= len(text):
|
|
16
|
+
return EOF
|
|
17
|
+
ch = text[pos]
|
|
18
|
+
pos += 1
|
|
19
|
+
return ch
|
|
20
|
+
|
|
21
|
+
ch = None
|
|
22
|
+
|
|
23
|
+
while ch != EOF:
|
|
24
|
+
ch = getchar()
|
|
25
|
+
|
|
26
|
+
while ch == "\r":
|
|
27
|
+
ch = getchar()
|
|
28
|
+
if ch != "\n":
|
|
29
|
+
output.append("\r")
|
|
30
|
+
|
|
31
|
+
if ch == "\x1b":
|
|
32
|
+
ch = getchar()
|
|
33
|
+
|
|
34
|
+
if ch == "[":
|
|
35
|
+
ch = getchar()
|
|
36
|
+
while ch == ";" or ("0" <= ch <= "9") or ch == "?":
|
|
37
|
+
ch = getchar()
|
|
38
|
+
|
|
39
|
+
elif ch == "]":
|
|
40
|
+
ch = getchar()
|
|
41
|
+
if ch != EOF and "0" <= ch <= "9":
|
|
42
|
+
while True:
|
|
43
|
+
ch = getchar()
|
|
44
|
+
if ch == EOF or ord(ch) == 7:
|
|
45
|
+
break
|
|
46
|
+
elif ch == "\x1b":
|
|
47
|
+
ch = getchar()
|
|
48
|
+
break
|
|
49
|
+
|
|
50
|
+
elif ch == "%":
|
|
51
|
+
ch = getchar()
|
|
52
|
+
|
|
53
|
+
elif ch != EOF:
|
|
54
|
+
output.append(ch)
|
|
55
|
+
|
|
56
|
+
return "".join(output)
|