LODEX is an experimentation aiming to link ISTEX data to the web of data.
See the Installation instructions page.
To run lodex
with some examples, use:
$ ./bin/lodex ./example/films/
You can put your settings in any of these paths:
./.lodexrc
(or any upper level repository:../
,../../
, etc.)$HOME/.lodexrc
$HOME/.lodex/config
$HOME/.config/lodex
$HOME/.config/lodex/config
/etc/lodexrc
/etc/lodex/config
Or you can pass it:
- in command line arguments,
- in variables prefixed with
lodex
, - via an option
--config file
, then from that file.
Or you can put your settings in a JSON file besides your data repository (recommended).
For example, if you run lodex /path/to/repository
, the file will be
/path/to/repository.json
.
Wherever the settings file is, it is a JSON file.
connectionURI
: URI to connect to mongoDB (by default:mongodb://localhost:27017/lodex
)port
: the port the web application will listen (default:3000
)baseURL
: base URL for the URIs (by default:http://127.0.0.1:3000
)access
: array of objects containing:login
plain
: password in plain textdisplay
: real name, as displayed in the application
- ...
datasetFields
describe the fields applying to all collections of the datasetcollectionFields
describe the fields applying only to the collection (formerly called table)
Each field should contain:
title
: a free title for the fieldscheme
: the URI of a property (maybe found on the LoV)type
: the URI of an XML Schema type (string, boolean, decimal, float, double, duration, dateTime, time, date, ...)content<
: the JBJ stylesheet allowing to set the content of the field (from the raw document)
To generate non-local URI, you need to set the baseURL
field in the config.local.js
(or in the settings file), which will replace the http://127.0.0.1:3000
part of the URIs.
This is useful when lodex can't guess what URL is accessible from your users. For example, when using the lodex docker image and mapping the port to another one. This happens when using ezmaster to instanciate lodex several times.
Example of minimal config.local.js
(lacking datasetFields
and
collectionFields
configuration):
'use strict';
module.exports =
{
baseURL: 'http://example.lod.istex.fr',
access: [
{
login: 'francois',
plain: 'c0mpL3XPassW0rD',
display: 'François Parmentier'
}
]
};
Other examples of settings (along with associated data) are available in the example directory.
Here are few indicators of the quality of the code, they can be used as indications on what can be improved:
- To try to understand, see General specifications
- To try to follow, see French Trello