Skip to content
A web interface to Unidatab
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cgi-bin
html
BUGS
CHANGES
INSTALL
LICENSE
README

README

/*************************************************************
* File:      README
* Project:   Unidatab-CGI
* Author:    emilbarton.com - 2017 -2018
* Download:  github.com/emilbarton/Unidatab-CGI/
* License:   Gnu Public License (GPLv3)
* Version:   1.1.x (Unidatab >= 2.1 required)
* Encoding:  utf8
* Homepage:  unidatab.wordpress.com/
**************************************************************/

Unidatab-CGI is a way to consult a database using an underlying TCP client.
It requires to have a running http server and a version of Unidatab >= 2.1.x
(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 calls the oneliner function of unid-clic to get an answer from
unid-serv before sending it back thru the network.


*** 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.1.x)

EOF
You can’t perform that action at this time.