Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/phmajerus/ansi-art
Philippe Majerus’s ANSI-art collection
https://github.com/phmajerus/ansi-art
ansi-art cmd command-line console curl pseudo-pixels semigraphics terminal unicode unicode-art vt100
Last synced: 2 days ago
JSON representation
Philippe Majerus’s ANSI-art collection
- Host: GitHub
- URL: https://github.com/phmajerus/ansi-art
- Owner: PhMajerus
- Created: 2018-07-29T17:46:07.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2024-10-03T15:18:30.000Z (3 months ago)
- Last Synced: 2024-12-13T05:36:57.707Z (9 days ago)
- Topics: ansi-art, cmd, command-line, console, curl, pseudo-pixels, semigraphics, terminal, unicode, unicode-art, vt100
- Homepage:
- Size: 309 KB
- Stars: 62
- Watchers: 1
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ANSI-art
Random ANSI-art files![Screenshot](Sample%20AnsiArt.png)
.txt files are UTF-8. These can be displayed simply using curl with their raw URL. For example:
`curl -s 'https://raw.githubusercontent.com/PhMajerus/ANSI-art/master/Lxss-VTArt-Red.txt'`.ans and .asc files are CP437 (MS-DOS US) files, sometimes containing a SUB as an end-of-file. These can be displayed using curl piped to iconv to convert CP437 to UTF-8 and then to sed to trim anything from SUB. For example:
`curl -s 'https://raw.githubusercontent.com/PhMajerus/ANSI-art/master/Super%20Mario%20castle%20(wide)%20(256%20colors).ans' | iconv -f CP437 | sed 'H;$!d;x;s/\x1A.*$//'`In cmd.exe, simply use the "type" command with local copies of the files, using "chcp 437" first for CP437 .ans and .asc files and "chcp 65001" for UTF-8 .txt files.
In ActiveScript Shell, use the following functions:\
JScript\
`function getAnsi(url) { var xhr = new XMLHttpRequest(); xhr.open("GET",url,false); xhr.send(); return Encodings.binaryToText(xhr.responseBody,437).trimSUB(); }`\
`echo(getAnsi("https://raw.githubusercontent.com/PhMajerus/ANSI-art/master/Super%20Mario%20castle%20(wide)%20(256%20colors).ans"));`\
VBScript\
`Function GetAnsi(URL): Dim XHR: Set XHR=CreateObject("MSXML2.XMLHTTP.6.0"): XHR.Open "GET",URL,False: XHR.Send: GetAnsi=TrimSUB(Encodings.BinaryToText(XHR.ResponseBody,437)): End Function`\
`Echo GetAnsi("https://raw.githubusercontent.com/PhMajerus/ANSI-art/master/Super%20Mario%20castle%20(wide)%20(256%20colors).ans")`