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/shell and normal HTML pages.
18 - Multiple date fields per record supported.
20 - `Birthday reminder <http://cweiske.de/birthday3.htm>` files (``.bdf``)
26 - Email (text + HTML parts)
36 After configuration_, you can test and use *bdrem* via command line::
39 -----------------------------------------------------------
40 Days Age Name Event Date Day
41 -----------------------------------------------------------
42 0 32 Foo Bar Birthday 20.03.1982 Do
43 1 33 Andrea Milestone Birthday 21.03.1981 Fr
44 7 32 Hugh Success Birthday 27.03.1982 Do
45 12 Welt Scherztag 01.04.???? Di
49 To find out about all supported command line options, use ``--help``::
52 ./bin/bdrem.php [options]
53 ./bin/bdrem.php [options] <command> [options]
56 -n NUM, --next=NUM Show NUM days after date
57 -p NUM, --prev=NUM Show NUM days before date
58 -r renderer, --renderer=renderer Output mode
59 --list-renderer lists valid choices for option renderer
60 -e, --stoponempty Output nothing when list is empty
61 -d date, --date=date Date to show events for
62 -c FILE, --config=FILE Path to configuration file
63 -h, --help show this help message and exit
64 -v, --version show the program version and exit
67 readme Show README.rst file
68 config Extract configuration file
73 To send birthday reminder e-mails, use the ``mail`` renderer::
75 $ bdrem --renderer=mail
77 If you only want an email if there is a birthday, use ``--stoponempty``::
79 $ bdrem --renderer=mail --stoponempty
81 Make sure your config file contains ``$mail_from`` and ``$mail_to`` settings.
86 Exporting birthday events into an ``.ics`` file is easy::
88 $ bdrem --renderer=ical > birthdays.ics
90 It is possible to access the calendar via HTTP, too::
92 http://example.org/bdrem/?renderer=ical
94 You can subscribe to it in your calendar or email application.
95 Integration has been tested with Thunderbird's Lightning__ and Claws Mail's
98 __ https://addons.mozilla.org/en-US/thunderbird/addon/lightning/
99 __ http://www.claws-mail.org/plugin.php?plugin=vcalendar
104 Simply point your web browser to the ``.phar`` file, or ``index.php``.
105 You will get a colorful HTML table:
107 .. image:: docs/html.png
114 Copy ``data/bdrem.config.php.dist`` to ``data/bdrem.config.php`` and
115 adjust it to your liking.
117 When running the ``.phar``, extract the configuration file first::
119 $ php dist/bdrem-0.1.0.phar config > bdrem-0.1.0.phar.config.php
124 If you have a ``.bdf`` file from `birthday reminder`__ or `birthday reminder 3`__,
125 you can use it with *bdrem*.
127 Configure your source as follows::
129 $source = array('Bdf', '/path/to/birthday.bdf');
131 __ http://cweiske.de/birthday.htm
132 __ http://cweiske.de/birthday3.htm
137 *bdrem* can read birthdays and other events from persons in an LDAP server.
138 It is known to work fine with ``evolutionPerson`` objects.
139 Attributes ``birthDate`` and ``anniversary`` are read.
141 Configure it as follows::
146 'host' => 'ldap.example.org',
147 'basedn' => 'ou=adressbuch,dc=example,dc=org',
148 'binddn' => 'cn=FIXME,ou=users,dc=example,dc=org',
156 Events can be fetched from any SQL database supported by PHP's
157 PDO extension - MySQL, SQLite, PostgreSQL and so on.
159 You may configure every little detail of your database::
164 'dsn' => 'mysql:dbname=bdrem;host=127.0.0.1',
166 'password' => 'FIXME',
167 'table' => 'contacts',
170 //column name => event title
171 'c_birthday' => 'Birthday'
173 //column with name, or array with column names
174 'name' => array('c_name'),
175 //sprintf-compatible name formatting instruction
176 'nameFormat' => '%s',
184 Configure the date format in ``/etc/freetds/locales.conf``::
187 date format = %Y-%m-%d
189 Also set the charset to UTF-8 in ``/etc/freetds/freetds.conf``::
192 # TDS protocol version
194 client charset = UTF-8
196 Restart Apache afterwards.
198 Use ``dblib`` in the DSN::
200 dblib:host=192.168.1.1;dbname=Databasename
210 - `Console_Color2 <https://pear.php.net/package/Console_Color2>`_
211 - `Console_CommandLine <https://pear.php.net/package/Console_CommandLine>`_
212 - `Console_Table <https://pear.php.net/package/Console_Table>`_
213 - `Mail_mime <https://pear.php.net/package/Mail_mime>`_
214 - `Net_LDAP2 <https://pear.php.net/package/Net_LDAP2>`_
220 ``bdrem`` is licensed under the `AGPL v3`__ or later.
222 __ http://www.gnu.org/licenses/agpl.html
229 http://cweiske.de/bdrem.htm
232 http://git.cweiske.de/bdrem.git
234 Mirror: https://github.com/cweiske/bdrem
240 Written by Christian Weiske, cweiske@cweiske.de