From: Roetman, Paul (PRoetman@CSXWT.com)
Date: Mon Mar 10 2003 - 22:48:05 EST
Thanks to
Rich Kulawiec
Brian Sherwood
Marcos Martinez
Dave Mitchell
Bevan Broun
Almost everyone suggested perl, even that it would only be few lines of
code!
I will have to look into that, and move this discussion to the Perl user
groups (as required).
Thanks again
Cheers
Paul
-----Original Message-----
From: Roetman, Paul
To: ''sunmanagers@sunmanagers.org' '
Sent: 3/5/03 12:11 AM
Subject: [More Info] Text formatting - off topic
It may be a little off topic, but there seems to be some interest...
Thanks so far to:
Tim: ttg@....
Rich Kulawiec
Andrew Caines
Kevin Stussman
What I am really, really after, is some software that can look at a page
of
text and grab fields from one location and place them in another
(conditionally!).
e.g.
all references are relative to the last page break:
take lines 10,11,12 characters 20 thru 27 and place them on lines 4,5,6
characters 60 thru 67
if line 3, char 7 is a 'P' then
take line 7 char's 20 to the end of the line and place it on line 1
end if.
read lines from line 13 onwards
while there is nothing in the first position
put them on the output from line 25 onwards
take the value from line 20, chars 44 thru 60, and pass it to a sql
statement as a parameter. Print the result at line 40 char's 1 to 20.
and so on.
An example of this type of job, would be to take a standard report
output,
and make it fit pre-printed stationary.
All I want to program, is the old locations and new locations!
Suggestions so far have been
Perl: although it would be very capable of doing the job, it would be
a
case of having to write a new complex program for every job.
sed: I think would have trouble going up and down the page, also the
commands would be too complex on a large amount of changes.
pr: not sure, but don't think so
awk: similar to perl, it would be very capable, but for a complex job
it
would be too hard to maintain / debug
nroff: text formatter, I would still need a program to relocate
everything.
latex: same as nroff
Gurgle: It seems to do the job, but is very arcane in it's language.
Seems
to be based on the same language interpreter as sendmail config files!
Once the fields of text are in the correct location, there are a myriad
of
tools to convert to pdf or ps etc..... This part is not an issue!
If GURGLE does not do the job, or the language is just too complex, I
may
have to (shock, horror) write a program to do this! Or maybe gurgle
needs a
new C / shell / ada like look and feel!
Thanks again in advance!
Cheers
paul
-----Original Message-----
From: Roetman, Paul
To: 'sunmanagers@sunmanagers.org'
Sent: 3/4/03 6:35 PM
Subject: Text formatting - off topic
Hello
Does anyone know of software/freeware that can translate text from one
position in a text file (relative to page breaks) to another. I need to
get a standard report output (in text) and change the location of all
the fields to fit a different output ... typically to print on
pre-printed stationary.
Having a database interface would also be a benefit!
About the only one I can find that fits all the requirements is GURGLE
(GNU report generator language), but after a quick review that language
seems to be fairly arcane/complex
Thanks
Paul
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:25:58 EDT