Re: combining idata files

"clemensF" <[email protected]>
Newsgroups gmane.mail.ifile.general
Organization no
Message-ID <[email protected]>
> [email protected]:

> Does anyone have a program or script which will allow me to:
> 
> 1) "subtract" completely a folder from the idata file, and
> 2) "add" a folder or folders from another idata file into the main idata
>    file.

not too difficult, but it depends on which type of folder your mailer uses.

lets assume they are what unix called `mbox' in the old ages.  then you
need a utility to split it into single messages, like `formail', which
comes with procmail, or maildrops reformail(1).  then you go like:

  formail -s ifile -d FOLDER < mail/FOLDER

it's still easier with maildir type folders, then it's just:

  ifile -d FOLDER maildir/FOLDER/*

you'd backup your .idata first, i guess ...   :)

adding a complete folder back in is the reverse operation, you would only
use the `-i' option instead of `-d'.  if you want to completely silence the
operation, add the `-v0' option.  if you want to follow the operation closely
and use up much electricity, you'd change that to `-v4' :)

> It would be even nicer if I could combine idata files, adding words where
> necessary and adding frequency counts appropriately, but that may be a bit
> more tricky.

you could do that with a simple editor, but this *is* tricky, as you would
have to keep .idata's format consistent.

you could try something like this:

  echo word | ifile -d FOLDER

to subtract one word from that folder.

note that this is all unix-slang here.

-- 
clemens fischer
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.