address book
Feature suggestions, patches and general feedback is of course
-welcome.
+welcome. Patches in the form of a git branch against any of the ones
+found on git://git.err.no/eweouz is preferred, but others are of
+course also accepted.
-- Tollef Fog Heen <tfheen@err.no>
+eweouz (0.2) unstable; urgency=low
+
+ * New upstream release
+
+ -- Tollef Fog Heen <tfheen@ubuntu.com> Fri, 08 Aug 2008 16:20:41 +0200
+
eweouz (0.1) unstable; urgency=low
* Initial Release.
(defun eweouz-add-sender ()
"Add sender of current message"
(interactive)
-
(save-excursion
(set-buffer gnus-article-buffer)
- (let* ((from (mail-header-parse-address (gnus-fetch-field "From")))
- (record (list (cons 'email (car from))
- (cons 'name (cdr from)))))
- (eweouz-do-add record))))
+ (eweouz-do-add (mail-header-parse-address (gnus-fetch-field "From")))))
(defun eweouz-do-add (record)
(interactive)
- (let* ((name (cdr (assoc 'name record)))
- (email (cdr (assoc 'email record))))
+ (let* ((email (car record))
+ (name (cdr record)))
+ (message (format "%s" record))
(call-process eweouz-write-path nil nil nil "--id" "new" "--full-name" name
"--emails" email)))
if (error != NULL) {
fprintf(stderr, "%s\n", error->message);
+ return 1;
}
e_book_get_addressbooks(&source_list, &error);
if (error != NULL) {
fprintf(stderr, "%s\n", error->message);
+ return 1;
}
if (search_filter != NULL) {
for (s = sources ; s; s = s->next) {
source = E_SOURCE(s->data);
book = e_book_new(source, &error);
+
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error->message);
+ return 1;
+ }
+
e_book_open(book, TRUE, &error);
+
+
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error->message);
+ return 1;
+ }
+
e_book_get_contacts(book, query, &contacts, &error);
+ if (error != NULL) {
+ fprintf(stderr, "%s\n", error->message);
+ return 1;
+ }
for (c = contacts; c; c = c->next) {
dump_as_vcard(E_CONTACT(c->data), 1);
#include <libedataserver/e-source-group.h>
#include <gconf/gconf.h>
#include <glib.h>
-
+#include <locale.h>
static gchar *id = NULL;
static gchar *full_name = NULL;
GError *error = NULL;
GOptionContext *optioncontext;
+ setlocale (LC_ALL, "");
+
optioncontext = g_option_context_new ("- whack address book");
g_option_context_add_main_entries (optioncontext, entries, NULL);
g_option_context_parse (optioncontext, &argc, &argv, &error);
if (error != NULL) {
fprintf(stderr, "%s\n", error->message);
+ exit(1);
}
e_book_get_addressbooks(&source_list, &error);
if (error != NULL) {
fprintf(stderr, "%s\n", error->message);
+ exit(1);
}
if (id == NULL) {