#! rnews 14474 Xref: news.demon.co.uk alt.ascii-art:6657 Path: news.demon.co.uk!demon!dispose.news.demon.net!demon!baron.netcom.net.uk!netcom.net.uk!cpk-news-hub1.bbnplanet.com!news.bbnplanet.com!newsfeed.internetmci.com!203.97.37.6!clear.net.nz!not-for-mail From: Colin Douthwaite Newsgroups: alt.ascii-art Subject: Re: [pic] Font Date: 14 Jun 1998 04:29:29 GMT Organization: Southern Internet Services Message-ID: <897798559.579157@mnementh.southern.co.nz> NNTP-Posting-Host: mnementh.southern.co.nz User-Agent: tin/pre-1.4-980226 (UNIX) (SunOS/5.4 (sun4m)) Lines: 338 In Message-ID: <6lhtc7$8tk$1@tron.sci.fi> Dated 8 June 1998 iltzu@sci.fi (Ilmari Karonen) wrote: > I've recently studied the FIGLet source code quite thoroughly, > with the intention of some day (if I ever find the time) doing a > rather major rewrite Ah, so you can handle source code? Way back in 1994 I tried several times to tempt somebody to produce executables for MS-DOS from the following material which contains source code for Ascii Art Tools allowing rotation of existing Ascii art pictures. Does the project appeal to you? I have never been successful in using compilers to compile executables from source code. I always end up with too many errors I cannot fix. Here is the old posting containing the material: ======================================================================== From: jsbell@acs.ucalgary.ca (Joshua Bell) Newsgroups: rec.arts.ascii,alt.binaries.pictures.ascii,alt.ascii- art,alt.binaries.pictures.utilities Subject: [TECHNICAL] ASCII Tools (was Re: Flipping ASCII Pictures) Date: 31 Jul 1994 08:58:59 -0500 Organization: University Computing Services (The University of Calgary) Lines: 297 Sender: boba@gagme.wwa.com Approved: boba@wwa.com Message-ID: <31gan3$1l0@gagme.wwa.com> NNTP-Posting-Host: gagme.wwa.com Here's a short collection of Unix utilities for manipulating ASCII pictures. Contents: asciitool.c - Source posted in parent article, somewhat debugged. Does "raw" flips (no remapping) lr - /bin/sh script that flips ASCII left to right and maps character shapes (eg, [ --> ] ) Here's a legal blurb from lr: # Copyright (C) 1994 by Jef Poskanzer. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, provided # that the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation. This software is provided "as is" without express or # implied warranty. tb - Similar utility that does top-bottom flipping Requires asciitool cw90 - Does clockwise 90 rotations. Requires asciitool ccw90 - Does counterclockwise 90 rotations. Requires asciitool The four shell scripts are rather simple. They simply use asciitool (lr uses "rev", actually) then use tr to process the output through a mapping of characters. Syntaxes: asciitool -{mh|mv|r90|r180|r270} [Infile [Outfile]] -mh Mirror horizontally -mv Mirror vertically -r90 Rotate 90 degrees counterclockwise -r180 Rotate 90 degrees counterclockwise -r270 Rotate 90 degrees counterclockwise lr [Infile] tb [Infile] cw90 [Infile] ccw90 [Infile] (Infile defaults to standard input, Outfile defaults to standard output) For example: lr picture | tb > picture_rotated_180_degrees cal | asciitool -r90 Note: None of these utilities rescale images or attempt to do anything beyond the scope of a single character cell. So rotated images are almost always going to be extremely distorted. Examples: ($ is my prompt) $ cat genie _.---.__ .' `-. / .--. | \/ / / |_/ `\/|/ _(_) ___ /|_.--' `. . \ `--' .---. \ /| ) ` \ //| | __ __ | '/|| |/ \ / \ / || || | | \ \ | \| | | / | __\\@/ |@ | ___ \--' ( /' `--' __)| __> ( . .--' &"\ / `--|_/--' & | | #. | | q# | \ ,ad#' `.________.ad####' `#####""""""'' `&#" &# "& "#ba" $ lr genie __.---._ .-' `. | .--. \ \_| \ \ \/ (_)_ \|\/' . .' `--._|\ ___ |\ / .---. `--' / |\\ / ' ( ||\` | __ __ | || \ / \ / \| | / / | | || | \ | | |/ `--/ ___ | @| \@//__ |(__ `--' `\ ) /"& `--. . ) <__ | & `--\_|--' \ | .# | | #p | `#ba. / `####ba.________.' ``""""""#####' "#&' &" #& "ad#" $ tb genie .#Pa. &# .& ,&#. ,#####........ ,'~~~~~~~~'ad####. / `ad#. | d# | | #' | \ ,--|~\--. & | ~~> ( ' '--. &./ ( \. ,--. ~~)| ~~//@\ |@ | ~~~ /--. /| | | \ | || | | / / | |\ / \ / \ || | ~~ ~~ | .\|| ) , / \\| / ,--. '---' / \| ~~~ \|~'--. ,' ' ,/\|\ ~(~) /\ \ \ |~\ \ '--' | '. ,-' ~'---'~~ $ tb genie | lr .aP#. &. #& .#&. ........#####. .####ba`~~~~~~~~`. .#ba' \ | #b | | `# | | & .--/~|--. / \.& .--` ` ) <~~ |(~~ .--. ./ ) .--\ ~~~ | @| /@\\~~ | / | | |\ | \ \ | | || || / \ / \ /| ||/. | ~~ ~~ | |// \ . ( |/ \ `---` .--. \ ` `. .--`~|/ ~~~ (~)~ /|/\. /~| / / /\ | `--` / `-. .` ~~`---`~ $ cw90 genie --\ / | / |n . v | /| /| / |/---u | /#| | /--\ | /\ :&&#| | / | / /\ . ####| -n @ | | / \ b :#| | \\--/ /|\\ | a: #| \ \ \--\ . :& :| |. |\ | :| | /---\ .. \ | :. \ |@ | || . | :a .| | || | . :d |\- / |\ | | :# | \/ . | . | \#\ \ | / n- / \#a || - || | #dq#&&|| u\ . \##. :u / - \ /-/ . --- | /\\ / | \\ \ --\\ ------. $ ccw90 genie .------ \\-- \ \\ | / \\/ | --- . /-/ \ - / n: .##\ . \n ||&&#qd# | || - || a#\ / -u / | \ \#\ | . | . /\ | #: | | \| / -\| d: . | || | |. a: | . || | @| \ .: | \ .. \---/ | |: | \| .| |: &: . \--\ \ \ |# :a | \\|/ /--\\ | |#: b \ / | | @ u- |#### . \/ / | / | |#&&: \/ | \--/ | |#/ | n---/| / |/ |/ | ^ . u| / | / \-- And here's the collection itself. tar.gz.uu format, so: (1) save the "begin" line and anything following it to asciitools.tar.gz.uu (2) type uudecode asciitools.tar.gz.uu (3) type gunzip asciitools.tar.gz (4) type tar -xf asciitools.tar You'll have an asciitools/ directory. cd into it and type: cc -o asciitool asciitool.c Joshua ----- CUT HERE --------->8------------- CUT HERE --------->8-------- begin 600 asciitools.tar.gz M'XL(",3Z.BX``V%S8VEI=&]O;',N=&%R`.U:>U?;N!+OW_X40[JW22!/".3R M:,ZRW+*%`[2GE.ZYD)1U'#DQ.'8JV]"4QV>_,Y+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