https://github.com/toddsundsted/iterm2
Display images within the terminal using the ITerm2 Inline Images Protocol.
https://github.com/toddsundsted/iterm2
crystal iterm2
Last synced: 12 months ago
JSON representation
Display images within the terminal using the ITerm2 Inline Images Protocol.
- Host: GitHub
- URL: https://github.com/toddsundsted/iterm2
- Owner: toddsundsted
- License: other
- Created: 2020-02-16T01:30:00.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2021-07-09T23:47:07.000Z (over 4 years ago)
- Last Synced: 2025-04-10T05:16:14.584Z (12 months ago)
- Topics: crystal, iterm2
- Language: Crystal
- Size: 33.2 KB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-crystal - iterm2 - Display images within the terminal using the ITerm2 Inline Images Protocol (Misc)
README
# iterm2
[](https://github.com/toddsundsted/iterm2/releases)
[](https://github.com/toddsundsted/iterm2/actions)
[](https://toddsundsted.github.io/iterm2/)
Displays images within the terminal using the ITerm2 [Inline Images
Protocol](https://iterm2.com/documentation-images.html).
Requires [ITerm2](https://iterm2.com/).
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
iterm2:
github: toddsundsted/iterm2
```
2. Run `shards install`
## Usage
```crystal
require "iterm2"
File.open("unicorn.png") do |file|
Iterm2.new.display(file)
end
```
The `#display` method also accepts a block and yields an instance of
`IO` that may be written to. See the documentation for the full API.
## Contributors
- [Todd Sundsted](https://github.com/toddsundsted) - creator and maintainer