1 *********************************
2 bdrem - Birthday reminder by mail
3 *********************************
4 Birthday reminder that sends out e-mails.
6 It can also generate ASCII tables on your console, iCalendar files
19 - Multiple date fields per record supported.
20 - An LDAP server with ``evolutionPerson`` records
21 - `Birthday reminder <http://cweiske.de/birthday3.htm>`_ files (``.bdf``)
23 - A directory of .vcf vCard files
30 - Email (text + HTML parts)
40 After configuration_, you can test and use *bdrem* via command line::
43 -----------------------------------------------------------
44 Days Age Name Event Date Day
45 -----------------------------------------------------------
46 0 32 Foo Bar Birthday 20.03.1982 Do
47 1 33 Andrea Milestone Birthday 21.03.1981 Fr
48 7 32 Hugh Success Birthday 27.03.1982 Do
49 12 Welt Scherztag 01.04.???? Di
53 To find out about all supported command line options, use ``--help``::
56 ./bin/bdrem.php [options]
57 ./bin/bdrem.php [options] <command> [options]
60 -n NUM, --next=NUM Show NUM days after date
61 -p NUM, --prev=NUM Show NUM days before date
62 -r renderer, --renderer=renderer Output mode
63 --list-renderer lists valid choices for option renderer
64 -e, --stoponempty Output nothing when list is empty
65 -d date, --date=date Date to show events for
66 -c FILE, --config=FILE Path to configuration file
67 --debug Development helper (mail)
68 --no-color Do not output ANSI color codes
69 -h, --help show this help message and exit
70 -v, --version show the program version and exit
73 readme Show README.rst file
74 config Extract configuration file
79 To send birthday reminder e-mails, use the ``mail`` renderer::
81 $ bdrem --renderer=mail
83 If you only want an email if there is a birthday, use ``--stoponempty``::
85 $ bdrem --renderer=mail --stoponempty
87 Make sure your config file contains ``$mail_from`` and ``$mail_to`` settings.
92 Exporting birthday events into an ``.ics`` file is easy::
94 $ bdrem --renderer=ical > birthdays.ics
96 It is possible to access the calendar via HTTP, too::
98 http://example.org/bdrem/?renderer=ical
100 You can subscribe to it in your calendar or email application.
101 Integration has been tested with Thunderbird's Lightning__ and Claws Mail's
104 __ https://addons.mozilla.org/en-US/thunderbird/addon/lightning/
105 __ http://www.claws-mail.org/plugin.php?plugin=vcalendar
110 Simply point your web browser to the ``.phar`` file, or ``index.php``.
111 You will get a colorful HTML table:
113 .. image:: docs/html.png
120 Copy ``data/bdrem.config.php.dist`` to ``data/bdrem.config.php`` and
121 adjust it to your liking.
123 When running the ``.phar``, extract the configuration file first::
125 $ php dist/bdrem-0.1.0.phar config > bdrem-0.1.0.phar.config.php
130 If you have a ``.bdf`` file from `birthday reminder`__ or `birthday reminder 3`__,
131 you can use it with *bdrem*.
133 Configure your source as follows::
135 $source = array('Bdf', '/path/to/birthday.bdf');
137 __ http://cweiske.de/birthday.htm
138 __ http://cweiske.de/birthday3.htm
143 Comma separated value files can be used with bdrem.
144 They should at least contain a column with the name, and one with the date.
146 Simple configuration if you use the default settings::
153 Complex configuration::
158 'filename' => '/path/to/file.csv',
164 'firstLineIsHeader' => true,
165 'defaultEvent' => 'Birthday',
170 Configuration options
171 ---------------------
173 Determines the position of the name, event and date columns.
174 ``0`` is the first column.
175 You can use ``false`` to disable a column; helpful if there is no
180 ``array('name' => 0, 'event' => 1, 'date' => 2)``
183 Text to use as event if there is no event column.
185 Defaults to ``Birthday``
187 ``firstLineIsHeader``
188 If the first line in the CSV is column header data
193 How columns are separated.
200 *bdrem* can read birthdays and other events from persons in an LDAP server.
201 It is known to work fine with ``evolutionPerson`` objects.
202 Attributes ``birthDate`` and ``anniversary`` are read.
204 Configure it as follows::
209 'host' => 'ldap.example.org',
210 'basedn' => 'ou=adressbuch,dc=example,dc=org',
211 'binddn' => 'cn=FIXME,ou=users,dc=example,dc=org',
219 Events can be fetched from any SQL database supported by PHP's
220 PDO extension - MySQL, SQLite, PostgreSQL and so on.
222 You may configure every little detail of your database::
227 'dsn' => 'mysql:dbname=bdrem;host=127.0.0.1',
229 'password' => 'FIXME',
230 'table' => 'contacts',
233 //column name => event title
234 'c_birthday' => 'Birthday'
236 //column with name, or array with column names
237 'name' => array('c_name'),
238 //sprintf-compatible name formatting instruction
239 'nameFormat' => '%s',
247 Configure the date format in ``/etc/freetds/locales.conf``::
250 date format = %Y-%m-%d
252 Also set the charset to UTF-8 in ``/etc/freetds/freetds.conf``::
255 # TDS protocol version
257 client charset = UTF-8
259 Restart Apache afterwards.
261 Use ``dblib`` in the DSN::
263 dblib:host=192.168.1.1;dbname=Databasename
273 - `Console_Color2 <https://pear.php.net/package/Console_Color2>`_
274 - `Console_CommandLine <https://pear.php.net/package/Console_CommandLine>`_
275 - `Console_Table <https://pear.php.net/package/Console_Table>`_
276 - `Mail_mime <https://pear.php.net/package/Mail_mime>`_
277 - `Net_LDAP2 <https://pear.php.net/package/Net_LDAP2>`_
280 Note that the ``.phar`` file already includes all dependencies;
281 you do not need to install anything.
283 When running from a git checkout, install the dependencies with composer::
291 ``bdrem`` is licensed under the `AGPL v3`__ or later.
293 __ http://www.gnu.org/licenses/agpl.html
300 http://cweiske.de/bdrem.htm
303 http://git.cweiske.de/bdrem.git
305 Mirror: https://github.com/cweiske/bdrem
311 Written by Christian Weiske, cweiske@cweiske.de