ansi_to_html
Version, currently master branch1 version
- master branchlatestAug 23, 2022
github.com/blitline-dev/ansi_to_html_shard
Crystal-lang shard for converting ANSI text to HTML
1 stars
0 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
ansi_to_html:
github: blitline-dev/ansi_to_html_shard
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
1.4.1- License
- MIT
- Author
- Jason
Dependencies
This version declares no dependencies.
README
ansi_to_html
Converts ANSI text to HTML output.
Very similar to ruby gem with same name and bcat ANSI code. Much faster (x10)
Installation
-
Add the dependency to your
shard.yml:dependencies: ansi_to_html: github: blitline-dev/ansi_to_html_shard -
Run
shards install
Usage
require "ansi_to_html"
To use in your code simply:
ansi_converter = AnsiToHtml.new
html = ansi_converter.to_html("colors: \x1b[30mblack\x1b[37mwhite")
Notes
Basic support for old terminals. Xterm support 256 Colors Support
Contributing
- Fork it (https://github.com/blitline-dev/ansi_to_html_shard/fork)
- Create your feature branch (
git checkout -b my-new-feature) - Commit your changes (
git commit -am 'Add some feature') - Push to the branch (
git push origin my-new-feature) - Create a new Pull Request
Contributors
- Blitline Developers - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Aug 23, 2022
- Crystal
1.4.1- Indexed
- yes
Dependents
No indexed shard depends on this one yet.
Repository
github.com/blitline-dev/ansi_to_html_shard
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 15, 2026
- Synced
- Aug 15, 2026
- Versions
- 1