A web interface to Unidatab
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
cgi-bin
html
BUGS
INSTALL
LICENSE
MANIFEST
NEWS
README

README

# https://github.com/emilbarton/Unidatab-CGI:
# README
# Unidatab-CGI version 1.0.x
# https://unidatab.wordpress.com/

Unidatab-CGI is a nice way to consult a database using an underlying TCP client.
It requires to have a running http server and a version of Unidatab >= 1.2
(see. https://github.com/emilbarton/Unidatab/).

However several important features aren't available on this interface. For
instance, a unid-base can only be created by the command line tool unid-adm.

Unidatab.cgi as it was in older versions of Unidatab has been re-written and
dispatched across several files to become more readable and conform to the
better authentication mechanism provided in Unidatab version >= 1. Nevertheless,
this tool is less secure than the client and server used alone, precisely
because it makes use of both of them on the server side: Unidatab.cgi calls the
oneliner function of unid-clic to get an answer from unid-serv before sending it
back thru the network. Thus I didn't find a way to play the two-steps
in authentication applied in unid-clic when it is used as a mere client remotely.
The hash sent to the Unidatab.cgi is then always the same (user+password) and
this is not recommended by security specialists. But as anyone knows now, this
has never been my priority, and if someone could find a workaround, I'd be
delighted to include it in the main stream.


*** Description of available menu items and functions: ***

alias:get
Set field alias (f1) to an alias string or an id integer.

alias:remove
idem.

alias:set
Set field type (f3) to an alias string =~ /\-[0-9a-zA-Z_-]+/, and field alias
(f1) = to a record or a symbol id (objid).
A symbol can have an alias that will be stored as the absolute value of its id.

record:find
3 cases:
A. When field alias (f1) is a format id, this item's selection retrieves the
records sharing at the same time this format symbol and a title with the content
of field prop (f2). This command is equivalent to clicking on one of the items
of a subdb list when field prop is empty, except that it handles all formats,
not only subdbs.
B. When field prop (f2) is filled, the command retrieves the records sharing the
(possibly partial) content of field prop.
C. When fields prop (f2) has a content, if type (f3) is fed with a (complete)
format string, the case B shall be restricted to the records sharing the
mentionned format string.

record:new
Field prop = title, field type = format, field alias = alias or nothing,
field params (f5) = other symbols or nothing.
These other symbols are pairs of property and type separated by unid-protyp
separator (button p-t_sep), which pairs are then separated again by unid-params
separator (button par-sep).
Valid example of params:
blue:unid-protyp-sep:color:unid-params-sep:square:unid-protyp-sep:shape

record:reformat
Field alias = record id, field type = format string. The reformatting of a subdb
is refused.

record:remove
This function removes a record.
Field alias = record id.

record:retitle
This function retitles some record.
Field alias = record id, field type = title string. The retitling of a subdb is
refused.

record:subsume
This function subsumes a record under an existing subdb.
Field type = recid, field alias = subdbid.

record:templatize
This function will make a subdb according to some record.
Field alias (f1) = record id, field type (f3) = format string. The function will
create a subdb from the record content and the format string, provided that no
previous subdb with this title exists already.
Note that the original record isn't modified.

subdb:examplify
This function will create a record under the chosen subdb.
Field type = subdb id (not a subdb format), the rest (title, alias and params)
is similar to record:new.

subdb:list
The quickest way to access subdb contents.
Clicking on a subdb id will display the subdb record and clicking on a symid
will extract the list of records under that subdb.

symbol:find
The result is a list of symbols matching the following contents:
Fields type (f3) and prop (f2) contain excerpts of the wanted symbols.

symbol:get
Extracts a line from view_symbols (doesn't create the symbol).
Field alias can be one of negative id, abs(id), or alias string.

symbol:insert
This function inserts a possibly new symbol at a specified position in a
displayed record.
Type the symbol in prop/type fields and select the preceding nodeid
(leftmost radio button).

symbol:modify
This function modifies a symbol as member of a record, actually no previous data
is modified but the old symbol replaced by a new one.
Type the new symbol in prop/type fields and select the nodeid to be modified
accordingly.

symbol:remove
This function removes a symbol from a record (not from the database).
Select the nodeid to be removed (leftmost radio button). Doesn't work on formats
nor titles. Even when the node was the only occurence of this symbol, the latter
will not be permanently deleted until flyers are recycled.

symbol:swap
This function swaps 2 symbols within a record.
Check one symorder button on each of both record rows to swap (should not be
identical nor include format nor title).

test SQL
This experimental function is combined with fields 'test' (f5) and 'uparams'
(f4). It allows to send an (unid)SQL request (which can damage your database
unless YKWYD).
On another hand, button 'test' combined with fields 'test' (f5) on the right,
allows testing the Javascript code included in this page (try it with the
keywords 'cooked', 'eat', sha', 'sql', 'subdb', '1','2','3','4'.


(Unidatab-CGI version 1.0.x)

EOF