Forking Chrome to Render in a Terminal

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • SonarQube - Static code analysis for 29 languages.
  • InfluxDB - Access the most powerful time series database as a service
  • SaaSHub - Software Alternatives and Reviews
  • libsixel

    A SIXEL encoder/decoder implementation derived from kmiya's sixel (https://github.com/saitoha/sixel).

    Sixels are pixels and enjoy a wide support due to how old it is.

    Kitty protocol is PNG or primitives - which BTW would make it great for a GUI library.

    Different tools for different needs, but if you are going for a wide support you want something simple that doesn't have 5 different types you have to separately implement and test:

    > d: Direct (the data is transmitted within the escape code itself)

    > f: A simple file (regular files only, not named pipes or similar)

    > t: A temporary file, the terminal emulator will delete the file after reading the pixel data. For security reasons the terminal emulator should only delete the file if it is in a known temporary directory, such as /tmp, /dev/shm, TMPDIR env var if present and any platform specific temporary directories and the file has the string tty-graphics-protocol in its full file path.

    > s: A shared memory object, which on POSIX systems is a POSIX shared memory object and on Windows is a Named shared memory object. The terminal emulator must read the data from the memory object and then unlink and close it on POSIX and just close it on Windows.

    > What nonsense, it takes literally 15 lines of code without using anything beyond the standard library to write a client

    Conveniently taking a preencoded PNG and assuming away the necessary queries of supported protocol:

    > Since a client has no a-priori knowledge of whether it shares a filesystem/shared memory with the terminal emulator, it can send an id with the control data, using the i key (which can be an arbitrary positive integer up to 4294967295, it must not be zero).

    > for the kitty graphics protocol. I challenge you to match that for sixel

    https://github.com/saitoha/libsixel/tree/master/perl

        use Image::LibSIXEL;

  • chromium

    The official GitHub mirror of the Chromium source

  • SonarQube

    Static code analysis for 29 languages.. Your projects are multi-language. So is SonarQube analysis. Find Bugs, Vulnerabilities, Security Hotspots, and Code Smells so you can release quality code every time. Get started analyzing your projects today for free.

  • term-gfx

    Terminal Graphics

    This is really neat. Did you consider using the full range of Unicode block glyphs to squeeze out a little bit more resolution from the terminal vs just using the half-block?

    https://github.com/blitzcode/term-gfx/blob/master/src/main.r...

    You're still just getting two colors per character, but I think it works quite nicely.

  • browsh

    A fully-modern text-based browser, rendering to TTY and browsers

  • sixel-gnuplot

    GNUplot with sixel support

    sixel-tmux works literally anywhere you can use tmux: as long you can display unicodes on your terminal, the sixels will be "captured" by sixel-tmux and converted into something you can see. Sixels are in-band, so ssh isn't a problem.

    In a way, using sixel-tmux is like "giving magical goggles" to your terminal, to let it render sixels so you can see something (even if it isn't perfect), in the hope you'll be tempted to use a better terminal that will show you sixels in all their glory, with a pixel perfect quality.

    Sixels enable all kind of cool things, like gnuplot right in your terminal (cf https://github.com/csdvrx/sixel-gnuplot ): sometimes I even watch youtube on my terminal lol

    sixel-tmux was made as a first step towards turning derasterize into a more general library: my plan was to add it to nnn but I got bored along the way and moved to other stuff. I might still do that I I love nnn as a filemanager.

    BTW, even if there have been quite a few interesting work by @hpa and others in the last 2 years, I think derasterize still has textmode supremacy. derasterize is a collab with @jart after I started adding features to her previous solutions which was based on half blocks like this solution; she's also made further work based on this like https://justine.lol/printimage.html and https://justine.lol/printvideo.html

  • CuteXterm

    Sensible defaults for xterm in the 21st century

    > Most emulate an xterm, which didn't have support for graphics

    Start your xterm with the right flags and it will.

    If you want a premade configuration, see https://github.com/csdvrx/CuteXterm

  • lfimg-sixel

    Image preview support for lf-sixel

  • InfluxDB

    Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.

  • notcurses

    blingful character graphics/TUI library. definitely not curses.

  • Servo

    The Servo Browser Engine

    Given it's in Rust, I wonder if something like that could be based on top of Servo instead [1].

    [1] https://github.com/servo/servo/issues/24162

  • alacritty-sixel

    A cross-platform, OpenGL terminal emulator. (by chrhasse)

    You definitely want to use alacritty-sixel:

      https://github.com/chrhasse/alacritty-sixel

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts