I remember seeing a discussion some time ago where people wondered how
they maintain their text and html pages. I was unable to post at that
time, so here comes my version.
Basics:
o I maintain all pages in pure text
o They are specially indented according to TF (which later)
o The text pages are run through simple perl script that converts
all urls to clickable links and does all additional formatting,
like generatic TOC and so on.
That's basicly it. Managing 400K text page is not very difficult if
you do it in Emacs and use a special minor mode that can reformat
the text (plain, quote, code, emphatise) , update Header numbers,
generate TOCs etc.
So the tools needed are:
o Emacs
o Emacs minor mode package for TF: tinytf.el
o Perl htmlizer: t2html.pls
And what's that TF? I call it Techical format, which means that the
text is placed to certain columns to get the characteristic layout.
You're currently currently looking TF formatted text, where the basic
tab advance count is 4.
The tools are available from ftp://cs.uta.fi/pub/ssjaaa/
and if you want to peek a) original text b) generated html, see these
pages:
ftp://cs.uta.fi/pub/ssjaaa/nymserv.txt
ftp://cs.uta.fi/pub/ssjaaa/nymserv.html
For curious reader, I have attached the TF specification. This is
excerpted from the t2html.pls's usage(). Don't let the amount
of text confuse you, TF format is really simple as you can see if
you compared the .txt and .html pages above.
I realize, that some may not know emacs, but even with simple text
editor you could write TF text and then convert it to html with
the perl script.
Cheers!
jari
DESCRIPTION
Version: 1.47 t2html.pls
Contact: <jari.aalto@poboxes.com>
This is simple text to html converter. Unlike other tools, this
tries to minimize the use of text tags to format the document,
The basic idea is to rely on indentation level, and I call
this layout 'Technical format' (TF)
--//-- decription start
0123456789 123456789 123456789 123456789 123456789 column numbers
Heading 1 starts from left
emphatised text at column 1,2,3
If you want to include large code examples, large PGP base64 signed
blocks, Include them here so that they start at column 2.
This is heading 2 at column 4, started with big letter
Standard text starts at column 8, you can
*emphatize* text or make it _strong_ and show
variable name like =ThisVariableSample=. notice that
`ThisIsAlsoVariable' and you can even _*nest*_ the markup.
more txt in this paragraph txt txt txt txt txt txt txt txt
txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt
txt txt txt txt txt txt txt txt txt txt txt txt txt txt txt
strong text is between columns 5, 6, 7
"Special EMP text in column 7 starts with double quote"
txt txt txt txt txt txt txt txt txt txt txt txt
txt txt txt txt txt txt txt txt txt txt txt txt
txt txt txt txt txt txt txt txt txt txt txt txt
strong text at columns 9 and 11
Column 10 has quotation text
Column 10 has quotation text
Column 10 has quotation text
Column 12 is reserved for code examples
Column 12 is reserved for code examples
All text here are surrounded by SAMP codes
Heading 2, at column 4 again
txt txt txt txt txt txt txt txt txt txt txt txt
txt txt txt txt txt txt txt txt txt txt txt txt
txt txt txt txt txt txt txt txt txt txt txt txt
o Bullet 1 txt txt txt txt txt txt txt txt
,txt txt txt txt txt txt txt txt
Notice that previous paragraph ends to P-comma code,
it tells this paragraph to continue in bullet
mode, otherwise this column at 12 would be
intepreted as SAMPLE code.
o Bullet 2, text starts at column 12
o Bullet 3. Bullets are adviced to keep together
o Bullet 4. Bullets are adviced to keep together
. This is ordered list nbr 1, text starts at column 12
. This is ordered list nbr 2
. This is ordered list nbr 3
.This line uses BR code, notice the DOT-code at beginning
It is efective only at columns 1..11, because column 12
is reserved for code examples.
.This line uses BR code
.This line uses BR code
!! This marks a HR code, any text after `!!' is marked STRONG EM
"This is emphatized text starting at column 7"
.And this text is put after the previous line with BR code
"This starts as separate line just below previous one, EM"
.And continues again as usual with BR code
See the document #URL-BASE/document.txt, where #URL-BASE
tag is substituted with -base switch contents.
Make this email address clickable <foo@site.com>
Do not make this email address clickable -<bar@site.com>,
because it is only an example and not a real address. Noticed the
minus(-) prefix at the beginning of url. Common login names
like foo, bar, quux are also ignored automatically.
Also do not make < this@site.com> because there is extra white
spaces. This may be more convenient way to disable email for
mouse click. Also plain foo@site.com which has no surrounding
<> characters is ignored. Take your pick.
Heading level 1 again at colum 0
Subheading, colum 4
And regular text, column 8
txt txt txt txt txt txt txt txt txt txt txt txt
txt txt txt txt txt txt txt txt txt txt txt txt
txt txt txt txt txt txt txt txt txt txt txt txt
--//-- decription end
That's it, there is the whole layout described above.
More formally the the rules of text formatting are secribed below-
About headings
o There are only _two_ heading levels in this style.
Heading columns are 0 and 4 and the heading must start with
big letter or number
o In column 4, if the text starts with small letter, that line
is interpreted as <STRONG>
o The heading level 1 uses <HR> code to mark big sections.
o The headings are gathered and the index jump block is built. The
NAME reference consists of first 4 sequential words from the
heading name. Make sure your heading are uniquely named,
otherwise there will be same NAME references in the generated
html. Spaces are converted into underscore when joining the
words.
[...more deatails would follow]