turning [x]html files into .odt files.
Gary Kline
kline at thought.org
Tue May 26 18:04:43 UTC 2009
This may or may not be of interest to anybody who creates professional
typeset-looking manuscripts. I use vi as I have for 30 years simply
because my fingers know it. I can keep fingers on keyboard rather than
switch back and forth to mouse. Last night I used a very short php/html
file that used HTML and converted it [[[EVENTUALLY]]] to the open desktop
format. Just now I wrote a one sentence file, a2oofile, using vi/nvi:
"Good morning, people. It is so *great* to be back home."
Then using File -> Export, saved it as a2oofile.odt.
*) atom a2oofile [ creates a2oofile.html ]
The a2oofile.html file is:
<!doctype html public '-//IETF//DTD HTML//EN'>
<!-autotranslation from ASCII or ISO-8859.1 by Gary Kline, kline at thought.org--->
<! @(#) a2oofile.html translated from a2oofile !>
<HTML>
<HEAD>
<TITLE> <!your title here --> </TITLE>
<! your header lines here -->
</HEAD>
<META NAME="Keywords" CONTENT="whatever">
<META NAME="revisit-after" CONTENT="7 days">
<META NAME="author" content="Gary Kline">
<META NAME="copyright" content="\xa9 Thought Unlimited">
<BODY BGCOLOR="#FFFFFF" LINK="#00FFFF" VLINK="#006633"><FONT SIZE="4">
<P>
“Good morning, people. It is so <EM>great</EM> to be back home.”
</FONT>
</BODY>
</HTML>
*) Then switer a2oofile.html
*) File -> Export [and select to save as the ODT] and you have a2oofile.odt
I began writing my ascii to markup suite in 1994; it was designed to do
ONE thing: to *word* into <EM>word</EM>. I've added only the left and
right quotes. atom does nothing else. i have tweaked it for 15 years;
never gave to it ports because I hate writing the docs. Anybody
interested in handing the port, please let me know.
gary
--
Gary Kline kline at thought.org http://www.thought.org Public Service Unix
http://jottings.thought.org http://transfinite.thought.org
The 4.91a release of Jottings: http://jottings.thought.org/index.php
More information about the freebsd-questions
mailing list