*** empty log message ***

This commit is contained in:
dockes 2008-09-15 08:02:28 +00:00
parent 5bf3c9930f
commit 599100a208
6 changed files with 163 additions and 9 deletions

148
src/filters/rclpurple Executable file
View File

@ -0,0 +1,148 @@
#!/bin/sh
# @(#$Id: rclpurple,v 1.1 2008-09-15 08:00:17 dockes Exp $ (C) 2004 J.F.Dockes
# Parts taken from Estraier:
#================================================================
# Estraier: a personal full-text search system
# Copyright (C) 2003-2004 Mikio Hirabayashi
#================================================================
#================================================================
# rclgaim
# Extract text and other information from gaim logs
#
#================================================================
# set variables
LANG=C ; export LANG
LC_ALL=C ; export LC_ALL
progname="rclpurple"
filetype="purple/pidgin log"
#RECFILTCOMMONCODE
##############################################################################
# !! Leave the previous line unmodified!! Code imported from the
# recfiltcommon file
# Utility code common to all shell filters. This could be sourced at run
# time, but it's slightly more efficient to include the code in the
# filters at build time (with a sed script).
# Describe error in a way that can be interpreted by our caller
senderror()
{
echo RECFILTERROR $*
# Also alert on stderr just in case
echo ":2:$progname::: $*" 1>&2
exit 1
}
iscmd()
{
cmd=$1
case $cmd in
*/*)
if test -x $cmd ; then return 0; else return 1; fi ;;
*)
oldifs=$IFS; IFS=":"; set -- $PATH; IFS=$oldifs
for d in $*;do test -x $d/$cmd && return 0;done
return 1 ;;
esac
}
checkcmds()
{
for cmd in $*;do
if iscmd $cmd
then
a=1
else
senderror HELPERNOTFOUND $cmd
fi
done
}
# show help message
if test $# -ne 1 -o "$1" = "--help"
then
echo "Convert a $filetype file to HTML text for Recoll indexing."
echo "Usage: $progname [infile]"
exit 1
fi
infile="$1"
# check the input file existence (may be '-' for stdin)
if test "X$infile" != X- -a ! -f "$infile"
then
senderror INPUTNOSUCHFILE "$infile"
fi
# protect access to our temp files and directories
umask 77
##############################################################################
# !! Leave the following line unmodified !
#ENDRECFILTCOMMONCODE
checkcmds awk iconv
awk '
# First line: parse from, to , output html header
NR == 1 {
if (NF != 13) {
printf("Bad format: (NF %d) %s\n", NF, $0)
exit 1
}
to = $3
from = $12
proto = $13
date = $5 " " $6 " " $7 " " $8 " " $9 " " $10
#printf("from [%s] to [%s] proto [%s] date [%s]\n", from, to, proto, date)
print "<html><head>"
print "<title> " $0 "</title>"
print "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=iso8859-1\">"
# Yes there is no such thing as a "date" meta tag. This probably should
# be http-equiv=last-modified or such
printf("<meta name=\"date\" content=\"%s\">\n", date)
print "</head><body>"
# Remember who the main persons are.
authors[from] = "yes"
authors[to] = "yes"
next
}
# Message first line. We strip from/to and time when indexing
/^\([0-2][0-9]:[0-5][0-9]:[0-5][0-9]\)/ {
if (ENVIRON["RECOLL_FILTER_FORPREVIEW"] == "yes") {
# Preview: output everything
print $0 " " "<br>"
} else {
# Index: output only text, except each new author once
#printf("INDEX: NF %d [%s] [%s] [%s] ", NF, $1, $2, $3);
from = $2
sub(":$", "", from);
if (authors[from] == "") {
authors[from] = "yes"
printf("%s : ", from);
}
for (idx = 3; idx <= NR; idx++) {
printf("%s ", $idx)
}
printf("<br>\n")
}
next
}
# Continuation line: print it
{
printf("%s <br>\n", $0)
}
END {
printf("</body></html>\n")
}
' < $infile
# exit normally
exit 0

View File

@ -1 +1,4 @@
icons thanks to kde crystalsvg
Most icons thanks to kde crystalsvg
The Python icon comes from oxygen (www.oxygen-icons.org) GPL
The Pidgin icon comes from the Pidgin project (GPL)

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: base64.cpp,v 1.8 2008-04-18 11:37:50 dockes Exp $ (C) 2005 J.F.Dockes";
static char rcsid[] = "@(#$Id: base64.cpp,v 1.9 2008-09-15 08:01:42 dockes Exp $ (C) 2005 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -166,10 +166,8 @@ bool base64_decode(const string& in, string& out)
void base64_encode(const string &in, string &out)
{
size_t datalength = 0;
unsigned char input[3];
unsigned char output[4];
size_t i;
out.erase();

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: smallut.cpp,v 1.32 2008-09-08 15:47:12 dockes Exp $ (C) 2004 J.F.Dockes";
static char rcsid[] = "@(#$Id: smallut.cpp,v 1.33 2008-09-15 08:02:03 dockes Exp $ (C) 2004 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -77,7 +77,12 @@ void stringtolower(string& io)
it++;
}
}
string stringtolower(const string& i)
{
string o = i;
stringtolower(o);
return o;
}
extern int stringisuffcmp(const string& s1, const string& s2)
{
string::const_reverse_iterator r1 = s1.rbegin(), re1 = s1.rend(),

View File

@ -16,7 +16,7 @@
*/
#ifndef _SMALLUT_H_INCLUDED_
#define _SMALLUT_H_INCLUDED_
/* @(#$Id: smallut.h,v 1.29 2008-08-30 07:30:55 dockes Exp $ (C) 2004 J.F.Dockes */
/* @(#$Id: smallut.h,v 1.30 2008-09-15 08:02:03 dockes Exp $ (C) 2004 J.F.Dockes */
#include <string>
#include <list>
#include <vector>
@ -34,6 +34,7 @@ extern int stringicmp(const string& s1, const string& s2);
extern int stringlowercmp(const string& alreadylower, const string& s2);
extern int stringuppercmp(const string& alreadyupper, const string& s2);
extern void stringtolower(string& io);
extern string stringtolower(const string& io);
// Is one string the end part of the other ?
extern int stringisuffcmp(const string& s1, const string& s2);

View File

@ -1,5 +1,5 @@
#ifndef lint
static char rcsid[] = "@(#$Id: transcode.cpp,v 1.11 2007-06-19 07:52:33 dockes Exp $ (C) 2004 J.F.Dockes";
static char rcsid[] = "@(#$Id: transcode.cpp,v 1.12 2008-09-15 08:01:29 dockes Exp $ (C) 2004 J.F.Dockes";
#endif
/*
* This program is free software; you can redistribute it and/or modify
@ -65,7 +65,6 @@ bool transcode(const string &in, string &out, const string &icode,
size_t osiz;
op = obuf;
osiz = OBSIZ;
int isiz0=isiz;
if(iconv(ic, (ICV_P2_TYPE)&ip, &isiz, &op, &osiz) == (size_t)-1 &&
errno != E2BIG) {