Previous Up Next

9  Glis: a general purpose LIS

Glis is an example of application that can be built with Camelis. It is a general purpose application handling various types of files I found useful in my own experience. It can be freely modified to fit your needs by changing the file examples/glis.ml and creating new logics, sources or wells. As it is not the purpose of this manual to explain how to define new applications, the following of this section is limited to present logics, sources, and wells available in Glis.

9.1  Logic

The logic of descriptors and features is made of valued attributes of various types. Every atomic formula is made of a non empty sequence of attributes followed by zero, one or several values. An attribute can be either an identifier (beginning with a lowercase letter), or a term (beginning with an uppercase letter, underscore, or a quoted string). The difference is that axioms can only be stated between terms, and between atoms and terms. When a value is given, it has one of the following types:
string
: The value is a double-quoted string prefixed by is, contains, beginswith, endswith, match (each of these keywords can be abbreviated by its first letter). The string after match must be a Unix-like regular expression.

integer
: The value is either an integer prefixed by =, >= or <=, or a possibly open integer interval in the form in [x,y]. Integers can approximated by using dashes, e.g., 2-- for two hundred something; and multiple dashes can summarized by the standard letters (k, M, G, etc.), e.g., 3-M for thirties of millions.

date
: The value is an interval of dates, where a date can be expressed at three levels of resolution: day, month, or year. Relative dates can be expressed by expressions such as today, next day, last year, 2 months ago. The syntax w.r.t. intervals is the same as for integers, except there is the leading keyword date.

time
: The value is an interval of times, where a time can be expressed at three levels of resolution: hour, minute, or second. Relative times can be expressed by expressions such as now, next hour, last minute, 2 hours ago. The syntax w.r.t. intervals is the same as for dates, except for the leading keyword that is time.

file permissions
: The value is an interval of permissions, where a permission expresses a set of Unix file access permissions. For instance, rwx r r represents read/write/execute permissions for the file owner, and read access for group and other users. The syntax w.r.t. intervals is the same as for dates, except for the leading keyword that is perm.

9.2  Sources

Available source types are:
Directories
: Directories allow recursive creation, update, and relocation of sources. However deletion is not recursive so that a directory can be deleted as a source without deleting existing sources under it. A directory produces no object by itself.

Files and URLs
: every file and URL can be imported, and is then represented by an object described by properties derived from its name (directories, extension, host, etc.), as well as size, last modification date, etc. for local files. All the following sources include and extend this behaviour.

BibTeX files
: When the option “extract file parts...” is selected, files with extent .bib produce an object per bibliograpic reference, and for each object a descriptor per field. The preview of these objects contains the reference, the authors, the title, the journal or booktitle, and the publication year.

MP3 files
: Files with extent .mp3 produce an object with ID3 tags as descriptors, and song artist and title as preview.

JPEG files
: Files with extent .jpg or .jpeg produce an object with EXIF descriptors (requires the program jhead), in addition to the file location as for every sources. The preview is a thumbnail of the picture.

Mozilla bookmarks
: When the option “extract file parts...” is selected, files with name bookmarks.html produces an object per URL, and uses folder names and descriptions as descriptors. The preview of URLs is the description associated to it in the bookmarks file.

Mozilla email folders
: When the option “extract file parts...” is selected, files with extent .msf produce an object per email with sender, receivers, subject, date, and time as descriptors. The preview shows the subject, sender, and date.

CSV Files
: Files with extent .csv produce an object for each line, except the first that is used for column names, and each column is made a descriptor. The preview is simply the line.

Java sources
: When the option “extract file parts...” is selected, files with extent .java produce an object per method with name, class, modifiers, and signature as descriptors.

OCaml interface files
: When the option “extract file parts...” is selected, files with extent .mli produce an object per value with name, module, and type as descriptors.

DBLP records
: URLs starting by http://dblp.uni-trier.de/rec/bibtex/ produce a BibTeX entry described as above.

DBLP search results
: URLs starting by http://www.informatik.uni-trier.de/ produce a set of DBLP records, which are handled by the previous source. When importing several overlapping search results, duplicates are avoided.

9.3  Wells

Available well types are:
BibTeX files
: Builds a new BibTeX file with extent .bib from a set of objects produced from BibTeX source files.

Picture slide show
: Builds a slide show from a set of picture objects as a text file containing a list of file pathes. This file is designed to be viewed by GQView on Linux (file extent .gqv), and Irfanview on Windows (file extent .txt).

Music playlist
: Builds a playlist from a set of music objects as a text file containing a list of file pathes. The file must have .m3u as an extent.

9.4  Actions

A .ctx file containing definitions of actions for Linux and Windows/Cygwin is given. It comprises at least a music player for files and playlists, an image viewer, a slide show viewer, a text editor, a web browser, a PDF reader.


Previous Up Next