allow dash in filename.encoding.csv
[MojoFacets.git] / README
diff --git a/README b/README
index 80f414b..55a3abb 100644 (file)
--- a/README
+++ b/README
@@ -12,56 +12,84 @@ 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.
 
 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.
 
+CSV files with .csv extension are parsed using , as delimiter. Encoding is utf8
+and can be specified in filename, before extension like this: data.encoding.csv
 
 
-Start with:
+CouchDB data can be imported using files which contain full url to CouchDB database
+or url to CouchDB view to import. URL's filename should end in *.couchdb
 
 
-  LANG=hr_HR.utf8 ./script/mojo_facets daemon --reload
 
 
+Start with:
 
 
-Data replication:
+    LANG=hr_HR.utf8 ./script/mojo_facets daemon --reload
 
 
-  # master
-  ./script/mojo_facets daemon --listen 'http://*:4444' --reload
 
 
-  # slave
-  MASTER=http://localhost:4444 ./script/mojo_facets daemon --reload
+Changing tabular data:
 
 
+Just double click on any table cell and click outside or focus out to save change.
 
 
-Turning actions into changes:
+
+Data action and changes:
 
 There are two kinds of audit log in MojoFacets:
 
 
 There are two kinds of audit log in MojoFacets:
 
-1. actions stored in /tmp/actions are clicks on user interface with parameters
+1. actions stored in /tmp/actions are clicks on user interface with parameters,
+   they will probably be erased on next reboot since they are in /tmp
+
+2. changes in data/database.changes are more structured, including old value
+   and unique identifiers for that row
 
 
-2. changes are more structured, including old value and unique values from
-   edit of one value in dataset
+Changes can be applied on any dataset currently in memory.
+
+Whole idea of changes is to create audit log which is detailed enough to recostruct
+current state of dataset from source file and list of changes. However, to speed
+up operations, you can periodically save your in-memory data to /tmp/ in perl
+storeable format using save link in interface.
+
+
+Data replication:
 
 
-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:
+Actions can be replicated to other hosts using MASTER enviroment variable
+or config menu
 
 
-  $ ./script/actions-to-changes /data/mojo_facets/*
+    # slave
+    MASTER=http://localhost:4444 ./script/mojo_facets daemon --reload
 
 
 
 
-Modify your data using perl snippets
+Code console to modify data using perl snippets:
 
 Experimental REPL console supports perl snippets which get $row hash which is one
 
 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.
+element from your dataset.
+
+If you want to create or update values, you will have to use $update hash to set
+new values.
+
+If you want to report something from your dataset (also called reduce in map/reduce
+terminology) you can use $out hash to store values which will be used to generate
+new dataset using $key and $value for column names.
+
+All values are repetable, but if you create just a scalar, magic(tm) inside MojoFacets
+will try to upgrade it to [ $scalar ] so you don't have to do it explicitly.
+
+Code examples are stored in public/code
+
+They use column1,column2.description.pl notatition so only snippets which have applicable
+column will be shown.
+
+
+Facet code eval:
+
+Code snippet will be executed for each facet $value and will report $count and $checked state.
+You can also update $checked to programatically select part of facet values.
 
 
-* generate new columns with number of elements in some other column
 
 
-  $row->{author_count} = [ $#{ $row->{autor} } + 1 ];
+Export data:
 
 
-* generate century column from year
+All exported data is stored in public/export/database/
 
 
-  foreach my $year ( @{ $row->{Year} } ) {
-    push @{ $row->{century} }, int($year/100)+1;
-  }
+There you can find saved filters and items generated with export checkbox
 
 
-* modify existing column
+    filter.column_name.optional_description
+       items.column1.column2.column3
 
 
-  foreach ( @{ $rec->{'Cited Author'} } ) {
-    s/^\.+//;
-    $_ = uc $_; # assigment is needed to modify value!
-  }