-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.js
33 lines (27 loc) · 1.3 KB
/
app.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
let CWRCWriterStorageDialogs = require('cwrc-charon-dialogs');
let viaf = require('viaf-entity-lookup')
let dbpedia = require('dbpedia-entity-lookup');
let wikidata = require('wikidata-entity-lookup');
let getty = require('getty-entity-lookup');
let geonames = require('geonames-entity-lookup');
let CWRCWriterDialogs = require('cwrc-public-entity-dialogs');
CWRCWriterDialogs.registerEntitySources({
people: (new Map()).set('viaf', viaf).set('wikidata', wikidata).set('getty', getty).set('dbpedia', dbpedia),
places: (new Map()).set('geonames', geonames).set('viaf', viaf).set('dbpedia', dbpedia).set('wikidata', wikidata),
organizations: (new Map()).set('viaf', viaf).set('wikidata', wikidata).set('dbpedia', dbpedia),
titles: (new Map()).set('viaf', viaf).set('wikidata', wikidata).set('dbpedia', dbpedia)
})
let config = require('./config.js');
config.container = 'cwrcWriterContainer';
config.modules = {
west: [ 'structure', 'entities', 'relations' ],
south: [ 'selection', 'validation' ],
east: [ 'imageViewer' ]
};
config.entityLookupDialogs = CWRCWriterDialogs;
config.storageDialogs = CWRCWriterStorageDialogs;
let CWRCWriter = require('cwrc-writer-base');
var writer = new CWRCWriter(config);
writer.event('writerInitialized').subscribe(function() {
writer.showLoadDialog();
});