tAdd rpo:// URIs to the news template. - rohrpost - A commandline mail client to change the world as we see it.
 (HTM) git clone git://r-36.net/rohrpost
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) LICENSE
       ---
 (DIR) commit a7298da94f108fb84172b99f66631b92139aee8a
 (DIR) parent a6963a776475852f96f9e579bff9223b4779d380
 (HTM) Author: Christoph Lohmann <20h@r-36.net>
       Date:   Wed, 26 Nov 2014 19:31:25 +0100
       
       Add rpo:// URIs to the news template.
       
       Diffstat:
         tmpl/news.sh                        |      16 +++++++++++++---
       
       1 file changed, 13 insertions(+), 3 deletions(-)
       ---
 (DIR) diff --git a/tmpl/news.sh b/tmpl/news.sh
       t@@ -12,6 +12,16 @@ scols=$(($cols - $flen))
        
        first=1
        
       +cfgname="$(rpcfg -n)"
       +if [ "$cfgname" = "default" ];
       +then
       +        # shorten the URI
       +        cfgname=""
       +fi
       +
       +mailboxname="$(rpsel)"
       +baseuri="rpo:/${cfgname}/${mailboxname}/"
       +
        while read -r line;
        do
                id=$(echo -n "$line" | cut -f 1 | head -c 8)
       t@@ -20,11 +30,11 @@ do
        
                if [ $first -eq 1 ];
                then
       -                printf "${titleformat}%8s  %10s  %s\n" "$id" "$date" \
       -                        "$subject"
       +                #printf "${titleformat}%8s  %10s  %s\n" "$id" "$date" \
       +                #        "$subject"
                        first=0
                else
       -                printf "${idformat}%8s${reset}  " "$id"
       +                printf "${idformat}%8s${reset}  " "${baseuri}$id"
                        printf "${dateformat}%10s${reset}  " "$date"
                        slen=$(utf8expr length "$subject")
                        if [ $scols -lt 1 ] || [ $scols -gt $slen ];