don't generate zero for null values
[MojoFacets.git] / README
diff --git a/README b/README
index 3745ca1..60f9b7a 100644 (file)
--- a/README
+++ b/README
@@ -9,8 +9,63 @@ Alternative format is pipe (|) separated text files with extension .txt
 First column is always header with field names
 Multi-line values should be wrapped in ^multi-line-text^
 
+If you save bounch of html files with table in directory with .html extension, they will
+we all read as single data set, allowing easy analysys of search results, for example.
+
 
 Start with:
 
   LANG=hr_HR.utf8 ./script/mojo_facets daemon --reload
 
+
+Data replication:
+
+  # master
+  ./script/mojo_facets daemon --listen 'http://*:4444' --reload
+
+  # slave
+  MASTER=http://localhost:4444 ./script/mojo_facets daemon --reload
+
+
+Turning actions into changes:
+
+There are two kinds of audit log in MojoFacets:
+
+1. actions stored in /tmp/actions are clicks on user interface with parameters
+
+2. changes are more structured, including old value and unique values from
+   edit of one value in dataset
+
+If you want to create changes which can be applied again on original dataset or
+any other dataset which has same unique values you can use helper script:
+
+  $ ./script/actions-to-changes /data/mojo_facets/*
+
+
+Modify your data using perl snippets
+
+Experimental REPL console supports perl snippets which get $row hash which is one
+element from your dataset. All values are repetable, so you always have to create
+array of values if you are creating new columns, even for single value.
+
+* generate new columns with number of elements in some other column
+
+  $row->{author_count} = [ $#{ $row->{autor} } + 1 ];
+
+* generate century column from year
+
+  foreach my $year ( @{ $row->{Year} } ) {
+    push @{ $row->{century} }, int($year/100)+1;
+  }
+
+* modify existing column
+
+  foreach ( @{ $rec->{'Cited Author'} } ) {
+    s/^\.+//;
+    $_ = uc $_; # assigment is needed to modify value!
+  }
+
+Code examples are stored in public/code
+
+They use Column name.description.pl notatition so only snippets which have applicable
+column will be shown.