Display Images in your terminal with python

Overview

Term-Img

Display Images in your terminal with python

NOTE: This project is a work in progress and not everything on here has actually been implemented.

Contents

Installation

Requirements

  • Operating System: Unix / Linux / MacOS X
    • Should work on Windows if the other requirements are satisfied (except the TUI, due to lack of the curses library).
  • Python >= 3.7
  • A Terminal (with Unicode and ANSI 24-bit color support)

Steps

The package can be installed via pip (NOT YET UPLOADED!!!)

pip install term-img

OR

Clone this repository using any method, then navigate into the project directory in a terminal and run

pip install .

Features

  • Multiple format support
  • Animated image support
  • Variable image size and scale
  • Horizontal alignment control
  • Terminal size awareness

Quick Start

The library is really simple to get started with. Here are examples of how you display an image

From a shell (CLI)

From a local image file

term-img image.png

From a URL

term-img https://www.example.com/image.png

If multiple sources or at least one directory is given, a TUI is launched to navigate through the images.

NOTE: python -m term_img can be used as an alternative to the term-img command (take note of the underscore VS hyphen).

From a Python script

from term_img import DrawImage

image = DrawImage.from_file("image.png")
image.draw_image()

You can also use a URL if you don't have the file locally stored

from term_img import DrawImage

image = DrawImage.from_url("https://www.example.com/image.png")
image.draw_image()

The library can also be used with PIL images

from PIL import Image
from term_img import DrawImage

image = DrawImage(Image.open("image.png"))
image.draw_image()

Usage

CLI

Run term-img --help to see full usage info.

TUI

The controls are context based and displayed at the bottom of the terminal window.

Library

See the examples for usage samples and the documentation for full description and details of the available features.

Contribution

