Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tommythorn/iterm2canvas
A simple iTerm2 terminal inline picture library
https://github.com/tommythorn/iterm2canvas
Last synced: about 5 hours ago
JSON representation
A simple iTerm2 terminal inline picture library
- Host: GitHub
- URL: https://github.com/tommythorn/iterm2canvas
- Owner: tommythorn
- Created: 2024-08-29T17:21:21.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2024-09-09T04:12:57.000Z (4 months ago)
- Last Synced: 2025-01-11T16:16:17.122Z (5 days ago)
- Language: Rust
- Size: 59.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A simple iTerm2 terminal inline picture library
Having graphics directly in the terminal, as supported by
[iTerm2](https://iterm2.com/),
[kitty](https://sw.kovidgoyal.net/kitty/) and others is very
convenient. This minimal crate provides an easy way to create
graphics with minimal fuss (though it currently only support iTerm2).# Example - a yellow block
Include
```
iterm2canvas = { git = "https://github.com/tommythorn/iterm2canvas" }
```
as a dependency in your `Cargo.toml` and
```
use iterm2canvas::Pict;fn main() {
let mut pict = Pict::new(100, 100);
for x in 0..100 {
for y in 0..100 {
pict.plot(x, y, 0xFFFF00);
}
}
pict.dump_iterm2_image(None);
}
```as `main.rs` to get
![terminal example](picture/example.png)