Sign in to follow this  
Followers 0
Hermes II BBS SysOp

Help Needed With Toilet Command Line Tool

3 posts in this topic

Greetings friends,

 

I posted the following message a few other places online, but I wanted to post it here as well, just in case someone here can assist me.


Recently, I have been discovering some very cool command line ASCII and ANSI tools, such as jp2a, imagemagick, libcaca and toilet.

Unless you are into ASCII and ANSI graphics, and are involved in running a BBS, these little programs will probably be of little interest to you.

However, if you are knowledgeable of such things, right now I am having a problem figuring out how to export an ANSI graphic from toilet to a text file on my hard drive. I can't figure out if the file is even being created, and if so, where it is being exported to on my hard drive. According to one Debian user on the mewbies.com website, the graphic should be exported to the "working directory", which in the case of a Mac OS X user, I assume means the Home folder. However, I see nothing being created there.

If you are familiar with toilet, please let me know. I have looked at the man page, but while it briefly discusses the --export parameter, it does not specifically say where the graphic is exported to on an OS X machine.

Thanks so much!

 

0

Share this post


Link to post
Share on other sites

Does toilet print its output to the terminal, like figlet? If so, you can redirect the output to a textfile one of several ways:

 

`toilet -your -options here > output.txt` will create a new file called output.txt with all of the CLI output (overwrites output.txt if it exists)

`toilet -your -options here >> output.txt` will append output.txt, or create if it doesn't exist

`toilet -your -options here | tee output.txt` will append output.txt, but also print to the terminal too

 

Note that shell redirection works on most command line tools that output to the console. You may have to redirect STDERR instead of STDOUT for some things, or combine them (e.g. wget). In general, command line tools in a *NIX environment are meant to talk to each other via text streams, piped ( the | symbol ) or redirected ( >, >>, < ) between commands.

 

There's a boatload of really nifty command line image tools for *NIX. I use imagemagick and its associated tools all the time, either directly or through libraries for other programming languages.

0

Share this post


Link to post
Share on other sites

There's actually a program called "toilet"?

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0