NAME
App::ListOrgAnniversaries - List headlines in Org files
VERSION
version 0.03
SYNOPSIS
# See list-org-anniversaries script
DESCRIPTION
This module uses Log::Any logging framework.
FUNCTIONS
None are exported, but they are exportable.
list_org_anniversaries(%args) -> [STATUS_CODE, ERR_MSG, RESULT]
List all anniversaries in Org files.
This function expects contacts in the following format:
* First last :office:friend:
:PROPERTIES:
:BIRTHDAY: 1900-06-07
:EMAIL: foo@example.com
:OTHERFIELD: ...
:END:
or:
* Some name :office:
- birthday :: [1900-06-07 ]
- email :: foo@example.com
- otherfield :: ...
Using PROPERTIES, dates currently must be specified in "YYYY-MM-DD" format. Other format will be supported in the future. Using description list, dates can be specified using normal Org timestamps (repeaters and warning periods will be ignored).
By convention, if year is '1900' it is assumed to mean year is not specified.
By default, all contacts' anniversaries will be listed. You can filter contacts using tags ('has_tags' and 'lack_tags' options), or by 'due_in' and 'max_overdue' options (due_in=14 and max_overdue=2 is what I commonly use in my startup script).
Returns a 3-element arrayref. STATUS_CODE is 200 on success, or an error code between 3xx-5xx (just like in HTTP). ERR_MSG is a string containing error message, RESULT is the actual result.
Arguments (*
denotes required arguments):
files* => array
due_in => int
Only show anniversaries that are due in this number of days.
field_pattern => str (default
"(?:birthday|anniversary)"
)Field regex that specifies anniversaries.
has_tags => array
Filter headlines that have the specified tags.
lack_tags => array
Filter headlines that don't have the specified tags.
max_overdue => int
Don't show dates that are overdue more than this number of days.
AUTHOR
Steven Haryanto <stevenharyanto@gmail.com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Steven Haryanto.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.