summaryrefslogtreecommitdiff
path: root/apps/blagh/app.rc
diff options
context:
space:
mode:
authorGravatar Jeremiah Dow <jeremdow@gmail.com> 2012-05-11 21:16:28 -0400
committerGravatar Jeremiah Dow <jeremdow@gmail.com> 2012-05-11 21:16:28 -0400
commite6a307e8bfb22290239a0d672b369da9c923af45 (patch)
treea1552003bfb51242f598686eac40267696d120b5 /apps/blagh/app.rc
parent093e336c982cb8d6d04061315694b8d112487523 (diff)
downloadjeremdow.us-e6a307e8bfb22290239a0d672b369da9c923af45.tar.gz
rearranging site
Diffstat (limited to 'apps/blagh/app.rc')
-rw-r--r--apps/blagh/app.rc19
1 files changed, 12 insertions, 7 deletions
diff --git a/apps/blagh/app.rc b/apps/blagh/app.rc
index aa9b57a..c90dd60 100644
--- a/apps/blagh/app.rc
+++ b/apps/blagh/app.rc
@@ -32,7 +32,7 @@ fn blagh_init {
ll_add handlers_bar_left echo '<a href="'$blagh_uri'new_post">Make a new post</a>'
}
- if(~ $req_path $blagh_uri /[0-9][0-9][0-9][0-9]/ /*/[0-9][0-9]/ /*/*/[0-9][0-9]/) {
+ if(~ $req_path $blagh_uri */[0-9][0-9][0-9][0-9]/ */*/[0-9][0-9]/ */*/*/[0-9][0-9]/) {
handler_body_main=blagh_body
u=$blagh_uri'index'
extraHeaders=$"extraHeaders ^ \
@@ -90,13 +90,18 @@ fn get_post_list {
}
fn req_path_date {
+ if (! ~ $blagh_uri '/')
+ date_path=`{echo $req_path | sed 's/\'$blagh_uri'/'}
+ if not
+ date_path=$req_path
+
switch($req_path){
- case /[0-9][0-9][0-9][0-9]/
- echo $req_path[0-9][0-9]/[0-9][0-9]/
- case /[0-9][0-9][0-9][0-9]/[0-9][0-9]/
- echo $req_path[0-9][0-9]/
- case /[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/
- echo $req_path
+ case */[0-9][0-9][0-9][0-9]/
+ echo $date_path[0-9][0-9]/[0-9][0-9]/
+ case */[0-9][0-9][0-9][0-9]/[0-9][0-9]/
+ echo $date_path[0-9][0-9]/
+ case */[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/
+ echo $date_path
case *
echo /[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]/
}