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``)
27 - Email (text + HTML parts)
37 After configuration_, you can test and use *bdrem* via command line::
40 -----------------------------------------------------------
41 Days Age Name Event Date Day
42 -----------------------------------------------------------
43 0 32 Foo Bar Birthday 20.03.1982 Do
44 1 33 Andrea Milestone Birthday 21.03.1981 Fr
45 7 32 Hugh Success Birthday 27.03.1982 Do
46 12 Welt Scherztag 01.04.???? Di
50 To find out about all supported command line options, use ``--help``::
53 ./bin/bdrem.php [options]
54 ./bin/bdrem.php [options] <command> [options]
57 -n NUM, --next=NUM Show NUM days after date
58 -p NUM, --prev=NUM Show NUM days before date
59 -r renderer, --renderer=renderer Output mode
60 --list-renderer lists valid choices for option renderer
61 -e, --stoponempty Output nothing when list is empty
62 -d date, --date=date Date to show events for
63 -c FILE, --config=FILE Path to configuration file
64 -h, --help show this help message and exit
65 -v, --version show the program version and exit
68 readme Show README.rst file
69 config Extract configuration file
74 To send birthday reminder e-mails, use the ``mail`` renderer::
76 $ bdrem --renderer=mail
78 If you only want an email if there is a birthday, use ``--stoponempty``::
80 $ bdrem --renderer=mail --stoponempty
82 Make sure your config file contains ``$mail_from`` and ``$mail_to`` settings.
87 Exporting birthday events into an ``.ics`` file is easy::
89 $ bdrem --renderer=ical > birthdays.ics
91 It is possible to access the calendar via HTTP, too::
93 http://example.org/bdrem/?renderer=ical
95 You can subscribe to it in your calendar or email application.
96 Integration has been tested with Thunderbird's Lightning__ and Claws Mail's
99 __ https://addons.mozilla.org/en-US/thunderbird/addon/lightning/
100 __ http://www.claws-mail.org/plugin.php?plugin=vcalendar
105 Simply point your web browser to the ``.phar`` file, or ``index.php``.
106 You will get a colorful HTML table:
108 .. image:: docs/html.png
115 Copy ``data/bdrem.config.php.dist`` to ``data/bdrem.config.php`` and
116 adjust it to your liking.
118 When running the ``.phar``, extract the configuration file first::
120 $ php dist/bdrem-0.1.0.phar config > bdrem-0.1.0.phar.config.php
125 If you have a ``.bdf`` file from `birthday reminder`__ or `birthday reminder 3`__,
126 you can use it with *bdrem*.
128 Configure your source as follows::
130 $source = array('Bdf', '/path/to/birthday.bdf');
132 __ http://cweiske.de/birthday.htm
133 __ http://cweiske.de/birthday3.htm
138 *bdrem* can read birthdays and other events from persons in an LDAP server.
139 It is known to work fine with ``evolutionPerson`` objects.
140 Attributes ``birthDate`` and ``anniversary`` are read.
142 Configure it as follows::
147 'host' => 'ldap.example.org',
148 'basedn' => 'ou=adressbuch,dc=example,dc=org',
149 'binddn' => 'cn=FIXME,ou=users,dc=example,dc=org',
157 Events can be fetched from any SQL database supported by PHP's
158 PDO extension - MySQL, SQLite, PostgreSQL and so on.
160 You may configure every little detail of your database::
165 'dsn' => 'mysql:dbname=bdrem;host=127.0.0.1',
167 'password' => 'FIXME',
168 'table' => 'contacts',
171 //column name => event title
172 'c_birthday' => 'Birthday'
174 //column with name, or array with column names
175 'name' => array('c_name'),
176 //sprintf-compatible name formatting instruction
177 'nameFormat' => '%s',
185 Configure the date format in ``/etc/freetds/locales.conf``::
188 date format = %Y-%m-%d
190 Also set the charset to UTF-8 in ``/etc/freetds/freetds.conf``::
193 # TDS protocol version
195 client charset = UTF-8
197 Restart Apache afterwards.
199 Use ``dblib`` in the DSN::
201 dblib:host=192.168.1.1;dbname=Databasename
211 - `Console_Color2 <https://pear.php.net/package/Console_Color2>`_
212 - `Console_CommandLine <https://pear.php.net/package/Console_CommandLine>`_
213 - `Console_Table <https://pear.php.net/package/Console_Table>`_
214 - `Mail_mime <https://pear.php.net/package/Mail_mime>`_
215 - `Net_LDAP2 <https://pear.php.net/package/Net_LDAP2>`_
221 ``bdrem`` is licensed under the `AGPL v3`__ or later.
223 __ http://www.gnu.org/licenses/agpl.html
230 http://cweiske.de/bdrem.htm
233 http://git.cweiske.de/bdrem.git
235 Mirror: https://github.com/cweiske/bdrem
241 Written by Christian Weiske, cweiske@cweiske.de