9

Is there a pastebin service that supports colors? I understand some of them have syntax hilighting, but I'd like to do arbitrary coloring, preferably using the terminal escape sequences.

For example, I'd like to do:

grep --color=force foo /etc/motd | pastebinit

Does anyone know such a cool site?

7

Termbin.com supports what you need.

$ grep --color=force foo /etc/motd | nc termbin.com 9999
http://termbin.com/xxxx

$ curl http://termbin.com/xxxx

You'll get exactly what you sent.

The service is running on a free and open software called Fiche so you can also install your own.

  • 1
    that's pretty awesome! too bad the pastes aren't rendered on the web though.... but yes, this is exactly what I was looking for, thanks! – anarcat Sep 22 '14 at 16:43
  • 2
    "Life span of single paste is one month. Older pastes are deleted." — beware if you expect long-term hosting. – Anton Samsonov Jan 25 '16 at 12:54
  • This answer is technically correct - you will get exactly what you sent - but it means that you will see the ANSI codes, not the colors... – Greg Dubicki Apr 11 '18 at 15:17
5

pastebinit isn't satisfactory.

You can convert ascii/ansi to HTML via the 'aha' (ANSI HTML Adapter) command.

sudo apt-get install aha || sudo yum install aha
ls --color m* -d | aha

Unfortunately - you can't just pipe that HTML into pastebinit. You could host the HTML temporarily if various firewalls permit it:

mkdir /tmp/temphosting
ls --color m* -d | aha > /tmp/temphosting/cmd.html
cd /tmp/temphosting
python -m SimpleHTTPServer

Then point a web browser to http://ip.or.host.name:8000/cmd.html

3

There is actually a new service I just found out about called asciinema.org which provides on-screen recording facilities. It is not a pastebin, but it is probably the best approximation of what I was looking for.

3

I just stumbled upon this pastebin that appears to support ANSI colors with Unicode chars!

Seems that it was specifically designed for old school BBS Unicode ANSI color artwork... check it out:

http://paste.sixteencolors.net/6

  • 2
    Seems to be gone. – skagedal Mar 16 '15 at 14:15
  • Good catch! Looks like that link gives a 502 Bad Gateway error currently. It would appear that something changed, and paste.sixteencolors.net no longer is a working URL. Seems that http://sixteencolors.net/ still gives a page that works, however I can't find the pastebin functionality anymore. Seems that they have a web page where you can create ANSI Art here – TrinitronX Mar 16 '15 at 17:24
  • Both link in this answer and the links in the comment above give 404s as of writing these words. – Greg Dubicki Apr 11 '18 at 14:58
  • 1
    Yeah, sadly this site has gone away :-( – TrinitronX Apr 12 '18 at 18:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.