init_mutt_query();
if( str == NULL || !strcasecmp(str, "all") ) {
- struct db_enumerator e = init_db_enumerator(ENUM_ALL);
- printf("All items\n");
- db_enumerate_items(e)
- muttq_print_item(stdout, e.item);
+ export_file("muttq", "-");
} else {
int search_fields[] = {NAME, EMAIL, NICK, -1};
int i;
static int palm_export_database(FILE *out, struct db_enumerator e);
static int vcard_export_database(FILE *out, struct db_enumerator e);
static int mutt_alias_export(FILE *out, struct db_enumerator e);
+static int mutt_query_export_database(FILE *out, struct db_enumerator e);
static int elm_alias_export(FILE *out, struct db_enumerator e);
static int text_export_database(FILE *out, struct db_enumerator e);
static int spruce_export_database(FILE *out, struct db_enumerator e);
{ "ldif", N_("ldif / Netscape addressbook (.4ld)"), ldif_export_database },
{ "vcard", N_("vCard 2 file"), vcard_export_database },
{ "mutt", N_("mutt alias"), mutt_alias_export },
+ { "muttq", N_("mutt query format (internal use)"), mutt_query_export_database },
{ "html", N_("html document"), html_export_database },
{ "pine", N_("pine addressbook"), pine_export_database },
{ "csv", N_("comma separated values"), csv_export_database },
abook_list_free(&emails);
}
+static int
+mutt_query_export_database(FILE *out, struct db_enumerator e)
+{
+ fprintf(out, "All items\n");
+ db_enumerate_items(e)
+ muttq_print_item(out, e.item);
+ return 0;
+}
+
/*
* end of mutt alias export filter
*/