Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.wakatime-project
.ruff_cache/
.flatpak-builder/
.ignore/
*.ignore*
.direnv/

# Byte-compiled / optimized / DLL files
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ Also, ffmpeg can generate the the same image for 2 consecutive frames, which may

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.

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.

## What's Next

- [ ] Support different formats like iterm, kitty, sixel etc.
Expand Down
92 changes: 48 additions & 44 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,56 +1,60 @@
# TODO: publish on pypi

[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[project]
name = "anifetch-cli"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Topic :: Terminals",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
]
keywords = [
"fetch",
"terminal",
"cli",
"animated",
"neofetch",
"fastfetch",
"anifetch",
]
version = "1.0.4"
description = "Animated terminal fetch with video and audio support."
# If I put everyone here it messes with the "author" meta section.
authors = [{ name = "Notenlish", email = "notenlish@gmail.com" }]
maintainers = [
# If I make it start with immelancholy for some reason it uses gallophostix's gmail for immelancholy.
{ name = "Gallophostrix", email = "gallophostrix@gmail.com" },
{ name = "Immelancholy" },
{ name = "Notenlish", email = "notenlish@gmail.com" },
]
name = "anifetch-cli"
classifiers = [
"Development Status :: 5 - Production/Stable",
"Environment :: Console",
"Topic :: Terminals",
"Operating System :: Microsoft :: Windows",
"Operating System :: POSIX",
"Operating System :: Unix",
"Operating System :: MacOS",
]
keywords = [
"fetch",
"terminal",
"cli",
"animated",
"neofetch",
"fastfetch",
"anifetch",
]
version = "1.0.5"
description = "Animated terminal fetch with video and audio support."
# If I put everyone here it messes with the "author" meta section.
authors = [{ name = "Notenlish", email = "notenlish@gmail.com" }]
maintainers = [
# If I make it start with immelancholy for some reason it uses gallophostix's gmail for immelancholy.
{ name = "Gallophostrix", email = "gallophostrix@gmail.com" },
{ name = "Immelancholy" },
{ name = "Notenlish", email = "notenlish@gmail.com" },
]

readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.11"
dependencies = ["platformdirs", "wcwidth", "rich", "pynput"]
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.11"
dependencies = [
"platformdirs==4.5.1",
"wcwidth==0.2.14",
"rich==14.3.1",
"pynput==1.8.1",
# "regex==2026.5.9"
]

[project.urls]
Homepage = "https://github.com/Notenlish/anifetch"
Issues = "https://github.com/Notenlish/anifetch/issues"
Homepage = "https://github.com/Notenlish/anifetch"
Issues = "https://github.com/Notenlish/anifetch/issues"

[project.scripts]
anifetch = "anifetch.__init__:main"
anifetch-cli = "anifetch.__init__:main"
anifetch = "anifetch.__init__:main"
anifetch-cli = "anifetch.__init__:main"

[tool.setuptools]
packages = ["anifetch"]
package-dir = { "" = "src" }
packages = ["anifetch"]
package-dir = { "" = "src" }

[tool.setuptools.package-data]
anifetch = ["assets/**/*"]
anifetch = ["assets/**/*"]
56 changes: 56 additions & 0 deletions src/anifetch/ansi2txt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/usr/bin/env python

# SPDX-License-Identifier: MIT AND AGPL-3.0-only

# Original code from https://github.com/mmlb/ansi2txt


def ansi2txt(text: str) -> str:
EOF = ""
pos = 0
output = []

def getchar():
nonlocal pos
if pos >= len(text):
return EOF
ch = text[pos]
pos += 1
return ch

ch = None

while ch != EOF:
ch = getchar()

while ch == "\r":
ch = getchar()
if ch != "\n":
output.append("\r")

if ch == "\x1b":
ch = getchar()

if ch == "[":
ch = getchar()
while ch == ";" or ("0" <= ch <= "9") or ch == "?":
ch = getchar()

elif ch == "]":
ch = getchar()
if ch != EOF and "0" <= ch <= "9":
while True:
ch = getchar()
if ch == EOF or ord(ch) == 7:
break
elif ch == "\x1b":
ch = getchar()
break

elif ch == "%":
ch = getchar()

elif ch != EOF:
output.append(ch)

return "".join(output)
Loading
Loading