+/*
+ * wanderlust addressbook export filter
+ */
+
+static int
+wl_export_database(FILE *out, struct db_enumerator e)
+{
+ char email[MAX_EMAIL_LEN];
+
+ fprintf(out, "# Wanderlust address book written by %s\n\n", PACKAGE);
+ db_enumerate_items(e) {
+ get_first_email(email, e.item);
+ if(*email) {
+ fprintf(out,
+ "%s\t\"%s\"\t\"%s\"\n",
+ email,
+ safe_str(db_fget(e.item, NICK)),
+ safe_str(db_name_get(e.item))
+ );
+ }
+ }
+
+ fprintf (out, "\n# End of address book file.\n");
+
+ return 0;
+}
+
+/*
+ * 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) {
+ if(!parse_date_string(anniversary, &day, &month, &year))
+ continue;
+
+ 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
+ */
+