aboutsummaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorChristian Weiske <cweiske@cweiske.de>2015-03-18 20:42:33 +0100
committerChristian Weiske <cweiske@cweiske.de>2015-03-18 20:42:33 +0100
commit588252917428f22626ed9bb2d17c3523fe7d9982 (patch)
treeb2fd8985ceb53bc21f87876f17f44e5e1979d22f /README.rst
parente29118fa4b13f102af302c97a7eca48b5b664aae (diff)
downloadbdrem-588252917428f22626ed9bb2d17c3523fe7d9982.tar.gz
bdrem-588252917428f22626ed9bb2d17c3523fe7d9982.zip
Add CSV file data source
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst58
1 files changed, 58 insertions, 0 deletions
diff --git a/README.rst b/README.rst
index a451e39..e503d3b 100644
--- a/README.rst
+++ b/README.rst
@@ -19,6 +19,7 @@ Data sources
- Multiple date fields per record supported.
- An LDAP server
- `Birthday reminder <http://cweiske.de/birthday3.htm>`_ files (``.bdf``)
+- CSV files
Output formats
==============
@@ -133,6 +134,63 @@ __ 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
===========
*bdrem* can read birthdays and other events from persons in an LDAP server.