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.
21 - `Birthday reminder <http://cweiske.de/birthday3.htm>`_ files (``.bdf``)
28 - Email (text + HTML parts)
38 After configuration_, you can test and use *bdrem* via command line::
41 -----------------------------------------------------------
42 Days Age Name Event Date Day
43 -----------------------------------------------------------
44 0 32 Foo Bar Birthday 20.03.1982 Do
45 1 33 Andrea Milestone Birthday 21.03.1981 Fr
46 7 32 Hugh Success Birthday 27.03.1982 Do
47 12 Welt Scherztag 01.04.???? Di
51 To find out about all supported command line options, use ``--help``::
54 ./bin/bdrem.php [options]
55 ./bin/bdrem.php [options] <command> [options]
58 -n NUM, --next=NUM Show NUM days after date
59 -p NUM, --prev=NUM Show NUM days before date
60 -r renderer, --renderer=renderer Output mode
61 --list-renderer lists valid choices for option renderer
62 -e, --stoponempty Output nothing when list is empty
63 -d date, --date=date Date to show events for
64 -c FILE, --config=FILE Path to configuration file
65 -h, --help show this help message and exit
66 -v, --version show the program version and exit
69 readme Show README.rst file
70 config Extract configuration file
75 To send birthday reminder e-mails, use the ``mail`` renderer::
77 $ bdrem --renderer=mail
79 If you only want an email if there is a birthday, use ``--stoponempty``::
81 $ bdrem --renderer=mail --stoponempty
83 Make sure your config file contains ``$mail_from`` and ``$mail_to`` settings.
88 Exporting birthday events into an ``.ics`` file is easy::
90 $ bdrem --renderer=ical > birthdays.ics
92 It is possible to access the calendar via HTTP, too::
94 http://example.org/bdrem/?renderer=ical
96 You can subscribe to it in your calendar or email application.
97 Integration has been tested with Thunderbird's Lightning__ and Claws Mail's
100 __ https://addons.mozilla.org/en-US/thunderbird/addon/lightning/
101 __ http://www.claws-mail.org/plugin.php?plugin=vcalendar
106 Simply point your web browser to the ``.phar`` file, or ``index.php``.
107 You will get a colorful HTML table:
109 .. image:: docs/html.png
116 Copy ``data/bdrem.config.php.dist`` to ``data/bdrem.config.php`` and
117 adjust it to your liking.
119 When running the ``.phar``, extract the configuration file first::
121 $ php dist/bdrem-0.1.0.phar config > bdrem-0.1.0.phar.config.php
126 If you have a ``.bdf`` file from `birthday reminder`__ or `birthday reminder 3`__,
127 you can use it with *bdrem*.
129 Configure your source as follows::
131 $source = array('Bdf', '/path/to/birthday.bdf');
133 __ http://cweiske.de/birthday.htm
134 __ http://cweiske.de/birthday3.htm
139 Comma separated value files can be used with bdrem.
140 They should at least contain a column with the name, and one with the date.
142 Simple configuration if you use the default settings::
149 Complex configuration::
154 'filename' => '/path/to/file.csv',
160 'firstLineIsHeader' => true,
161 'defaultEvent' => 'Birthday',
166 Configuration options
167 ---------------------
169 Determines the position of the name, event and date columns.
170 ``0`` is the first column.
171 You can use ``false`` to disable a column; helpful if there is no
176 ``array('name' => 0, 'event' => 1, 'date' => 2)``
179 Text to use as event if there is no event column.
181 Defaults to ``Birthday``
183 ``firstLineIsHeader``
184 If the first line in the CSV is column header data
189 How columns are separated.
196 *bdrem* can read birthdays and other events from persons in an LDAP server.
197 It is known to work fine with ``evolutionPerson`` objects.
198 Attributes ``birthDate`` and ``anniversary`` are read.
200 Configure it as follows::
205 'host' => 'ldap.example.org',
206 'basedn' => 'ou=adressbuch,dc=example,dc=org',
207 'binddn' => 'cn=FIXME,ou=users,dc=example,dc=org',
215 Events can be fetched from any SQL database supported by PHP's
216 PDO extension - MySQL, SQLite, PostgreSQL and so on.
218 You may configure every little detail of your database::
223 'dsn' => 'mysql:dbname=bdrem;host=127.0.0.1',
225 'password' => 'FIXME',
226 'table' => 'contacts',
229 //column name => event title
230 'c_birthday' => 'Birthday'
232 //column with name, or array with column names
233 'name' => array('c_name'),
234 //sprintf-compatible name formatting instruction
235 'nameFormat' => '%s',
243 Configure the date format in ``/etc/freetds/locales.conf``::
246 date format = %Y-%m-%d
248 Also set the charset to UTF-8 in ``/etc/freetds/freetds.conf``::
251 # TDS protocol version
253 client charset = UTF-8
255 Restart Apache afterwards.
257 Use ``dblib`` in the DSN::
259 dblib:host=192.168.1.1;dbname=Databasename
269 - `Console_Color2 <https://pear.php.net/package/Console_Color2>`_
270 - `Console_CommandLine <https://pear.php.net/package/Console_CommandLine>`_
271 - `Console_Table <https://pear.php.net/package/Console_Table>`_
272 - `Mail_mime <https://pear.php.net/package/Mail_mime>`_
273 - `Net_LDAP2 <https://pear.php.net/package/Net_LDAP2>`_
276 Note that the ``.phar`` file already includes all dependencies;
277 you do not need to install anything.
283 ``bdrem`` is licensed under the `AGPL v3`__ or later.
285 __ http://www.gnu.org/licenses/agpl.html
292 http://cweiske.de/bdrem.htm
295 http://git.cweiske.de/bdrem.git
297 Mirror: https://github.com/cweiske/bdrem
303 Written by Christian Weiske, cweiske@cweiske.de