Archive of RubyForge sup-devel mailing list
 help / color / mirror / Atom feed
From: Horacio Sanson <hsanson@gmail.com>
To: Sup developer discussion <sup-devel@rubyforge.org>
Subject: Re: [sup-devel] Cannot query Japanese characters
Date: Thu, 9 Jun 2011 22:48:23 +0900	[thread overview]
Message-ID: <BANLkTim6_vC3K+ZcrTPgLnckYPRLxG9zOQ@mail.gmail.com> (raw)
In-Reply-To: <1307509658-sup-6995@masanjin.net>

[-- Attachment #1: Type: text/plain, Size: 1959 bytes --]

On Wed, Jun 8, 2011 at 2:21 PM, William Morgan <wmorgan-sup@masanjin.net> wrote:
> Reformatted excerpts from Horacio Sanson's message of 2011-05-06:
>> Great, let me know when you have the modifications so I can stress
>> test them.
>
> In the most recent version of Heliotrope, there are two hooks you can
> use to do this: transform-text and transform-query. To use them, place
> your Ruby code in files called <store dir>/hooks/<hook-name>.rb.
>
> For transform-text, place your code in <store dir>/hooks/transform-text.rb
> This hook will be called on any text added to the index. The 'text'
> variable will contain the text, and the hook should return (i.e. the
> last command should evaluate to) the transformed text.
>
> Example:
>  $ cat store/hooks/transform-text.rb
>  require 'MeCab'
>  MeCab::Tagger.new("-Owakati").parse(text).gsub(/\s+/, " ")
>
> For transform-query, place your code in <store
>  dir>/hooks/transform-query.rb. This hook will be called on any query
> before it is executed. The 'query' variable will contain the query
> string, and the hook should return (i.e. the last command should
> evaluate to) the transformed query.
>
> Example:
>  $ cat store/hooks/transform-query.rb
>  require 'MeCab'
>  MeCab::Tagger.new("-Owakati").parse(query).gsub(/\s+/, " ")
>
> Let me know if you have any problems with these hooks!

Great I am downloading my gmail accounts now (again). I can see you
have improved the imap-dumper.rb to handle uidvalidity and uidnext
that is also great. In the git log says gmail labels are also copied
to heliotrope but I don't see them in my index.

BTW there are two small bugs in the imap-dumper.rb, see attached patch
for details.

regards,
Horacio

> --
> William <wmorgan-sup@masanjin.net>
> _______________________________________________
> Sup-devel mailing list
> Sup-devel@rubyforge.org
> http://rubyforge.org/mailman/listinfo/sup-devel
>

gmail

[-- Attachment #2: 0001-Fix-imap-dumper.patch --]
[-- Type: text/x-patch, Size: 1034 bytes --]

From 4bf24f16612c954bbbdcdb9b48a70571c3bb1a4d Mon Sep 17 00:00:00 2001
From: Horacio Sanson <hsanson@gmail.com>
Date: Thu, 9 Jun 2011 22:39:39 +0900
Subject: [PATCH] Fix imap-dumper.

---
 lib/heliotrope/imap-dumper.rb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/heliotrope/imap-dumper.rb b/lib/heliotrope/imap-dumper.rb
index 5a96960..e5dcc1b 100644
--- a/lib/heliotrope/imap-dumper.rb
+++ b/lib/heliotrope/imap-dumper.rb
@@ -3,7 +3,7 @@ require "net/imap"
 require 'json'
 
 module Heliotrope
-class ImapDumper
+class IMAPDumper
   def initialize opts
     @host = opts[:host] or raise ArgumentError, "need :host"
     @username = opts[:username] or raise ArgumentError, "need :username"
@@ -11,7 +11,7 @@ class ImapDumper
     @fn = opts[:fn] or raise ArgumentError, "need :fn"
 
     @ssl = opts.member?(:ssl) ? opts[:ssl] : true
-    @port = opts[:port] || (ssl ? 993 : 143)
+    @port = opts[:port] || (@ssl ? 993 : 143)
     @folder = opts[:folder] || "inbox"
 
     @msgs = []
-- 
1.7.4.1


[-- Attachment #3: Type: text/plain, Size: 143 bytes --]

_______________________________________________
Sup-devel mailing list
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel

  reply	other threads:[~2011-06-09 15:09 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-25  1:23 Horacio Sanson
2011-04-26  4:49 ` William Morgan
2011-04-29  4:52   ` William Morgan
2011-05-01 15:35     ` Horacio Sanson
2011-05-01 15:46       ` Horacio Sanson
2011-05-03 14:24         ` Horacio Sanson
2011-05-03 22:26           ` William Morgan
2011-05-04  1:42             ` Horacio Sanson
2011-05-04  2:03               ` Horacio Sanson
2011-05-04 16:56               ` William Morgan
2011-05-06  3:30                 ` Horacio Sanson
2011-06-08  5:21                   ` William Morgan
2011-06-09 13:48                     ` Horacio Sanson [this message]
2011-06-09 14:08                       ` Horacio Sanson
2011-06-09 22:46                       ` William Morgan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=BANLkTim6_vC3K+ZcrTPgLnckYPRLxG9zOQ@mail.gmail.com \
    --to=hsanson@gmail.com \
    --cc=sup-devel@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox