Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/z0mbieparade/c0lorize
simple node script to convert a text file to colors for motd or other irc ascii art
https://github.com/z0mbieparade/c0lorize
ansi ascii ascii-art color escape-codes irc motd node-js unicode
Last synced: 7 days ago
JSON representation
simple node script to convert a text file to colors for motd or other irc ascii art
- Host: GitHub
- URL: https://github.com/z0mbieparade/c0lorize
- Owner: z0mbieparade
- Created: 2019-09-16T17:11:40.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-01T03:56:17.000Z (almost 5 years ago)
- Last Synced: 2024-07-10T02:14:12.460Z (4 months ago)
- Topics: ansi, ascii, ascii-art, color, escape-codes, irc, motd, node-js, unicode
- Language: JavaScript
- Size: 384 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# c0lorize
Needed a little script to make generating things like irc MOTD's easier. Somewhat based off of [irc-colors](https://www.npmjs.com/package/irc-colors).### Example
![c0lorize](img.png "image of steps to colorize an ascii text file")## Installation
```
git clone https://github.com/z0mbieparade/c0lorize.git
cd c0lorize
npm install
```## To Use
add an ascii text file to the c0lorize directory that you want to color. c0lorize will replace the following strings:
### Colors
Any of the following color strings can be modified with &bg[color] to make it a background color, i.e: &white&bgblack would make white text on a black background.- &0, &white
- &1, &black
- &2, &navy, &darkblue
- &3, &green, &darkgreen
- &4, &red
- &5, &brown, &maroon
- &6, &purple, &violet
- &7, &olive, &orange
- &8, &yellow
- &9, &lightgreen, &lime
- &10, &teal
- &11, &cyan, &aqua
- &12, &blue, &royal
- &13, &pink, &lightpurple, &fuchsia
- &14, &gray, &grey
- &15, &lightgray, &lightgrey, &silver### Styles
- &u, &underline
- &i, &italic
- &b, &bold
- &r, &resetCheck out the test.txt file for examples. Once you're done you can run:
```
node c0lorize.js
```
You will be prompted for:
- The file name (The default is test.txt in the c0lorize folder.)
- If you would like to reset styling after each line
- If you would like to fix a bug with some irc clients viewing \\\ as \
- If you would also like to generate an HTML file
- If you would like to validate that HTML file (only asked if previous question is true)It will then run and replace all your color codes with the correct escape codes and resave it in the same location as test_c0lorize.txt.
Optionally, you can also type:
```
node c0lorize.js somefile.txt true/false true/false true/false
```
This will pre-populate the prompts and it can make it a bit easier if you're repetitively re-running the script to make tweaks.