ANN: Speedee, a web-based notmuch client

2012-07-10 Thread Peter Keen
On Tue, Jul 10, 2012 at 5:08 AM, elf Pavlik
wrote:

> Hi,
>
> Sounds great!
>
> https://speedee.bugsplat.info/#search/ruby throws at me:
>
> NoMethodError at /
> undefined method `close' for nil:NilClass
>
> file: app.rb
> location: block in 
> line: 16
>
> Looking forward to play with you demo :)
>
> Thanks!
> ~ elf Pavlik ~
>


Interesting. Looks like something was leaking file handles. It appears to
be all better after a simple patch and a restart. Thanks!
-- next part --
An HTML attachment was scrubbed...
URL: 



Re: ANN: Speedee, a web-based notmuch client

2012-07-10 Thread Peter Keen
On Tue, Jul 10, 2012 at 5:08 AM, elf Pavlik
perpetual-trip...@wwelves.orgwrote:

 Hi,

 Sounds great!

 https://speedee.bugsplat.info/#search/ruby throws at me:

 NoMethodError at /
 undefined method `close' for nil:NilClass

 file: app.rb
 location: block in class:App
 line: 16

 Looking forward to play with you demo :)

 Thanks!
 ~ elf Pavlik ~



Interesting. Looks like something was leaking file handles. It appears to
be all better after a simple patch and a restart. Thanks!
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


ANN: Speedee, a web-based notmuch client

2012-07-09 Thread Peter Keen
Hi guys,

Over the weekend I threw together the prototype for a web-based notmuch
client named Speedee. It's a little Ruby webapp with a Backbone.js front
end, using Twitter Bootstrap and a free theme from Bootswatch. It doesn't
do much yet. Basically, it can list threads matching a search and show you
those threads. It reads the notmuch config file to find the database. It
also reads the file for a new section named "speedee searches", where you
can define named searches to be included in the sidebar. The list of All
Tags is also included in the sidebar, assuming the version of notmuch
you're running has my ruby bindings patch from yesterday.

At this point, my plan is to add a super basic mail composer and sending
facility and then live with it for a few months. I've setup a demo using
the notmuch mbox file as sample data. Feel free to poke around [1] and let
me know what you think!

Source: https://github.com/peterkeen/speedee
Demo: https://speedee.bugsplat.info/#search/ruby


[1]: The demo is using a self-signed wildcard cert. SHA1 fingerprint: 01 B6
5D 47 EC 4A BB 27 E6 49 A1 0F 5A 48 8F BD CC 33 F2 F8
-- next part --
An HTML attachment was scrubbed...
URL: 



[PATCH] ruby: add all_tags method to Notmuch::Database

2012-07-09 Thread Peter Keen
The python bindings define a binding for the all_tags method on the
database, which is pretty handy. This commit adds the same binding to
the ruby bindings.
---
 bindings/ruby/database.c |   20 
 bindings/ruby/defs.h |3 +++
 bindings/ruby/init.c |1 +
 3 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c
index e84f726..d5ba108 100644
--- a/bindings/ruby/database.c
+++ b/bindings/ruby/database.c
@@ -395,3 +395,23 @@ notmuch_rb_database_query_create (VALUE self, VALUE qstrv)

 return Data_Wrap_Struct (notmuch_rb_cQuery, NULL, NULL, query);
 }
+
+/*
+ * call-seq: DB.get_all_tags() => TAGS
+ *
+ * Retrieve all tags in the database.
+ */
+VALUE
+notmuch_rb_database_get_all_tags (VALUE self)
+{
+notmuch_database_t *db;
+notmuch_tags_t *tags;
+
+Data_Get_Notmuch_Database (self, db);
+
+tags = notmuch_database_get_all_tags (db);
+if (!tags)
+rb_raise (notmuch_rb_eMemoryError, "Out of memory");
+
+return Data_Wrap_Struct (notmuch_rb_cTags, NULL, NULL, tags);
+}
diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
index fe81b3f..f1f7502 100644
--- a/bindings/ruby/defs.h
+++ b/bindings/ruby/defs.h
@@ -180,6 +180,9 @@ notmuch_rb_database_find_message_by_filename
(VALUE self, VALUE pathv);
 VALUE
 notmuch_rb_database_query_create (VALUE self, VALUE qstrv);

+VALUE
+notmuch_rb_database_get_all_tags (VALUE self);
+
 /* directory.c */
 VALUE
 notmuch_rb_directory_destroy (VALUE self);