If you find any bugs or want to suggest a new feature, please open a new issue with proper description (after browsing through the existing issues and making sure you won't create a duplicate).

For code contributions, please make sure you read the guidelines.

Thanks! ❤️


Acknowledging @pranavbaburaj for starting the project.

Comments
  • Scanning directories and loading animated images too slow

    Scanning directories and loading animated images too slow

    Description First of all, great work. I'm really interested on it. Now, everything goes fine when you open a single file or several files using a glob expression (e.g. ~/Downloads/*.png). However, whenever you want to browse a directory, it takes too long (like 20 secs or more) to load the TUI viewer (while recursively scanning image files in the given directory). Once the TUI finally loads, it is also a bit slow whenever you hover a directory (a few seconds depending on the directory).

    To Reproduce term-img DIR or term-img DIR/*

    Expected behavior term-img should be quicker and smoother when recursively browsing directories

    Desktop:

    • OS: Arch
    • Kernel version: Linux 5.15.12 (libre-hardened)

    Package info:

    • Python version: 3.10.2
    • Package version: 0.1.1
    • Installation method: clone repo and then pip install

    Terminal Emulator:

    • Name: Tested on Xterm (370) and Alacritty (0.10.0)
    bug 
    opened by leo-arch 23
  • Make term-img easier to unit test

    Make term-img easier to unit test

    Is your feature request related to a problem? Please describe.

    I'm having trouble actually using term-img when running unit tests, because term_img.exceptions.InvalidSize is raised when TermImage is initialized.

    Describe the solution you'd like

    I'm not sure what's best here, but one quick solution would be add check_width and check_height args to TermImage, so that they can be passed to set_size here

    https://github.com/AnonymouX47/term-img/blob/44182ee63d0f0da281c9c57313e81dca1f3abc14/term_img/image.py#L91

    Overall, I'm also wondering if the size shouldn't be validated at __init__? Might be more appropriate to evaluate at draw() time only.

    Describe alternatives you've considered

    I could just mock get_terminal_size to give me the size I'm trying to emulate in my tests as a fallback, but wondering if the library itself could use some way to control this.

    Additional context

    Just wanted to say that I've really enjoyed using this library, and want to make it the default image renderer in a cli I'm working on. Appreciate the work here!

    enhancement 
    opened by paw-lu 14
  • iTerm2 image protocol support

    iTerm2 image protocol support

    A branch off #23

    Tested terminal emulators:

    • iTerm2
    • WezTerm
    • Konsole >= 22.04.0
      • Currently doesn't support native animations but the normal method used across all styles works excellently.

    All functionalities work properly across all terminals except stated otherwise.

    Progress:

    • [x] Sizing
    • [x] Rendering
      • [x] Line-by-line
      • [x] Whole image
    • [x] Transparency
    • [x] Formatting
    • [x] Animation
    • [x] CLI Integration
    • [x] TUI Integration
    • [x] Tests

    Specific protocol features already or to be in use:

    • [x] Native animation
    enhancement lib cli tui test iterm2 
    opened by AnonymouX47 13
  • Support for tmux?

    Support for tmux?

    Hi, I am using tmux. The left pane is my vim pane writing python, the right is ipython pane. When I use term-image's image.show() funtion. A very vague image printed in the right pane. how to make it more sharp? thx image

    graphics tmux not planned 
    opened by Mickychen00 11
  • Strange visual artifacts on OSX

    Strange visual artifacts on OSX

    Hey, I just installed term-image on OSX and upon trying multiple images, I seem to get visual artifacts upon loading images (especially those with transparent backgrounds). I have tried a couple different images (in both png and jpeg format) and the issue seems to persist. It's possible that this is some user error but I haven't done anything besides install it and use it right off the bat. I'll include the images along with this issue to see if others can get these to render.

    Steps to reproduce the behavior:

    1. Install term-image via zsh Terminal (pip3 install term-image)
    2. Open image (term-image ~/Downloads/image.png)

    Screenshots Screen Shot 2022-06-17 at 3 27 14 PM

    Desktop (please complete the following information, if applicable):

    • OSX 12.2.1
    • Most Recent term-image
    • zsh terminal

    Package info:

    • Python version: 3.9.13
    • pip: 22.0.3

    Original images used: image image

    osx terminal support 
    opened by Sam-Cleveland 5
  • Support for Kitty terminal graphics

    Support for Kitty terminal graphics

    Resolving #40 and #23

    • Implements support for the Kitty terminal graphics protocol in the library, CLI and TUI.
    • Adds KittyImage class.
    • Adds kitty render style choice for the --style CL option.
    • Introduces support for multiple render methods per render style.
    • Adds BaseImage.set_render_method().
    documentation enhancement lib cli test 
    opened by AnonymouX47 5
  • Change of top-level package name

    Change of top-level package name

    • Changes the top-level package name to term_image in order to unify it with the new project name as changed in ef909a19d3faf6820ef72d3b0c849b5d74443beb.
    • Adds a dummy package with the old name to avoid breaking dependants, which will be removed by version 1.0.0.
    documentation lib 
    opened by AnonymouX47 3
  • iTerm2 inline image protocol support

    iTerm2 inline image protocol support

    Implementing #48

    • Implements support for the iTerm2 inline image protocol.
    • Adds the iterm2 render style.
      • Adds .image.iterm2 submodule.
      • Adds ITerm2Image class.
    • Adds iterm2 choice for -S | --style.
    • Adds term_image.TermImageWarning.
    • Adds --itn/--iterm2-native and --itn-max/--iterm2-native-maxsize style-specific CL options for 'iterm2' native animation.
    • Restores support checks in subprocesses.
    documentation enhancement lib cli tui 
    opened by AnonymouX47 1
  • Improvements to viewer config

    Improvements to viewer config

    Resolving #63

    • Implements support for partial configs
    • Implements support for XDG Base Directories Specification
    • Fixes and improves updating of TUI keybindings
    • Fixes and improves "log file" validation
    • Adds an upper limit of 5 for the "max notifications" option
    • User config is now initialized after CL arguments have been parsed
    • Incorporates the logging and notification systems into the config system
    • Adds --config and --no-config CL options
    • Updates config notification messages
    • Adds sample config file with all defaults
    • Renames "no multi" to "multi"
    documentation cli tui config fix new improvement 
    opened by AnonymouX47 0
  • Font/Cell ratio improvements

    Font/Cell ratio improvements

    • Changes "FONT ratio" to "CELL ratio"!!
      • term_image.get_font_ratio() -> term_image.get_cell_ratio()
      • term_image.set_font_ratio() -> term_image.set_cell_ratio()
      • -F/--font-ratio -> -C/--cell-ratio
      • --auto-font-ratio -> --auto-cell-ratio
      • config option "font ratio" -> "cell ratio"
      • etc...
    • Renames FontRatio enum to AutoCellRatio.
    • Renames modes AUTO -> FIXED and FULL_AUTO -> DYNAMIC.
    • Makes the auto cell ratio support status override public.
    documentation lib cli tui config test text improvement 
    opened by AnonymouX47 0
  • Minor improvements across render styles

    Minor improvements across render styles

    • Improves kitty term BG color workaround
    • Improves alpha auto BG tests
    • Adds clear() method to each of KittyImage and Iterm2Image.
    • Adds render style metaclass .image.ImageMeta.
    • Adds ImageMeta.style property.
    • str(ImageClass) now returns the name of the render style [category].
    • Fixes render style force condition
    lib cli config test fix new improvement 
    opened by AnonymouX47 0
  • term-image to respect XDG Base Directories Specification

    term-image to respect XDG Base Directories Specification

    Is your feature request related to a problem? Please describe. Currently term-image stores and writes configuration files to $HOME/.term_image/

    Describe the solution you'd like If the system has XDG_CONFIG_HOME set, please place configurations there (there may be other considerations, see XDG Base Directories Specification)

    Describe alternatives you've considered Thought about a symlink, but that still leaves another line of output when listing the home directory

    enhancement config linux 
    opened by cmcallister 0
  • Improvements to render method selection

    Improvements to render method selection

    Required by #61

    Render method support validation:

    • set_render_method()
      • force: bool = False
      • if not (force or self_or_cls_._is_supported(method)): raise StyleImageError: {method!r} render method is not supported in the current terminal.
      • _is_supported(method) should be cached
    lib common planned improvement 
    opened by AnonymouX47 0
  • Support for terminal emulators with less colors

    Support for terminal emulators with less colors

    Requires #62

    This will be implemented as render methods (and some style-specific parameters) common to all text-based render styles, defined by the TextImage class.

    Progress:

    • [ ] Render methods selection
    • [ ] Support detection
    • [ ] Integration into existing text-based render styles
    • [ ] Style-spcific parameter
    • [ ] Style-spcific format spec field
    • [ ] CLI integration
    • [ ] TUI integration

    Initial Idea

    NB: These is mostly a raw dump of my thought process at the time I conceived the idea, so might not be "neat".

    • auto, rgb, 256color, 8color and none render methods for all text-based styles.

      • Determine and store the method equivalent to auto as _AUTO_METHOD
        • The first to be supported in order of quality
      • 256 colors have a slightly different escape sequence that uses a pallete index rather than rgb values.
      • Adapt 256color method for fbterm.
    • is_supported(): if any(_is_supported(method) for method in _render_methods)

    • Style Args:

      • grey: bool = False -> Greyscale (only applies to methods other than none)
      • threshold_8color: float = 0.5 -> Any band of a pixel whose value is less than this fraction of the maximum value is taken as 0, 1 if otherwise. E.g with a band-width of 256, any value less than 128 is taken as 0.
      • rgb_sep: str = ";" {";", ":"}

    Requires updating _get_render_data():

    • rgb -> pixels
    • grey: bool = False
    • threshold_8color: float = 0.5
    • color: str = "rgb" {rgb, 256color, 8color, none}
      • If none: pixels = None
      • if grey: convert to "L"
        • rgb: px = (value,) * 3
        • 256: px = 232 + value * 23 // 255
        • 8: px = 7 if value >= threshold else 0
      • else
        • rgb: px = px
        • 256: 0 <= r, g, b <= 5 -> px = 16 + 36 * (r * 5 // 255) + 6 * (g * 5 // 255) + (b * 5 // 255)
        • 8: 0 <= r, g, b <= 1 -> px = (r >= threshold) << 2 | (g >= threshold) << 1 | (b >= threshold)

    Known Issues:

    • For text-based styles, On Kitty, cell BG colors that are equal to the default BG color take the form of the background (I.e might be translucent or blended with a background image).
    • This is overcome in the RGB method by slightly manipulating the pixel color (done in #54) but can still occur with 265color or 8color method, as fixing it in these modes will require modifying either the pallete entries or the default BG color, which is generally not desired behavior.

    Any suggestions are always welcome. 😃

    enhancement lib cli tui text planned 
    opened by AnonymouX47 0
  • 'blank' render style

    'blank' render style

    Branches off #57

    This render style is based on two major things:

    • The ASCII blank (space) character (0x20)
    • ANSII background color escape sequences

    Progress:

    • [ ] Sizing
    • [ ] Rendering
    • [ ] CLI integration
    • [ ] TUI integration

    Initial idea

    • Images will have a resolution of (kinda) two pixels per cell but both sharing the same color.
    • The image is resized to a resolution of one pixel per cell and the rest is straightforward from there 🌚.

    Any suggestions are always welcome. 😃

    enhancement lib cli tui planned blank 
    opened by AnonymouX47 0
  • 'braille' render style

    'braille' render style

    Branches off #57

    This render style is based on three major things:

    • Unicode braille patterns (+U2800 to +U28FF)
    • Lightness of an image pixel

    Progress:

    • [ ] Sizing
    • [ ] Rendering
    • [ ] CLI integration
    • [ ] TUI integration

    Initial idea

    • The image is resized to a resolution of two pixels per cell.
    • There are 5 levels of value (greyness), 0 to 4, each represented by the same number of dots.
    • Each pixel maps to an integer which is an inclusive-OR combination of the bits representing each dot, based on this numbering:

    dots

    • The integers for the two pixels in each cell are OR-ed to get an integer for the cell.
    • The integers are stored in an array, whose size is the rendered size of the image.
      • For this, I'm plan to use array.array with 8-bit integers for better memory management.
      • The pixels will be iterated over in a flattened row-major order, while mapping each pixel to the corresponding array index.
    • The integers are then converted to the code points for the corresponding symbol.
      • Zeros will be represented by blanks instead of +U2800 (saves a few bytes per occurrence 🌚)

    Any suggestions are always welcome. 😃

    enhancement lib cli tui planned braille 
    opened by AnonymouX47 0
  • 'ascii' render style

    'ascii' render style

    Branches off #57

    This render style is based on three major things:

    • ASCII characters
    • Character density
    • Lightness of an image pixel

    Progress:

    • [ ] Sizing
    • [ ] Rendering
    • [ ] CLI integration
    • [ ] TUI integration

    Initial idea

    • A specific set of ASCII characters will be selected, each with a different density and ordered by increasing density.
      • Might end up having multiple sets to choose from.
    • The image will be resized to a density of one pixel per cell.
    • Each pixel is mapped to a character defined by the relation:
    px = chars[(lightness * len(chars)) // 255]
    

    Style args:

    • invert: bool = False -> Inverts the greyscale.

    Any suggestions are always welcome. 😃

    enhancement lib cli tui planned ascii 
    opened by AnonymouX47 0
Releases(v0.4.1)
  • v0.4.1(Jul 30, 2022)

    0.4.1 - 2022-07-30

    Added

    • [tui] Handling for exceptions raised while rendering animation frames.
    • [docs] Interface stability status notice.

    Fixed

    • [lib] term_image.image.ImageSource enum.
    • [lib] Accidental closure of the PIL image instance being used by an ImageIterator instance.
    • [lib] ImageIterator now caches frames by the image's rendered size, not the unscaled size.
    • [lib] ImageIterator.seek() now raises TermImageError after the iterator has been exhausted/finalized.
    • [lib] Placement of linebreaks in image bottom padding.
    • [lib] Fixed some utilities.
    • [cli] Errors in CLI help text.
    • [tui] Handling of crashes in the TUI, particularly when multiprocessing is enabled.
    • [tui] Image and animation rendering.

    See the commit messages for 0.4.1 for the full logs.

    Source code(tar.gz)
    Source code(zip)
    term-image-0.4.1.tar.gz(94.06 KB)
    term_image-0.4.1-py3-none-any.whl(103.51 KB)
    vim-style_config.json(3.31 KB)
  • v0.4.0(Jun 27, 2022)

    Highlights

    • Support for terminal graphics protocols
    • Auto font ratio
    • Automatic render style selection
    • Style-specific parameters and format specification
    • Improved image grid performance
    • TermImage -> BlockImage
    • TermImageException -> TermImageError
    • InvalidSize -> InvalidSizeError

    0.4.0 - 2022-06-27

    Fixed

    • [lib] Directly adjusting image seek position no longer affects iteration with ImageIterator (#42).
    • [lib] BG colors not being drawn when equal to the terminal's default BG color, with 'block' render style on the Kitty terminal emulator (#54).
    • [cli] Handling of SIGINT while processing sources (#56).
    • [tui] Intensive performance drop while populating large image grids (#41).
    • [tui] Navigation across animated images (#42).
      • No more waiting for the first frame to be rendered before moving on.
    • [tui] Deadlocks and some exceptions raised upon exiting the TUI (#43).

    Added

    • [lib] A common interface to be shared across all image classes (#34).
    • [lib] BaseImage, the baseclass of all image classes (#34).
    • [lib] is_supported() class method for render style support detection (#34).
    • [lib] term_image.utils submodule. (#34, #36)
    • [lib] Convenience functions for automatic render style selection (#37).
      • AutoImage(), from_file() and from_url() in term_image.image.
    • [lib] BaseImage.source_type property (#38).
    • [lib] KittyImage class (#39).
    • [lib] Support for multiple render methods per render style via BaseImage.set_render_method() (#39).
    • [lib] Non-linear image iteration via ImageIterator.seek() (#42).
    • [lib] Image category subclasses (of BaseImage), TextImage and GraphicsImage (#44).
    • [lib] Automatic font ratio computation (#45).
    • [lib] term_image.FontRatio enumeration class (#45).
    • [lib] Support for style-specific parameters and format specification (#47).
    • [lib] Style-specific exception classes (#47).
    • [lib] ITerm2Image class, iterm2 render style; Support for the iTerm2 inline image protocol (#50).
    • [lib] term_image.TermImageWarning; pacage specific warning category (#50).
    • [lib] Auto background color i.e using the terminal's default BG color for transparent images (#54).
    • [lib] ImageIterator.loop_no property (7de6b4a).
    • [cli] --style command-line option for render style selection (#37).
    • [cli] kitty render style choice for the --style command-line option (#39).
    • [cli] --force-style to bypass render style support checks (#44).
    • [cli] --auto-font-ratio for automatic font ratio determination (#45).
    • [cli] Support for style-specific options (#47).
    • [cli] --kz/--kitty-z-index 'kitty' style-specific option (#49).
    • [cli] iterm2 render style choice for the --style command-line option (#50).
    • [cli] --itn/--iterm2-native and --itn-max/--iterm2-native-maxsize style-specific CL options for 'iterm2' native animation (#50).
    • [cli] --kc/--kitty-compress 'kitty' style-specific option (#51).
    • [cli] --query-timeout command-line option (3b658f3).
    • [cli] --itc/--iterm2-compress, --itjq/--iterm2-jpeg-quality and --itnrff/iterm2-no-read-from-file style-specific command-line options (#55).
    • [cli] -multi command-line option (2c2d240).
    • [cli] --swap_win_size and --no-swap_win_size command-line options (4f9178f).
    • [tui] Concurrent/Parallel frame rendering for TUI animations (#42).
    • [tui] Key codes in the help menu (bd87a3b).
    • [cli,tui] no multi, query timeout and style config options (2c2d240).
    • [cli,tui] Attempt to set window title at startup (5a2976a).
    • [cli,tui] swap win size config option (4f9178f).
    • [lib,cli,tui] Support for the Kitty terminal graphics protocol (#39).
    • [lib,cli,tui] Automatic render style selection based on the detected terminal support (#37).

    Changed

    • [lib] TermImage is now a subclass of BaseImage (#34).
    • [lib] Instantiation via the class constructor now initializes the seek position of animated images to the current seek position of the given PIL image (#34).
    • [lib] On UNIX, the library now attempts to determine the proper terminal device to use when standard streams are redirected to files or pipes (#36).
    • [lib] BaseImage.source now raises TermImageException when invoked after the instance has been finalized (#38).
    • [lib] Improved repr() of image instances (#38).
    • [lib] Direct baseclass of TermImage to TextImage (#44).
    • [lib] TermImage to BlockImage (#46).
    • [lib] Exception naming scheme (#46).
      • TermImageException to TermImageError.
      • InvalidSize to InvalidSizError.
    • [lib] Image resampling method from BICUBIC to BOX (#54).
    • [lib] Transparent renders in text-based styles are now partially blended with the terminal's BG color (#54).
    • [lib] Optimized image render data computation and image formatting (#54).
    • [cli] -S from --scroll to --style (#44).
    • [cli] CLI mode is now forced when output is not a TTY (#56).
    • [cli,tui] Changed default value of font ratio config option to null (#45).
    • [cli,tui] Improved startup speed and source processing (#56).
    • [cli,tui] Improved config error handling (#56).

    Deprecated

    • [lib] term_image.image.TermImage (#46).
    • [lib] TermImageException and InvalidSize in term_image.exceptions (#46).
    Source code(tar.gz)
    Source code(zip)
    term-image-0.4.0.tar.gz(93.92 KB)
    term_image-0.4.0-py3-none-any.whl(103.30 KB)
  • v0.3.1(May 4, 2022)

  • v0.3.0(Apr 26, 2022)

    [0.3.0] - 2022-04-26

    Fixed

    • [lib] Fixed the scroll parameter of TermImage.draw() (#29).
    • [tui] Fixed TUI crashing when "max notifications" config option is set to 0.
    • [cli,tui] Fixed handling of some errors in the viewer (#33).

    Changed

    • Renamed the project, CLI executable, top-level package and user directory (#28)
    • [lib] Changed sizing units to columns and lines (#29).
    • [lib] Padding width is now validated only when drawing to the terminal (via TermImage.draw()) (#32).
    • [cli,tui] Updated the viewer's exit codes (#33).
    • [test] Updated and re-organized the test suite (#31).

    Deprecated

    • [lib] Deprecated top-level package name term_img (#28).

    Removed

    • [lib] Removed "size too small" check and exception when setting size (#29).
    Source code(tar.gz)
    Source code(zip)
    term_image-0.3.0-py3-none-any.whl(67.47 KB)
  • v0.2.0(Apr 16, 2022)

    [0.2.0] - 2022-04-16

    Fixed

    • [lib] Size validation is no longer forced for non-animated drawing of animated images.
    • [cli] Properly handled unexpected exceptions while processing file and URL sources.
    • [cli] All error messages are written directly to the console go to STDERR.
    • [cli] Fixed deadblock when the program exits immediately after parsing arguments.
    • [cli] "Opening ..." logs and notifications for file sources.
    • [tui] Fixed switching back to the normal buffer after the TUI exits on some terminals.
    • [tui] Greatly reduced delay in displaying grids.
    • [tui] The grid cell in focus now retains focus, no matter the changes in grid or cell size.
    • [cli,tui] Handled indirectly cyclic symlinks.
    • [cli,tui,config] Corrected all platform-dependent path separators.

    Added

    • [lib] term_img.image.ImageIterator for efficient iteration over rendered frames of animated images.
    • [lib] Iteration support for TermImage.
    • [lib] scroll, repeat and cached parameters to TermImage.draw().
    • [cli] Parallel and concurrent processing of sources, using multiprocessing and multithreading.
    • [cli] Command-line argument value checks.
    • [cli] INVALID_ARG exit code for invalid command-line argument values.
    • [cli] --max-pixels-cli to apply "max pixels" config and --max-pixels in CLI mode.
    • [cli] --reset-config to restore default configurations.
    • [cli] Animation-related command-line options: --repeat, --anim-cache, --cache-all-anim, --cache-no-anim.
    • [cli] Performance-related command-line options: --checkers, --getters, --grid-renderers, --no-multi.
    • [tui] Menu list numbering/count.
    • [tui] Asynchronous updating of the menu list and grid views.
    • [tui] Asynchronous and gradual rendering of grid cells.
    • [tui] Asynchronous image rendering.
    • [tui] Implemented "Force Render" action in view contexts for animated images.
    • [tui] Progress indication.
    • [cli,tui] Maximum recursion depth functionality with -d | --max-depth`.
    • [cli,tui] QUIET mode with -q | --quiet.
    • [cli,tui] Separate color for WARNING-level console notifications.
    • [cli,tui] processName and threadName log fields (only at DEBUG logging level).
    • [cli,tui] Full exception log when a session is terminated due to an exception.
    • [config] New config options: anim cache, log file, max notifications, checkers, getters and grid renderers.
    • [cli,config] Descriptive error messages for config options (and the correspoding command-line options, if there is).

    Changed

    • Bumped Pillow minimum version to 9.1.0 (because of Pillow #6077)
    • Bumped requirement versions:
      • Pillow -> 9.1.0
      • requests -> 2.27.1
      • black -> 22.3.0
    • [lib] The cursor is now hidden while drawing images.
    • [lib] TermImage.source now gives the absolute file path for file-sourced instances instead of the real path.
    • [lib] Deferred frame count computation till TermImage.n_frames is first invoked.
    • [lib] Animated image frame duration is now derived from the image metadata, if available.
    • [lib] The names and semantics of some parameters of TermImage.set_size():
      • check_height -> fit_to_width
      • check_width -> fit_to_height
    • [lib] Renamed ignore_oversize paramter of TermImage.draw() to check_size and modified the semantics accordingly.
    • [lib,cli,tui] Improved image animation performance.
    • [lib,cli,tui] Automatic caching of animation frames is now based on number of frames.
    • [cli] The current working directory is used if no source is specified.
    • [cli] Allowed abbreviation of options and clustering in Python 3.7.
    • [cli] Modified the semantics of --scroll, --fit-to-width and --oversize.
    • [cli] Optimized non-recursive directory checks.
    • [cli] File and URL sources are now processed concurrently.
    • [cli] Directory sources are now processed in parallel with one another and with file and URL sources, if supported. Otherwise they are processed sequentially with one another and concurrently with file and URL sources.
    • [cli] Disabled processing of directory sources on Windows, since the TUI is not supported.
    • [tui] Faulty image loads are now reported only once per image, per directory scan.
    • [tui] Changed entry sorting and grouping order.
    • [tui] Improved grid display and grid cell rendering performance.
    • [tui] Improved directory scanning and entry sorting performance.
    • [cli,tui] Using absolute paths in place of real paths; Better handling of symlinks.
    • [cli,tui] Upgraded the logging system.
    • [config] Stylized config messages.
    • [config] Improved config update routine.
    • [config] Limited cell width option to the range 30 <= x <= 50.
    • [tui,config] Prepended the symbols of all uppercase keys with '⇧' (U+21e7)

    Removed

    • [lib] size validation when setting render size based on the terminal size.
    • [lib,cli,tui] Support for Python 3.6.
    • [config] frame duration config option.
    Source code(tar.gz)
    Source code(zip)
    term_image-0.2.0-py3-none-any.whl(66.06 KB)
  • v0.1.1(Jan 29, 2022)

Owner
My avatar ;D
Currently into Hardware Development and (general) software development... I love solving Problems!
My avatar ;D
git-partial-submodule is a command-line script for setting up and working with submodules while enabling them to use git's partial clone and sparse checkout features.

Partial Submodules for Git git-partial-submodule is a command-line script for setting up and working with submodules while enabling them to use git's

Nathan Reed 15 Sep 22, 2022
Tool for HackMyVM platform

HMV-cli It is a tool for the HackMyVM platform. With this tool you will be able to see the machines you have pending, filter by difficulty, download d

bitc0de 11 Sep 19, 2022
A very simple and lightweight ToDo app using python that can be used from the command line

A very simple and lightweight ToDo app using python that can be used from the command line

Nilesh Sengupta 2 Jul 20, 2022
A Telegram Bot Written In Python To Upload Medias To telegra.ph

Telegraph-Uploader A Telegram Bot Written In Python To Upload Medias To telegra.ph DEPLOY YOU CAN SIMPLY DEPLOY ON HEROKU BY CLICKING THE BUTTON BELOW

Rithunand 31 Dec 03, 2022
Password manager for the CLI simps.

CLI Password Manager Password manager for the CLI simps. Free software: MIT license

1 Dec 30, 2021
Sebuah tools agar tydak menjadi sider :v vrohh

Sebuah tools agar tydak menjadi sider :v vrohh

xN7-SEVEN 1 Mar 27, 2022
A Simple Python CLI Lockpicking Tool

Cryptex a simple CLI lockpicking tool What can it do: Encode / Decode Hex Encode / Decode Base64 Break Randomly :D Requirements: Python3 Linux as your

Alex Kollar 23 Jul 04, 2022
Open-Source Python CLI package for copying DynamoDB tables and items in parallel batch processing + query natural & Global Secondary Indexes (GSIs)

Python Command-Line Interface Package to copy Dynamodb data in parallel batch processing + query natural & Global Secondary Indexes (GSIs).

1 Oct 31, 2021
🌈 Beautify your command line interfaces.

Basics Install: pip install iridi Usage: import iridi # Create gradient text # iridi.print(message, colors, options) # Ask for input with gradient

Conrad Crawford 39 Oct 20, 2022
A Python package for a basic CLI and GUI user interface

Organizer CLI Organizer CLI is a python command line tool that goes through a given directory and organizes all un-folder bound files into folders by

Caltech Library 12 Mar 25, 2022
Command line util for grep.app - Search across a half million git repos

grepgithub Command line util for grep.app - Search across a half million git repos Grepgithub uses grep.app API to search GitHub repositories, providi

Nenad Popovic 18 Dec 28, 2022
Magnificent app which corrects your previous console command.

The Fuck The Fuck is a magnificent app, inspired by a @liamosaur tweet, that corrects errors in previous console commands. Is The Fuck too slow? Try t

Vladimir Iakovlev 75k Jan 02, 2023
Standalone Tailwind CSS CLI, installable via pip

Standalone Tailwind CSS CLI, installable via pip Use Tailwind CSS without Node.j

Tim Kamanin 144 Dec 22, 2022
doq (python docstring generator) extension for coc.nvim

coc-pydocstring doq (python docstring generator) extension for coc.nvim Install CocInstall: :CocInstall coc-pydocstring vim-plug: Plug 'yaegassy/coc-p

yaegassy 27 Jan 04, 2023
A command line tool that creates a super timeline from SentinelOne's Deep Visibility data

S1SuperTimeline A command line tool that creates a super timeline from SentinelOne's Deep Visibility data What does it do? The script accepts a S1QL q

Juan Ortega 2 Feb 08, 2022
Doing set operations on files considered as sets of lines

CLI tool that can be used to do set operations like union on files considering them as a set of lines. Notes It ignores all empty lines with whitespac

Partho 11 Sep 06, 2022
A tool to automatically convert old string literal formatting to f-strings

flynt - string formatting converter flynt is a command line tool to automatically convert a project's Python code from old "%-formatted" and .format(.

Elijah K 551 Jan 06, 2023
Magma is a NeoVim plugin for running code interactively with Jupyter.

Magma Magma is a NeoVim plugin for running code interactively with Jupyter. Requirements NeoVim 0.5+ Python 3.8+ Required Python packages: pynvim (for

Daniel Csillag 372 Dec 26, 2022
A CLI framework based on asyncio

asynccli A CLI framework based on asyncio. Note This is still in active development. Things will change. For now, the basic framework is operational.

Adam Hopkins 6 Nov 13, 2022
A simple note taker CLI program written in python

note-taker A simple note taker program written in python This allows you to snip your todo's, notes, and your tasks easily without extra charges Requi

marcusz 4 Nov 02, 2021