:-) : -) :-) [all smiles, here!]
What I've outlined below is a non-trivial amount of work, so you can put this email away
for a while, and think about it at leisure, without impeding the development. It won't be
ready for Impress. Maybe for the next one. Maybe.
Jean Hollis Weber wrote:
T. J. Frazier wrote:
* The code to clean up Tips, Notes, and Cautions in the
export-to-Wiki file is working.
Worked perfectly! :-)
* 3) (key part) in the File type (bottom) box, select "Text Encoded
(*.txt)". It's down a ways in the list, just below RTF and Text. Click
Open.
I save and open these files as ordinary text, not encoded, and
everything seems to work fine (so far!). I don't understand why Text
Encoded is needed, or what advantage it gives.
This may be platform-related. Under WV, I have problems opening some of the files: OO.o
wants to give them to Calc! As long as the editor on the Wiki likes what you feed it, the
encoding details are unimportant; if it works for you, go with it.
There is a mention in the OLH (about filters) that the clipboard uses RTF,
anyway.
But the vistas this opens are huge!
For non-WYSIWYG editing of wiki text, I envision a new Wiki toolbar, with buttons for
italics, bold, tt, source, &c. These will be similar to the OOForum buttons, with the
added feature that if you select some text before clicking the button, the brackets will
neatly surround the selection. (I know how to do this already.) I intend to build this for
my own use, but you're welcome to it, if you like. Tips-processing button included.
Suggestions very welcome.
The more interesting buttons will involve the TOC processing. Here I refer to the "TOC" as
the nascent template itself, and the "Nav" component as the calls to it (starting each
page document).
The design task is to accommodate your work flow. I suspect that you don't always do
exactly the same sequence of operations for every page, and I am absolutely sure you get
interrupted in the process, and have to put it aside for a while, now and again! :-) The
one thing I am assuming is that all the about-to-be-pages files are in one directory,
though other stuff can be there, too, particularly if I can distinguish pages somehow.
The first work item is gathering the page names, for the TOC. I can do that:
* a page at a time, with an "Add to TOC" button. My preliminary thought is to generate a
perfectly ordinary text doc, "TOC", looking as much like a template as possible, which
will open with the button. Then you click where you want the new entry (default at the
end? I can pre-position the cursor), click "Below", and the new page name appears as a new
line below the line where the cursor was, properly bracketed and prefixed
[[Doc/JungleGuide/New Page Name]], <div></div> brackets provided as needed. There are
several ways to handle the "level" problem: multiple buttons, "Below as sub-page of
preceding", "Below as peer", "Below as chapter [highest level]", is one way. "Promote" and
"Demote" buttons (for whatever line the cursor is on) are another way. Or both. Or
anything you'd like to suggest. Think "easy". Think, "Gosh, I'd like to just..." You will
also be able to edit the page, just like a real template, observing the wiki syntax.
* or, as a batch process, /a la mode/ Andre's work with the TC. The batch process could
feed you the file names, one at a time, or dump them all in. The level work has to be done
somehow.
* or both. The batch facility will surely have to allow for a TOC partially created, for
some but not all pages.
Two special cases occur at the same time: a new TOC, for a new Guide. The landing page has
to be specially linked, and the template name (as called by) has to be stored, for the Nav
process. I tentatively intend to reserve a file name, "TOC", for the TOC, and embed the
call-name as an &ra;!-- HTML comment --> in the first line. (You can delete the comment
when you upload, if you like.) I will try to assume that the TOC is being created (or the
batch process is being invoked) from the landing page, which you probably do first, anyway.
The whole Nav process almost /has/ to be done as a batch operation. I intend to read the
TOC file, find each doc page, and add the template call per the levels in the TOC.
Alternatively, once the TOC is built, or built far enough, the Nav process could add the
template call to a particular page, if there is any need for that. (If, say, you want to
upload a chapter or two before building the rest, you could create and save an empty file
with the next chapter's name, add it to (or batch-build) the TOC, and the Nav process
should run OK.)
All this should keep me harmlessly occupied and out of trouble for a while. :-)
Cheers, Jean
TTFN, /tj/
--
T. J. Frazier
Melbourne, FL
(TJFrazier on OO.o)