[Date Prev][Date Next][Subject Prev][Subject Next][ Date Index][ Subject Index]

RE: PGM scripts and Xywrite.



Hi Robert,

Sorry I have some more information for you. Basically, how the system works
is this. A Perl Script runs to extract information from the database in to
text file. Then the users run XyWrite scripts over the generated file to
format it with Quark style sheets, fonts, changes to words etc. What I am
aiming to do is to automate this process so the users recieve a full
formatted file without having to run the scripts etc. My solution is as
follows, gain the information from the XYWRITE PGM files so I can write a
Perl function to perform the same tasks as the PGM file. Therefore XyWrite
can be disregarded and we can automate the entire process. Upto know I have
only really seen search and replace commands in the PGM files but I fear the
file attached has some IF or ELSE structure. I have already written a parser
for the PGM files but the files contain other characters when not viewed in
Xywrite, therefore it would be easier if I could export the way the files
look in Xywrite to a text file and then use that file as the base for the
parsing. But the only method i've seen to do this so far is to Cut and Paste
the text.

I would appreciate it is you could explain some of the other structure of
the file i've attached.

Thank you very much for your help, i've sure you could make a good living as
a XyWrite wizard!


Mark.

-----Original Message-----
From: owner-xywrite@xxxxxxxx
[mailto:owner-xywrite@xxxxxxxx]On Behalf Of Robert Holmgren
Sent: 20 January 2006 07:06
To: xywrite@xxxxxxxx
Subject: Re: PGM scripts and Xywrite.


** Reply to message from Mark Butler Attachment: on Thu, 19 Jan 2006 13:21:36 -0000


> Is there any chance a
> program exists to move the Xywrite files to another format. i.e. ASCII
> text??? Then i could write a simple parser to move the commands to another
> language.

You need to give me some info, Mark. Do you have a copy of XyWrite? Do you
know how to use it? XyWrite files *are* ASCII text, as-is. Formatting
(layout) commands (also plain text -- not binary!) are sometimes embedded in
them, but otherwise they are Ascii. What is it that you want to do? Strip
the formatting and leave only text? LOAD STRIP.PRN or MAIL.PRN, and command TYF.
Result: File FO.TMP gives you pure text, no formatting. Somehow I get the
feeling that you aren't really sure what to do, how to proceed, or even how
to frame your question. You need, obviously, to know the **intent** of the
programs!! What they're designed to achieve as a result. If you grasp that,
then all you have to do is port your *files* (your text documents) to a format
you're comfortable with, and design new *programs* in whatever language to
achieve the same result when operating upon the *files*. Right? Programs and
files (documents) are independent of each other. Programs are not embedded in
documents. So really, your problem is -- I'm guessing here -- that you don't
know what the programs set out to achieve. I already gave you an extended
example of what one program tried to achieve. (Fact is, if you understood
Quark, you wouldn't really need to know anything about XyWrite, because it
would be self-evident what Quark needs, and how the source files need to be
transformed in order to *meet* Quark's needs. I get a
stumbling-around-in-the-dark feeling here.) The way your question is framed,
all you're asking is, how to get your files into Ascii. Well, they *are* Ascii
already! So, if that's all you need, you're all set: just write the simple
parser.

But if you don't know how the programs work, then you'll either have to learn
the rudiments of XPL, or hire someone to sit with you (because its unlikely
that this "someone" knows SED or Quark or whatever). Surely somebody in your
shop is proficient at XyWrite.

Or, if you're just asking whether there's a program that converts XyWrite
programs into Perl scripts, the answer is No.

-----------------------------
Robert Holmgren
holmgren@xxxxxxxx
-----------------------------

OLDCIN.zip

Description: Binary data