About the json output and the number of results shown.

2011-02-13 Thread Jeff Waugh
On Sat, Jan 29, 2011 at 07:40, Carl Worth wrote: > One idea I've had for this is to change the output (perhaps with a > command-line option) to avoid emitting the outer array. That is, the > results would instead be a series of independent JSON objects rather > than a single JSON object. That shou

Re: About the json output and the number of results shown.

2011-02-12 Thread Jeff Waugh
On Sat, Jan 29, 2011 at 07:40, Carl Worth wrote: > One idea I've had for this is to change the output (perhaps with a > command-line option) to avoid emitting the outer array. That is, the > results would instead be a series of independent JSON objects rather > than a single JSON object. That shou

About the json output and the number of results shown.

2011-01-29 Thread Mike Kelly
On Sat, 29 Jan 2011 06:44:40 +1000 Carl Worth wrote: > On Wed, 12 Jan 2011 22:39:45 +, Mike Kelly > wrote: > > For starters, if I'm simply trying to retrieve a single message, the > > interface is rather awkard. I seem to need to do something like: > > > > my $json = `notmuch show --for

Re: About the json output and the number of results shown.

2011-01-29 Thread Mike Kelly
On Sat, 29 Jan 2011 06:44:40 +1000 Carl Worth wrote: > On Wed, 12 Jan 2011 22:39:45 +, Mike Kelly > wrote: > > For starters, if I'm simply trying to retrieve a single message, the > > interface is rather awkard. I seem to need to do something like: > > > > my $json = `notmuch show --for

About the json output and the number of results shown.

2011-01-29 Thread Carl Worth
On Wed, 12 Jan 2011 22:39:45 +, Mike Kelly wrote: > For starters, if I'm simply trying to retrieve a single message, the > interface is rather awkard. I seem to need to do something like: > > my $json = `notmuch show --format=json id:$message_id`; > my $parsed_json = decode_json($json

About the json output and the number of results shown.

2011-01-29 Thread Carl Worth
On Wed, 12 Jan 2011 19:37:21 +0100, Christophe-Marie Duquesne wrote: > So I am wondering: what is the point of having a tool that is able to > output json and ending in not using it? Is there a solution to make > the json output more useable? One solution I've been thinking about > would be to add

About the json output and the number of results shown.

2011-01-29 Thread Carl Worth
On Thu, 13 Jan 2011 19:46:29 +0100, Christophe-Marie Duquesne wrote: > I've had a look to the python libnotmuch documentation. My problem > with this API is that, unless I did not read it correctly, if I use > one of its functions in a threaded fashion, I still have to wait for > this function to

Re: About the json output and the number of results shown.

2011-01-28 Thread Carl Worth
On Wed, 12 Jan 2011 22:39:45 +, Mike Kelly wrote: > For starters, if I'm simply trying to retrieve a single message, the > interface is rather awkard. I seem to need to do something like: > > my $json = `notmuch show --format=json id:$message_id`; > my $parsed_json = decode_json($json

Re: About the json output and the number of results shown.

2011-01-28 Thread Carl Worth
On Wed, 12 Jan 2011 19:37:21 +0100, Christophe-Marie Duquesne wrote: > So I am wondering: what is the point of having a tool that is able to > output json and ending in not using it? Is there a solution to make > the json output more useable? One solution I've been thinking about > would be to ad

Re: About the json output and the number of results shown.

2011-01-28 Thread Carl Worth
On Thu, 13 Jan 2011 19:46:29 +0100, Christophe-Marie Duquesne wrote: > I've had a look to the python libnotmuch documentation. My problem > with this API is that, unless I did not read it correctly, if I use > one of its functions in a threaded fashion, I still have to wait for > this function to

About the json output and the number of results shown.

2011-01-14 Thread Sebastian Spaeth
On Thu, 13 Jan 2011 19:46:29 +0100, Christophe-Marie Duquesne wrote: > > Alternatively, you could use the python bindings to libnotmuch and call > > the functions directly. You could do that in a unthreaded or threaded > > fashion... > > I've had a look to the python libnotmuch documentation. My

Re: About the json output and the number of results shown.

2011-01-14 Thread Sebastian Spaeth
On Thu, 13 Jan 2011 19:46:29 +0100, Christophe-Marie Duquesne wrote: > > Alternatively, you could use the python bindings to libnotmuch and call > > the functions directly. You could do that in a unthreaded or threaded > > fashion... > > I've had a look to the python libnotmuch documentation. My

About the json output and the number of results shown.

2011-01-13 Thread Christophe-Marie Duquesne
> Alternatively, you could use the python bindings to libnotmuch and call > the functions directly. You could do that in a unthreaded or threaded > fashion... I've had a look to the python libnotmuch documentation. My problem with this API is that, unless I did not read it correctly, if I use one

About the json output and the number of results shown.

2011-01-13 Thread Sebastian Spaeth
On Wed, 12 Jan 2011 19:37:21 +0100, Christophe-Marie Duquesne wrote: > With notmuch, some commands can bring a lot of results, and can take > some time to return. That is why when I began to write a curse > interface to notmuch, I added a mechanism to spawn these commands in > background and gathe

Re: About the json output and the number of results shown.

2011-01-13 Thread Christophe-Marie Duquesne
> Alternatively, you could use the python bindings to libnotmuch and call > the functions directly. You could do that in a unthreaded or threaded > fashion... I've had a look to the python libnotmuch documentation. My problem with this API is that, unless I did not read it correctly, if I use one

Re: About the json output and the number of results shown.

2011-01-13 Thread Sebastian Spaeth
On Wed, 12 Jan 2011 19:37:21 +0100, Christophe-Marie Duquesne wrote: > With notmuch, some commands can bring a lot of results, and can take > some time to return. That is why when I began to write a curse > interface to notmuch, I added a mechanism to spawn these commands in > background and gath

About the json output and the number of results shown.

2011-01-12 Thread Mike Kelly
I've had other problems attempting to use the JSON interface recently. For starters, if I'm simply trying to retrieve a single message, the interface is rather awkard. I seem to need to do something like: my $json = `notmuch show --format=json id:$message_id`; my $parsed_json = decode_json

About the json output and the number of results shown.

2011-01-12 Thread Christophe-Marie Duquesne
Hi, The notmuch command line tool has an option that seems very interesting to me: --output=json In several languages, and especially in python, json is as easy to parse as: >>> res = json.load(stream) If your stream contains valid json, you then get all your data in res and you can immediately u

Re: About the json output and the number of results shown.

2011-01-12 Thread Mike Kelly
I've had other problems attempting to use the JSON interface recently. For starters, if I'm simply trying to retrieve a single message, the interface is rather awkard. I seem to need to do something like: my $json = `notmuch show --format=json id:$message_id`; my $parsed_json = decode_json

About the json output and the number of results shown.

2011-01-12 Thread Christophe-Marie Duquesne
Hi, The notmuch command line tool has an option that seems very interesting to me: --output=json In several languages, and especially in python, json is as easy to parse as: >>> res = json.load(stream) If your stream contains valid json, you then get all your data in res and you can immediately u