diff options
Diffstat (limited to 'blog')
-rwxr-xr-x | blog/builddb.pl | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/blog/builddb.pl b/blog/builddb.pl index 18660e48..66b3ad3b 100755 --- a/blog/builddb.pl +++ b/blog/builddb.pl @@ -96,8 +96,14 @@ sub builddata($$$) else{ $dat{ sprintf('%04d%02d', $y, $m) } = 1; $dat{"$currid.title"} = $t; - $dat{"$currid.content"} = $rbh->{"$_.content"}; $dat{"$currid.author"} = $rbh->{"$_.owner"}; + # $dat{"$currid.content"} = $rbh->{"$_.content"}; + # ugly code for making short + my @c = split("\n", + $dat{"$currid.content"} = $rbh->{"$_.content"}); + $dat{"$currid.short"} = ("$c[0]\n$c[1]\n$c[2]\n". + $c[3] ? '....' : ''); + $dat{"$currid.prev"} = $dat{'last'}; $dat{"$dat{last}.next"} = $currid if( $dat{'last'} ); |