Mercurial > blahgd
changeset 29:f36a71506ef9
remove old shell implementation of index and story
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> |
---|---|
date | Thu, 05 Feb 2009 16:29:29 -0500 |
parents | b49d82726a99 |
children | 34b068e2fc0f |
files | index.cgi story.cgi |
diffstat | 2 files changed, 0 insertions(+), 98 deletions(-) [+] |
line wrap: on
line diff
--- a/index.cgi Thu Feb 05 16:26:05 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -#!/bin/sh - -. common-head.sh - -########################## - -cat templates/header.html | sed -e 's|@@TITLE@@|Blahg|' - -cnt=0 - -for postid in `ls data/posts/ | sort -rn` ; do - cnt=$(($cnt + 1)) - [ $cnt -gt 10 ] && break - - fn="data/posts/$postid/" - - cat templates/story-top.html | sed -e " -s|@@POSTID@@|`basename $postid`|g -s|@@POSTDATE@@|`get_date "$fn"`|g -s|@@TITLE@@|`get_xattr post_title "$fn"`|g -" - - for catname in `get_xattr post_cats "$fn" | sed -e 's|,| |g'` ; do - cat templates/story-cat-item.html | sed -e " -s|@@CATNAME@@|$catname|g - " - done - - cat templates/story-middle.html | sed -e " -s|@@POSTTIME@@|`get_time "$fn"`|g - " - - cat_post "$fn/post.txt" - - cat templates/story-bottom.html -done - -########################## - -. common-foot.sh
--- a/story.cgi Thu Feb 05 16:26:05 2009 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -#!/bin/sh - -. common-head.sh - -########################## - -postid=`echo "$PATH_INFO" | sed -e 's,^/,,'` - -fn="data/posts/$postid/" - -title=`get_xattr post_title "$fn"` -postdate=`get_date "$fn"` -posttime=`get_time "$fn"` - -( -cat templates/header.html -cat templates/story-top.html -) | sed -e " -s|@@POSTID@@|$postid|g -s|@@POSTDATE@@|$postdate|g -s|@@TITLE@@|$title|g -" - -for catname in `get_xattr post_cats "$fn" | sed -e 's|,| |g'` ; do - cat templates/story-cat-item.html | sed -e " -s|@@CATNAME@@|$catname|g -" -done - -cat templates/story-middle.html | sed -e " -s|@@POSTTIME@@|$posttime|g -" - -cat_post "$fn/post.txt" - -cat templates/story-bottom.html -cat templates/story-comment-head.html | sed -e " -s|@@COMCOUNT@@|`ls data/posts/$postid/comments/|wc -l`|g -" - -for cmtid in `ls data/posts/$postid/comments | sort -n`; do - cat templates/story-comment-item-head.html | sed -e " -s|@@COMID@@|$cmtid|g -" - cat_post "data/posts/$postid/comments/$cmtid/text.txt" - cat templates/story-comment-item-tail.html | sed -e " -s|@@COMID@@|$cmtid|g -s|@@COMAUTHOR@@|`get_xattr author data/posts/$postid/comments/$cmtid/`|g -s|@@COMDATE@@|`get_date data/posts/$postid/comments/$cmtid/`|g -s|@@COMTIME@@|`get_time data/posts/$postid/comments/$cmtid/`|g -" -done - -cat templates/story-comment-tail.html - -########################## - -. common-foot.sh