/[scripts]/trunk/mailman2mbox.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/mailman2mbox.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 6 by dpavlin, Sat Nov 20 16:09:13 2004 UTC revision 78 by dpavlin, Wed May 14 16:22:58 2008 UTC
# Line 6  if [ -z "$1" ] ; then Line 6  if [ -z "$1" ] ; then
6  fi  fi
7    
8  url=$1  url=$1
9    name=`echo $url | sed -e 's!^.*/pipermail/!!' -e 's!/!!g'`
10    
11  wget="-N -nd -nH"  if [ -e $name ] ; then
12            echo "$name allready exists!"
13            exit 1
14    fi
15    
16    wget="-nd -nH"
17    
18    dir=/tmp/$name
19    
20  wget $wget $url  mkdir $dir || exit
21    cd $dir
22    
23  echo -n > mbox  echo "*** download $url to $dir"
24    
25  grep txt.gz index.html  | cut -d\" -f2 | while read file ; do  wget -O index.html $wget $url
26    
27    echo -n > $name
28    
29    grep \.txt index.html  | cut -d\" -f2 | while read file ; do
30          echo "downloading $url/$file"          echo "downloading $url/$file"
31          wget $wget "$url/$file"          wget -N $wget "$url/$file"
32          zcat $file >> mbox          if echo $file | grep '\.gz$' >/dev/null ; then
33                    cat=zcat
34            else
35                    cat=cat
36            fi
37            $cat $file | perl -pe 's/^(From.+?) at (.+)$/$1\@$2/g' >> $name
38  done  done
39    
40    echo "Files left in /tmp/$name/$name"

Legend:
Removed from v.6  
changed lines
  Added in v.78

  ViewVC Help
Powered by ViewVC 1.1.26