[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Maybe easy for a elisp guru.

From: B. T. Raven
Subject: Maybe easy for a elisp guru.
Date: Thu, 04 Oct 2012 12:56:08 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1

I had an idea that seemed like it might have a natural Emacs solution:
I want to substitute the characters from a text file for the random
chars (upper and lower case) and punctuation in an ascii art file so
that the graphic is retained but the text composing the graphic comes
from a suitably large plain text file, (large enough so that it can
overwrite the image before it gets to eof).

This seems to need (buffer-string), (looking-at) and some non emacs
functions (is-big-glyph) = caps, numbers, \|!@#$%&(){}[]?/ which would
all be replaced by (upcase) of the characters in the plain text file.
Other punctuation and lower case chars in the ascii art would be
replaced by (downcase) of the plain text chars. Spaces in the ascii art
(and maybe periods) would be retained. Here is sample ascii art (a
detail from Manet's dejeuner):

or for the same woman fully clothed, the top image here:

A lot of the words would be camel-case and/or have holes in them but I
think the text would still be readable at least where the ascii art
wasn't too sparse. The image wouldn't lose too much resolution either at
least on a larger and denser text block.

Any ideas or even just some quick and dirty code I can play around with?
I can't seem to get anywhere with elisp if I have to start from scratch
(no comp. sci. training).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]