Ucome - a Content Manager System
Author :
Arnaud LAPREVOTE
Free&ALter Soft
152, rue de Grigy
57070 METZ
tel: 03 87 63 76 35 - 06 11 36 15 30
fax : 03 87 56 19 93
Email : arnaud.laprevote@freealter.com
1. Introduction
Today intranets are the natural way to share informations. Mana will allow to integrate, present, sort, search, manage informations on an intranet. A key property is that input informations will be highly inhomogeneous. I like text files, you prefer soffice word ones, and somebody else msword one, and another latex, or xml, or html, or I do not know what. Mana will try to help to organise these inhomogeneous informations in a coherent set.The goal is to create a generic "transform engine" with a web interface. The idea is the following. Every day, you manage files with different formats (graphic, html, text, word, xml, latex, pdf, ps, ...). From my point of view, a key of today organisation is the sharing of information. In fact, in an enterprise (or a group), you can say that an information does not exist if it is not shared. From another point of view, it is very easy to be buried by informations today. So you must find a way to share and organise informations.
2. What are the file types that are currently supported ?
Right now :- text,
- txt2ml,
- tmpl (html without a menu bar),
- html,
- pdf,
- gif,
- png,
- jpeg,
- directories,
- order_dir : when asking for the display of this directory, a file of the directory is displayed, at the next display, it will be the next file, and so forth. So files will be diplayed as a "rolling newspaper".
- order : a file giving a file to display in another directory. It may contain a file, an url, and also the display speeds for theese files.
We are working on :
- doc,
- excel,
- star office 6 file formats.
So files with these filetypes may be integrated seemlessly in an intranet.
3. How does it work ?
The base of mana is the display of a file. When asking for a file, mana will do the following thing :- look if the file may be directly displayed, then, the file will be directly sent,
- if the file requires to be transformed before being displayed, mana will search for the next file type for this file, try to do the transformation, cache the result of the transformation,
- the 2 last points will be repeated till reaching a file directly displayable.
All operations are cached in mana. Before doing any transformation, mana looks if the result exists or not. If it does, and if all dependency conditions are fullfilled, then the transformation is not done, and the next step is done.
So you now understand, why I speak of a Transform Engine. Mana is a tool for transforming files.
Mana is as strongly object oriented as possible without any tcl extension. It means that for each file type, the possible next types are defined, the possible actions, and the transformations for this file type, as well as a final display procedure.
It occured that this way to see a cgi programm (a transformation of a document into another, "ad noseam") seems to be a VERY powerful and generic concept. Strangely enough it also works for actions on file.
Just consider the copy of a file. Well, we are going to say that in fact, it is a filetype. So for each file type, we must define a transformation procedure for going to this copy type. It will be 2copy. Then when arriving in copy, we use a standard html window. And we ask for the display in html of this content. So we define a 2html transformation in copy. And we jump at the standard html procedure.
When writing a programm for a new file type, one of the biggest work is to really track the dependencies when writing a transformation for this file type. Obviously, there are functions for that.
4. Set up
The following software and libraries are required :- tcl8.3,
- tcLex,
- txt2ml,
- a web server supporting cgi (developped with apache).
You will find tar sources in the source directory of Tengine. cgi.tcl is included by default in Tengine.
Then just untar Tengine anywhere. It must readable and reachable by a cgi program. We are going to suppose that you untared Tengine in /usr/local
5. File organisation
You may put any portion (directory and subdirectory) of your harddisk in use from TEngine. Before doing complex things, we are going to do simple one, and create a test example in /tmp.Just copy in /tmp/te_ex1 the content of the skel directory of TEngine. You get :
/tmp --- /te_ex1 --- /any : directory where we are going to put all data
|
|------ /cache : when a file will be transformed, it will be
| cached there
|------ /icons : the basic icons of the system
|
|------ /session : session files will be stored there
|
|------ /style : style files for txt2ml
|
|------ /template : template for the management web interface
Now copy fas_view.cgi in a cgi-bin/mana directory, make the cgi executable :
cp fas_view.cgi /home/httpd/cgi-bin/mana/fas_view.cgi chmod ugo+rx /home/httpd/cgi-bin/mana/fas_view.cgi
Edit /home/httpd/cgi-bin/mana/fas_view.cgi and change the ROOT, FAS_VIEW_CGI, FAS_VIEW_URL and FAS_PROG_ROOT as necessary. Here we should have :
set ROOT /tmp/te_ex1
# When doing an test from the command line,
# uncomment the 2 following lines to force debug
#set DEBUG 1; set DEBUG_ALL 1
#cgi_debug -on
set FAS_VIEW_CGI fas_view.cgi
set FAS_VIEW_URL /cgi-bin/mana/${FAS_VIEW_CGI}
############### SOURCING OF ALL PROCEDURES
############### NORMALLY NOTHING TO CHANGE FROM HERE
set FAS_PROG_ROOT /usr/local/mana/tcl
You can now start Tengine. Just go in a web browser and enter the url :
http://localhost/cgi-bin/mana/fas_view.cgi?file=/any
Or
http://localhost/cgi-bin/mana/fas_view.cgi?file=/any&action=edit_form
6. A detailed example
Let us consider a text file :
Test of TEngine 1. Does it work ? * for you, * for me, yes. 2. May I get tables ? It is trivial for simple tables : || First column | Second column | Arnaud | ''LAPREVOTE''
First, this



