XMLJourn -- A Journal/Weblog Perl script using XML
by stm (http://chaos.doesntexist.com/~stm/)
Full Description: XMLJourn is a Journal/Weblog CGI script written
in Perl that uses an XML datafile. XMLJourn is
comprised of a viewing script, an update script,
and a DTD/XML datafile. XMLJourn is designed to
be simple, fast, customizable, and entirely
self-contained. The only requirement is Perl;
XMLJourn uses no modules or external programs.
XMLJourn doesn't even require a webserver; it
allows CGI arguments to passed through the
commandline. XMLJourn should work in any environment
that supports Perl. XMLJourn's datafile format is
open and adaptable to different purposes (ie,
Journal, blog, News .. any kind of listing
application). XMLJourn provides a web-based updating
interface for easy updating.
Formatting Notes:
Every Field has a class of [fieldname]-[cssclass] if
[cssclass] is defined (either through CGI or the
datafile) These classes allow you to set the
appearence of these areas through css properties.
For more information on CSS, check out
www.w3schools.com.
Some other classes of note:
entry-[cssclass] (Individual Entries)
viewentry-[cssclass] (The link to view entire entry)
nav-[cssclass] (The Navigation links)
index-[cssclass] (The Index #s)
name-[cssclass] (The names of fields)
[cssclass] is the class of the main table
viewjourn.cgi available CGI parameters:
journal=[index #|journal name] Which journal to use
start=[number] What entry the view should start with
end=[number] What entry the view should end with
showindex=[0|1] Show Indexes or not (O do not show, 1 show)
indexfg=[color of index] Set appearance of indexes
indexbg=[background of index] Set appearance of indexes
shownames=[0|1] Show Name of journal and show name of fields
namefg=[color of index] Set appearance of names
namebg=[background of index] Set appearance of names
shownav=[0|1] Show Navigation Links
navpos=[top|bottom] Where to Show Navigation Links,
at the beginning (top) or at the end (bottom)
cssclass=[*] The journal will be of this class and all
fields will be of [fieldname]-[cssclass] class
topfew=[number] Show [topfew] entries from the largest entry in
the journal
field=[index #|field name] Only show specified fields (multiple fields
should be seperated with commas)
showviewentry=[0|1] Creates a link to view entire entry (Usefull
when viewing only certain fields)
search=[search term] Shows only entries that contain [searchquery],
[searchquery] may use regex expressions
query=[journal property] Returns the requested journal property
This is mainly for getting properties
from the script to use elsewhere,
see sample HTML for examples
ignoreformatting=[0|1] Setting this to 1 will tell the script not to set any
colors or borders
Current queryable properties are:
[totalentries, showindex, shownames, showentrycount, shownav,
navpos, cssclass]
[name,fg,bg,border]
(Note, on these items, what level is returned
(journal/entry/field) depends on what other items are set, ie.
if query is set to fg and a specific entry is asked for, then
that entry's fg will be returned (?query=fg&start=40&end=40)
or if query is set to border and a specific entry and a
specific field are asked for, then the field in that entry's
border will be returned
(?query=border&field=subject&start=40&end=40) .. and so on.
If no specific entry is set, a query will return the default
setting. Only one field at a time will be returned. if no
specific entry is set (ie, start & end are not the same) and
field is not set, then the query will return for the entire
journal.
Todo:
Supplementary Features
Possible Features:
rss 1.0 feed option
[right|left] options to NavPos
revise query syntax? Currently it seems confusing. (Maybe I just need
to rewrite the documentation?)
Some example Javascript to dynamically size an iframe element, as a
SSI replacement.
more meta tags for xmljconfig
Bugs:
Submit bugs or interface quirks to stm555@hotmail.com, put 'XMLJOURN'
in the subject line.