summaryrefslogtreecommitdiffstats
path: root/blog/builddb.pl
diff options
context:
space:
mode:
authorbbs <bbs@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-05-23 22:52:44 +0800
committerbbs <bbs@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-05-23 22:52:44 +0800
commit3fb9e64c9fc04eb949b7319012a8d92c9af13573 (patch)
tree00171a7da5dace400d054cbb88738dd9682b068e /blog/builddb.pl
parent455ad22bfea540a4f7493c0126eb0d5032412050 (diff)
downloadpttbbs-3fb9e64c9fc04eb949b7319012a8d92c9af13573.tar
pttbbs-3fb9e64c9fc04eb949b7319012a8d92c9af13573.tar.gz
pttbbs-3fb9e64c9fc04eb949b7319012a8d92c9af13573.tar.bz2
pttbbs-3fb9e64c9fc04eb949b7319012a8d92c9af13573.tar.lz
pttbbs-3fb9e64c9fc04eb949b7319012a8d92c9af13573.tar.xz
pttbbs-3fb9e64c9fc04eb949b7319012a8d92c9af13573.tar.zst
pttbbs-3fb9e64c9fc04eb949b7319012a8d92c9af13573.zip
build short
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@893 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'blog/builddb.pl')
-rwxr-xr-xblog/builddb.pl8
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'} );