DESCRIPTION:
============

Consociata is a web interface (HTML for humans + REST for computers)
for both Elefas and Exilis translation memories.

Using it you can submit a TMX file to be uploaded to the database or source file for a search
from any computer, even if you don't have access to the computer hosting the database itself.
Result of a search can be put in a directory or sent to the requester by e-mail.

INSTALLATION:
=============

This is written using Ruby framework named 'Sinatra'. Look at http://sinatrarb.com/

Before to start, configuration is needed. You can take as a basis one of the two samples.
But in any case the file which will be loaded must be called config.rb

You must have Elefas or Exilis scripts installed somewhere, indicate the location in configuration file.
Exilis works only with JRuby, but since Consociata calls it as independent script, the web interface can run on CRuby.

AUTHENTICATION:
===============

By default the application does not manage authentication, but you can activate it via :auth parameter
In this case you must almost define an administrator using set-user.rb, role = "admin"
You will be able to define other users later with the interface itself, but set-users.rb remains usable unless you delete it.
Other roles = search,upload. If role = admin you have all rights.

API:
====

If you want to use this interface as a developer, rather than with a browser, you can call the following functions:

- GET /api/upload?file=/some/file => will upload a TMX file. Warning: the file path is in the server, not in the client!
- POST /api/upload => will upload a TMX file. The file must be directly in post contents. 
- GET /api/batch-search?file=/some/file => will search for sentences and produce a TMX file in a directory. 
      File must be in any format supported by Spongiae
- POST /api/batch-search?file=filename => Same, except that file contents is in POST body
      For the moment we don't use MIME type, for that reason file name is mandatory

LICENSE:
========

Please read the file LICENSE for the very last version of conditions applied to this code.

