-.TH ABOOK 1 "June 6, 2003"
+.TH ABOOK 1 2006-09-06
.nh
.SH NAME
abook \- text-based address book program
- \fBspruce\fP Spruce address book
.br
- \fBwl\fP Wanderlust address book
+.br
+- \fBbsdcal\fP BSD calendar
.TP
\fB\-\-add-email\fP
Read an e-mail message from stdin and add the sender to the addressbook.
WINDOW *editw;
-static int parse_date_string(char *s, int *day, int *month, int *year);
-
static void
editor_tab(const int tab)
return valid;
}
-static int
+int
parse_date_string(char *s, int *day, int *month, int *year)
{
int i = 0;
void edit_item(int item);
void get_first_email(char *str, int item);
void add_item();
+int parse_date_string(char *s, int *day, int *month, int *year);
#define EDITW_COLS (COLS - 6)
#define EDITW_LINES (LINES - 5)
static int text_export_database(FILE *out, struct db_enumerator e);
static int spruce_export_database(FILE *out, struct db_enumerator e);
static int wl_export_database(FILE *out, struct db_enumerator e);
+static int bsdcal_export_database(FILE *out, struct db_enumerator e);
/*
* end of function declarations
{ "text", N_("plain text"), text_export_database },
{ "wl", N_("Wanderlust address book"), wl_export_database },
{ "spruce", N_("Spruce address book"), spruce_export_database },
+ { "bsdcal", N_("BSD calendar"), bsdcal_export_database },
{ "\0", NULL, NULL }
};
* end of wanderlust addressbook export filter
*/
+/*
+ * BSD calendar export filter
+ */
+
+static int
+bsdcal_export_database(FILE *out, struct db_enumerator e)
+{
+ db_enumerate_items(e) {
+ int year, month = 0, day = 0;
+ char *anniversary = db_fget(e.item, ANNIVERSARY);
+
+ if(anniversary) {
+ parse_date_string(anniversary, &day, &month, &year);
+
+ fprintf(out,
+ _("%02d/%02d\tAnniversary of %s\n"),
+ month,
+ day,
+ safe_str(db_name_get(e.item))
+ );
+ }
+ }
+
+ return 0;
+}
+
+/*
+ * end of BSD calendar export filter
+ */
+