winprint
derasterize
winprint | derasterize | |
---|---|---|
1 | 6 | |
69 | 103 | |
- | - | |
0.0 | 1.8 | |
10 months ago | over 3 years ago | |
C# | C | |
MIT License | GNU General Public License v3.0 or later |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
winprint
-
Everything you ever wanted to know about terminals(but were afraid to ask)
I built a cross platform app to print 'pretty formatted' source code [1]. I didn't want to re-invent the wheel on formatting source code, so looked at all the existing libraries. Originally I figured formatting to HTML, and then building a print-friendly HTML render would work. But this proved super challenging. I tried a dozen HTML engines (including Chromium) but none gave me enough control to render just a single page of the original source file.
Then I noticed Pygments, a Python-based library for pretty formatting source code, has an option to output an ANSI formatted file. I quickly found a bunch of libraries that could render ANSI formatted text to a print canvas.
In the end, I put the original source code file through 'pygmentize -16m -o tempfile.an` (`16m` is the 16M color terminal ANSI formatter) and pipe the `tempfile.an` through a print-optimized renderer to actually print the source code.
ANSI escapes FTW!
[1] WinPrint - https://github.com/tig/winprint
derasterize
- C source file, that is also a valid shell script
-
Terminal Graphics for the 21st Century
Far far better than caca.
The subset of usable characters (glyphs) roughly defines how accurate the picture can be represented: if all you have is - and _ and you want to represent an horizontal pipe, it'll be ugly.
Of course it's more complicated than that, but caca uses ascii, while chafa uses a larger unicode range.
The example is illustrated in picture on https://github.com/csdvrx/derasterize where the left is the original basicidea.c using only unicode halfblocks, and the right has more candidate of different shapes.
Derasterize lets you select the width of the range you want to use, to improve encoding time say for video - but ideally, you would be able to test that whatever font you are using contains the glyphs you want.
- Rust Is Portable
-
Everything you ever wanted to know about terminals(but were afraid to ask)
She's not only done work with sixels but she's the maintainer of the highest quality tool for rendering images as unicode blocks. https://github.com/csdvrx/derasterize
-
Alacritty with sixel
On the application side, there is as yet exactly one terminal multiplexer that can handle images inside multiple terminals, but someone (saitoha?) did make a dev branch of tmux that could do it. /u/csddvx has I think the most recent version of that ; and her derasterize can make sixel work with non-sixel terminals which is a really neat trick.
-
Show HN: I wrote a rust program to translate images into textual line art
For better quality, check https://github.com/csdvrx/derasterize
Example in Windows Terminal:
What are some alternatives?
libapps - Fork of https://chromium.googlesource.com/apps/libapps/
tv - Quickly view (satellite) imagery directly in your terminal using Unicode 9.0 characters and true color.
CsharpToColouredHTML - C# to HTML Converter with syntax highlighting
Windows Terminal - The new Windows Terminal and the original Windows console host, all in the same place!
blessed - Blessed is an easy, practical library for making python terminal apps
sixel-tmux - sixel-tmux is a fork of tmux, with just one goal: having the most reliable support of graphics
pyroscope-rs - Pyroscope Profiler for Rust. Profile your Rust applications.
rules_closure - Closure rules for Bazel
chafa - 📺🗿 Terminal graphics for the 21st century.
bazel-buildfarm - Bazel remote caching and execution service
tiv - terminal image viewer