Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

RumorzGuy

macrumors 6502
Original poster
Sep 17, 2008
264
82
Guam, Mariana Islands, U.S.A.
Greetings Folks,

I posted the message below in several other online forums, but I wanted to post it here as well, just in case someone here can assist me, being as it is a bit esoteric in nature.

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 in advance.
 

Naio

Cancelled
Apr 2, 2015
75
11
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.

The working directory doesn't have to be in your Home folder. It probably is by default when you first open the Terminal.

To ensure your working directory is set to your Home folder you can type the following command before you try and export:
Code:
cd ~
 

RumorzGuy

macrumors 6502
Original poster
Sep 17, 2008
264
82
Guam, Mariana Islands, U.S.A.
Hello. Thanks for your response.

As it turns out, as I suspected all along, in this case, the work folder is indeed my Home folder, which is what I actually prefer.

The problem -- which another person pointed out to me in another forum -- is that in the man page for toilet, it makes no mention of the fact that you have to specify an actual output file name in the command line.

As a result, I was trying this . . .

toilet --export ansi --font bigascii12 -F gay "THANKS"

and this . . .

toilet --font bigascii12 -F gay "THANKS" --export ansi

. . . and getting nowhere fast. The minute that I added the name of the intended output file, like this . . .

toilet --export ansi --font bigascii12 -F gay "THANKS" >output.txt

toilet began to create the output file in my Home folder, with the desired ANSI-coded text.

Now I am a happy camper.

The only problem is that toilet includes a lot of redundant code in the output text file, which I had to take the time to remove.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.