diff --git a/bindings/ruby/init.c b/bindings/ruby/init.c
index f4931d3..52561c7 100644
--- a/bindings/ruby/init.c
+++ b/bindings/ruby/init.c
@@ -230,6 +230,7 @@ Init_notmuch (void)
 rb_define_method (notmuch_rb_cDatabase, "find_message_by_filename",
  notmuch_rb_database_find_message_by_filename, 1); /* in 
database.c */
 rb_define_method (notmuch_rb_cDatabase, "query",
notmuch_rb_database_query_create, 1); /* in database.c */
+rb_define_method (notmuch_rb_cDatabase, "all_tags",
notmuch_rb_database_get_all_tags, 0); /* in database.c */

 /*
  * Document-class: Notmuch::Directory
-- 
1.7.7.5 (Apple Git-26)
-- next part --
An HTML attachment was scrubbed...
URL: 



[PATCH] ruby: add all_tags method to Notmuch::Database

2012-07-09 Thread Peter Keen
The python bindings define a binding for the all_tags method on the
database, which is pretty handy. This commit adds the same binding to
the ruby bindings.
---
 bindings/ruby/database.c |   20 
 bindings/ruby/defs.h |3 +++
 bindings/ruby/init.c |1 +
 3 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/bindings/ruby/database.c b/bindings/ruby/database.c
index e84f726..d5ba108 100644
--- a/bindings/ruby/database.c
+++ b/bindings/ruby/database.c
@@ -395,3 +395,23 @@ notmuch_rb_database_query_create (VALUE self, VALUE qstrv)

 return Data_Wrap_Struct (notmuch_rb_cQuery, NULL, NULL, query);
 }
+
+/*
+ * call-seq: DB.get_all_tags() = TAGS
+ *
+ * Retrieve all tags in the database.
+ */
+VALUE
+notmuch_rb_database_get_all_tags (VALUE self)
+{
+notmuch_database_t *db;
+notmuch_tags_t *tags;
+
+Data_Get_Notmuch_Database (self, db);
+
+tags = notmuch_database_get_all_tags (db);
+if (!tags)
+rb_raise (notmuch_rb_eMemoryError, Out of memory);
+
+return Data_Wrap_Struct (notmuch_rb_cTags, NULL, NULL, tags);
+}
diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h
index fe81b3f..f1f7502 100644
--- a/bindings/ruby/defs.h
+++ b/bindings/ruby/defs.h
@@ -180,6 +180,9 @@ notmuch_rb_database_find_message_by_filename
(VALUE self, VALUE pathv);
 VALUE
 notmuch_rb_database_query_create (VALUE self, VALUE qstrv);

+VALUE
+notmuch_rb_database_get_all_tags (VALUE self);
+
 /* directory.c */
 VALUE
 notmuch_rb_directory_destroy (VALUE self);
diff --git a/bindings/ruby/init.c b/bindings/ruby/init.c
index f4931d3..52561c7 100644
--- a/bindings/ruby/init.c
+++ b/bindings/ruby/init.c
@@ -230,6 +230,7 @@ Init_notmuch (void)
 rb_define_method (notmuch_rb_cDatabase, find_message_by_filename,
  notmuch_rb_database_find_message_by_filename, 1); /* in 
database.c */
 rb_define_method (notmuch_rb_cDatabase, query,
notmuch_rb_database_query_create, 1); /* in database.c */
+rb_define_method (notmuch_rb_cDatabase, all_tags,
notmuch_rb_database_get_all_tags, 0); /* in database.c */

 /*
  * Document-class: Notmuch::Directory
-- 
1.7.7.5 (Apple Git-26)
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch


ANN: Speedee, a web-based notmuch client

2012-07-09 Thread Peter Keen
Hi guys,

Over the weekend I threw together the prototype for a web-based notmuch
client named Speedee. It's a little Ruby webapp with a Backbone.js front
end, using Twitter Bootstrap and a free theme from Bootswatch. It doesn't
do much yet. Basically, it can list threads matching a search and show you
those threads. It reads the notmuch config file to find the database. It
also reads the file for a new section named speedee searches, where you
can define named searches to be included in the sidebar. The list of All
Tags is also included in the sidebar, assuming the version of notmuch
you're running has my ruby bindings patch from yesterday.

At this point, my plan is to add a super basic mail composer and sending
facility and then live with it for a few months. I've setup a demo using
the notmuch mbox file as sample data. Feel free to poke around [1] and let
me know what you think!

Source: https://github.com/peterkeen/speedee
Demo: https://speedee.bugsplat.info/#search/ruby


[1]: The demo is using a self-signed wildcard cert. SHA1 fingerprint: 01 B6
5D 47 EC 4A BB 27 E6 49 A1 0F 5A 48 8F BD CC 33 F2 F8
___
notmuch mailing list
notmuch@notmuchmail.org
http://notmuchmail.org/mailman/listinfo/notmuch