summaryrefslogtreecommitdiff
path: root/apps/blagh/app.rc
diff options
context:
space:
mode:
authorGravatar Jeremiah Dow <jeremdow@gmail.com> 2011-03-17 21:35:20 -0400
committerGravatar Jeremiah Dow <jeremdow@gmail.com> 2011-03-17 21:35:20 -0400
commit6f3401ebd4d8d2f7d138738f60ecbc376c8d3258 (patch)
tree21cd0aade80e9a6e482136d957144b26ed243d7c /apps/blagh/app.rc
parent7d6190d3be0074a70b97ec49cf2b50ed37054017 (diff)
downloadjeremdow.us-6f3401ebd4d8d2f7d138738f60ecbc376c8d3258.tar.gz
fix rss/atom
Diffstat (limited to 'apps/blagh/app.rc')
-rw-r--r--apps/blagh/app.rc25
1 files changed, 15 insertions, 10 deletions
diff --git a/apps/blagh/app.rc b/apps/blagh/app.rc
index f414bc0..7c74dc1 100644
--- a/apps/blagh/app.rc
+++ b/apps/blagh/app.rc
@@ -92,20 +92,25 @@ fn get_post_list {
}
fn req_path_date {
- year=`{echo $req_path | awk -F'/' '{print $2}'}
- month=`{echo $req_path | awk -F'/' '{print $3}'}
- day =`{echo $req_path | awk -F'/' '{print $4}'}
+ if(~ $req_path *.rss *.atom) {
+ echo [0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]
+ }
+ if not {
+ year=`{echo $req_path | awk -F'/' '{print $2}'}
+ month=`{echo $req_path | awk -F'/' '{print $3}'}
+ day =`{echo $req_path | awk -F'/' '{print $4}'}
- if(~ $year '')
- year='[0-9][0-9][0-9][0-9]'
+ if(~ $year '')
+ year='[0-9][0-9][0-9][0-9]'
- if(~ $month '')
- month='[0-9][0-9]'
+ if(~ $month '')
+ month='[0-9][0-9]'
- if(~ $day '')
- day='[0-9][0-9]'
+ if(~ $day '')
+ day='[0-9][0-9]'
- echo $year/$month/$day
+ echo $year/$month/$day
+ }
}
fn mkbpost {