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)
35 After configuration_, you can test and use *bdrem* via command line::
38 -----------------------------------------------------------
39 Days Age Name Event Date Day
40 -----------------------------------------------------------
41 0 32 Foo Bar Birthday 20.03.1982 Do
42 1 33 Andrea Milestone Birthday 21.03.1981 Fr
43 7 32 Hugh Success Birthday 27.03.1982 Do
44 12 Welt Scherztag 01.04.???? Di
48 To find out about all supported command line options, use ``--help``::
51 ./bin/bdrem.php [options]
52 ./bin/bdrem.php [options] <command> [options]
55 -n NUM, --next=NUM Show NUM days after date
56 -p NUM, --prev=NUM Show NUM days before date
57 -r renderer, --renderer=renderer Output mode
58 --list-renderer lists valid choices for option renderer
59 -e, --stoponempty Output nothing when list is empty
60 -d date, --date=date Date to show events for
61 -c FILE, --config=FILE Path to configuration file
62 -h, --help show this help message and exit
63 -v, --version show the program version and exit
66 readme Show README.rst file
67 config Extract configuration file
72 To send birthday reminder e-mails, use the ``mail`` renderer::
74 $ bdrem --renderer=mail
76 If you only want an email if there is a birthday, use ``--stoponempty``::
78 $ bdrem --renderer=mail --stoponempty
80 Make sure your config file contains ``$mail_from`` and ``$mail_to`` settings.
85 Simply point your web browser to the ``.phar`` file, or ``index.php``.
86 You will get a colorful HTML table:
88 .. image:: docs/html.png
95 Copy ``data/bdrem.config.php.dist`` to ``data/bdrem.config.php`` and
96 adjust it to your liking.
98 When running the ``.phar``, extract the configuration file first::
100 $ php dist/bdrem-0.1.0.phar config > bdrem-0.1.0.phar.config.php
105 If you have a ``.bdf`` file from `birthday reminder`__ or `birthday reminder 3`__,
106 you can use it with *bdrem*.
108 Configure your source as follows::
110 $source = array('Bdf', '/path/to/birthday.bdf');
112 __ http://cweiske.de/birthday.htm
113 __ http://cweiske.de/birthday3.htm
118 *bdrem* can read birthdays and other events from persons in an LDAP server.
119 It is known to work fine with ``evolutionPerson`` objects.
120 Attributes ``birthDate`` and ``anniversary`` are read.
122 Configure it as follows::
127 'host' => 'ldap.example.org',
128 'basedn' => 'ou=adressbuch,dc=example,dc=org',
129 'binddn' => 'cn=FIXME,ou=users,dc=example,dc=org',
137 Events can be fetched from any SQL database supported by PHP's
138 PDO extension - MySQL, SQLite, PostgreSQL and so on.
140 You may configure every little detail of your database::
145 'dsn' => 'mysql:dbname=bdrem;host=127.0.0.1',
147 'password' => 'FIXME',
148 'table' => 'contacts',
151 //column name => event title
152 'c_birthday' => 'Birthday'
154 //column with name, or array with column names
155 'name' => array('c_name'),
156 //sprintf-compatible name formatting instruction
157 'nameFormat' => '%s',
165 Configure the date format in ``/etc/freetds/locales.conf``::
168 date format = %Y-%m-%d
170 Also set the charset to UTF-8 in ``/etc/freetds/freetds.conf``::
173 # TDS protocol version
175 client charset = UTF-8
177 Restart Apache afterwards.
179 Use ``dblib`` in the DSN::
181 dblib:host=192.168.1.1;dbname=Databasename
191 - `Console_Color2 <https://pear.php.net/package/Console_Color2>`_
192 - `Console_CommandLine <https://pear.php.net/package/Console_CommandLine>`_
193 - `Console_Table <https://pear.php.net/package/Console_Table>`_
194 - `Mail_mime <https://pear.php.net/package/Mail_mime>`_
195 - `Net_LDAP2 <https://pear.php.net/package/Net_LDAP2>`_
201 ``bdrem`` is licensed under the `AGPL v3`__ or later.
203 __ http://www.gnu.org/licenses/agpl.html
210 http://cweiske.de/bdrem.htm
213 http://git.cweiske.de/bdrem.git
215 Mirror: https://github.com/cweiske/bdrem
221 Written by Christian Weiske, cweiske@cweiske.de