[abunchoftags] überalpha: sync X-Keywords with notmuch tags

Gaute Hope eg at gaute.vetsj.com
Sun Nov 2 06:55:19 PST 2014


hi,

there has been a lot of discussion about getting gmail label syncing
with notmuch tags over time. one approach is to use the X-Keywords header that
offlineimap now supports (kept in sync with GMail labels). I believe this
was originally developed by an at the time notmuch user.

I haven't found any script or program that completes the link with the
notmuch tags so I've set up a _very_ _experimental_ program that does
this sync. It checks mtimes of files so that it only syncs files that
have been changed (and detects files that notmuch new does not).

It has not been in use much yet, but if anyone is interested it is
located here:

  https://github.com/gauteh/abunchoftags

have a look at the README.md. Including a small section on some of the
pitfalls you might encounter because of the way I prefer to have things
or because of logical mistakes that I may have made. Otherwise refer to
the source code.

At the end is a proposed way of doing a full sync as well as an example
fetch_and_sync.sh script in the examples folder.

Please don't use uncritically - it may definitely eat all your mail!
This approach depends on _modifying_ and rewriting your email
(tag-to-keyword sync, not the other way around).

Hope it may be useful to someone, this is not a release of a finished
program - but there will probably never be such a thing. It works for
me, but doesn't necessarily for you.

The examples depend on the lastmod patches [0].

Some rudimentary performance stats: 

  Running a full keyword-to-tag sync on a Macbook Pro with around 55k
  messages on an encfs volume took 1m48s and used about 108MB of memory.

  Running a full tag-to-keyword check on the same message base with 3
  changed messages took about 1m5s and 100MB of memory.

  The subsequent scans of only changed files takes very little time.

Cheers, Gaute

[0] id:1413181203-1676-1-git-send-email-aclements at csail.mit.edu



More information about the notmuch mailing list