diff options
| author | Efraim Flashner <efraim@flashner.co.il> | 2025-09-25 13:51:32 +0300 |
|---|---|---|
| committer | Sharlatan Hellseher <sharlatanus@gmail.com> | 2025-10-01 12:13:43 +0100 |
| commit | c794bf4b8120f9f201f346abc7af6ff9775d5f70 (patch) | |
| tree | db1e65c76ff3621468a20c8666a40f8442655073 /gnu/packages/python-xyz.scm | |
| parent | 1bef690046c29a5190a8d9ffd3915ebee6eeff08 (diff) | |
gnu: Add python-term-image.
* gnu/packages/python-xyz.scm (python-term-image): New variable.
Change-Id: I5f5da625ff99b79a1351cc938139c0d0717e0cd3
Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
Diffstat (limited to 'gnu/packages/python-xyz.scm')
| -rw-r--r-- | gnu/packages/python-xyz.scm | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 152b3c36d7..3eb193c5c1 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -1622,6 +1622,62 @@ Form (EBNF) as input, and outputs a memoizing Parsing Expression Grammar (PEG) or Packrat parser in Python.") (license license:bsd-2))) +(define-public python-term-image + (package + (name "python-term-image") + (version "0.7.2") + (source + (origin + ;; We need the full repo to run the tests. + (method git-fetch) + (uri (git-reference + (url "https://github.com/AnonymouX47/term-image") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1lsd5m0k5m99arkca2rzrrlln10c8ax6xfawqwjnspcbf8l3h3dq")))) + (build-system pyproject-build-system) + (arguments + (list #:test-flags + #~(list "tests" + ;; These tests require network access. + "-k" (string-append "not test_from_url" + " and not test_source" + " and not test_close")) + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'adjust-dependencies + (lambda _ + (substitute* "setup.py" + (("pillow>=9.1,<11") "pillow>=9.1,<12"))))))) + (propagated-inputs (list python-pillow python-requests)) + (native-inputs + (list python-pytest + python-setuptools + python-urwid)) + (home-page "https://github.com/AnonymouX47/term-image") + (synopsis "Display images in the terminal") + (description "term-image is a library and program to display images on +compatible terminals. + +Features: +@enumerate +@item Multiple image formats (basically all formats supported by +@code{PIL.Image.open()}) +@item Multiple image source types: PIL image instance, local file, URL +@item Multiple image render styles (with automatic support detection) +@item Support for multiple terminal graphics protocols, including Kitty +@item Transparency support (with multiple options) +@item Animated image support (including transparent ones) +@item Integration into various TUI / terminal-based output libraries +@item Terminal size awareness +@item Automatic and manual image sizing +@item Horizontal and vertical alignment +@item Automatic and manual font ratio adjustment (to preserve image aspect +ratio) +@end enumerate") + (license license:expat))) + (define-public python-trubar (package (name "python-trubar") |
