Update phing build script to use composer installation only
[bdrem.git] / README.rst
index a451e3948fe39a1743b0200ec2b584297866ec9f..1257d369118fb05555950c64cdad20d369cf34a6 100644 (file)
@@ -17,8 +17,11 @@ Data sources
 - Any SQL database.
 
   - Multiple date fields per record supported.
-- An LDAP server
+- An LDAP server with ``evolutionPerson`` records
 - `Birthday reminder <http://cweiske.de/birthday3.htm>`_ files (``.bdf``)
+- CSV files
+- A directory of .vcf vCard files
+
 
 Output formats
 ==============
@@ -40,9 +43,9 @@ After configuration_, you can test and use *bdrem* via command line::
     -----------------------------------------------------------
     Days  Age  Name                  Event      Date        Day
     -----------------------------------------------------------
-       0   32  Foo Bar               Birthday   20.03.1982  Do 
-       1   33  Andrea Milestone      Birthday   21.03.1981  Fr 
-       7   32  Hugh Success          Birthday   27.03.1982  Do 
+       0   32  Foo Bar               Birthday   20.03.1982  Do
+       1   33  Andrea Milestone      Birthday   21.03.1981  Fr
+       7   32  Hugh Success          Birthday   27.03.1982  Do
       12       Welt                  Scherztag  01.04.????  Di
 
 Help
@@ -52,7 +55,7 @@ To find out about all supported command line options, use ``--help``::
     Usage:
       ./bin/bdrem.php [options]
       ./bin/bdrem.php [options] <command> [options]
-    
+
     Options:
       -n NUM, --next=NUM                Show NUM days after date
       -p NUM, --prev=NUM                Show NUM days before date
@@ -61,9 +64,11 @@ To find out about all supported command line options, use ``--help``::
       -e, --stoponempty                 Output nothing when list is empty
       -d date, --date=date              Date to show events for
       -c FILE, --config=FILE            Path to configuration file
+      --debug                           Development helper (mail)
+      --no-color                        Do not output ANSI color codes
       -h, --help                        show this help message and exit
       -v, --version                     show the program version and exit
-    
+
     Commands:
       readme  Show README.rst file
       config  Extract configuration file
@@ -129,8 +134,65 @@ Configure your source as follows::
 
     $source = array('Bdf', '/path/to/birthday.bdf');
 
-__ http://cweiske.de/birthday.htm 
-__ http://cweiske.de/birthday3.htm 
+__ http://cweiske.de/birthday.htm
+__ http://cweiske.de/birthday3.htm
+
+
+CSV file
+========
+Comma separated value files can be used with bdrem.
+They should at least contain a column with the name, and one with the date.
+
+Simple configuration if you use the default settings::
+
+    $source = array(
+        'Csv',
+        '/path/to/file.csv'
+    );
+
+Complex configuration::
+
+    $source = array(
+        'Csv',
+        array(
+            'filename' => '/path/to/file.csv',
+            'columns' => array(
+                'name'  => 0,
+                'event' => 1,
+                'date'  => 2
+            ),
+            'firstLineIsHeader' => true,
+            'defaultEvent' => 'Birthday',
+            'separator' => ',',
+        )
+    );
+
+Configuration options
+---------------------
+``columns``
+  Determines the position of the name, event and date columns.
+  ``0`` is the first column.
+  You can use ``false`` to disable a column; helpful if there is no
+  ``event`` column.
+
+  Default:
+
+  ``array('name' => 0, 'event' => 1, 'date' => 2)``
+
+``defaultEvent``
+  Text to use as event if there is no event column.
+
+  Defaults to ``Birthday``
+
+``firstLineIsHeader``
+  If the first line in the CSV is column header data
+
+  Defaults to ``true``
+
+``separator``
+  How columns are separated.
+
+  Defaults to ``,``
 
 
 LDAP server
@@ -218,6 +280,10 @@ Dependencies
 Note that the ``.phar`` file already includes all dependencies;
 you do not need to install anything.
 
+When running from a git checkout, install the dependencies with composer::
+
+  $ composer install
+
 
 =======
 License