bdf66360756c34f563eca2c92dd00bcc3a956256
[MojoFacets.git] / README
1 Mojo Facets - server side facet browsing using Mojolicious and jQuery UI
2
3
4 Data sources:
5
6 Put JSON file from Simile Exhibit project in data/ with extension .js or .json
7
8 Alternative format is pipe (|) separated text files with extension .txt
9 First column is always header with field names
10 Multi-line values should be wrapped in ^multi-line-text^
11
12 If you save bounch of html files with table in directory with .html extension, they will
13 we all read as single data set, allowing easy analysys of search results, for example.
14
15
16 Start with:
17
18     LANG=hr_HR.utf8 ./script/mojo_facets daemon --reload
19
20
21 Data replication:
22
23     # master
24     ./script/mojo_facets daemon --listen 'http://*:4444' --reload
25
26     # slave
27     MASTER=http://localhost:4444 ./script/mojo_facets daemon --reload
28
29
30 Turning actions into changes:
31
32 There are two kinds of audit log in MojoFacets:
33
34 1. actions stored in /tmp/actions are clicks on user interface with parameters
35
36 2. changes are more structured, including old value and unique values from
37    edit of one value in dataset
38
39 If you want to create changes which can be applied again on original dataset or
40 any other dataset which has same unique values you can use helper script:
41
42     $ ./script/actions-to-changes /data/mojo_facets/*
43
44
45 Modify your data using perl snippets:
46
47 Experimental REPL console supports perl snippets which get $row hash which is one
48 element from your dataset.
49
50 If you want to create or update values, you will have to use $update hash to set
51 new values.
52
53 All values are repetable, but if you create just a scalar, magic(tm) inside MojoFacets
54 will try to upgrade it to [ $scalar ] so you don't have to do it explicitly.
55
56 Code examples are stored in public/code
57
58 They use column1,column2.description.pl notatition so only snippets which have applicable
59 column will be shown.
60