diff --git a/src/filters/rclpurple b/src/filters/rclpurple new file mode 100755 index 00000000..2d5803bd --- /dev/null +++ b/src/filters/rclpurple @@ -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 "" + print " " $0 "" + print "" + # Yes there is no such thing as a "date" meta tag. This probably should + # be http-equiv=last-modified or such + printf("\n", date) + print "" + + # 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 " " "
" + } 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("
\n") + } + next +} +# Continuation line: print it +{ + printf("%s
\n", $0) +} +END { + printf("\n") +} +' < $infile + +# exit normally +exit 0 diff --git a/src/qtgui/mtpics/README b/src/qtgui/mtpics/README index 0ab9bece..fa289e52 100644 --- a/src/qtgui/mtpics/README +++ b/src/qtgui/mtpics/README @@ -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) + diff --git a/src/utils/base64.cpp b/src/utils/base64.cpp index d4269767..7fccbac2 100644 --- a/src/utils/base64.cpp +++ b/src/utils/base64.cpp @@ -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(); diff --git a/src/utils/smallut.cpp b/src/utils/smallut.cpp index b109b138..f69f6cfd 100644 --- a/src/utils/smallut.cpp +++ b/src/utils/smallut.cpp @@ -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(), diff --git a/src/utils/smallut.h b/src/utils/smallut.h index 0dedebcf..f9a2ec0c 100644 --- a/src/utils/smallut.h +++ b/src/utils/smallut.h @@ -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 #include #include @@ -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); diff --git a/src/utils/transcode.cpp b/src/utils/transcode.cpp index 8f7ffe2f..ef0446e6 100644 --- a/src/utils/transcode.cpp +++ b/src/utils/transcode.cpp @@ -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) {