From dc6e4181842e2cf13aebc8434deee57b0d25a769 Mon Sep 17 00:00:00 2001 From: p4bl0 Date: Thu, 22 Jul 2010 19:46:59 +0200 Subject: now using xml preprocessor intruction for templating instead of xml comment , thanks a3_nm for the idea --- src/article.html | 21 +++++++++++---------- src/post-commit.sh | 6 +++--- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/article.html b/src/article.html index 3c4eeaa..78cb77f 100644 --- a/src/article.html +++ b/src/article.html @@ -2,13 +2,13 @@ - p4bl0's blog: <!--article_title--> + p4bl0's blog: <?fugitive article_title ?> - + @@ -26,16 +26,17 @@
-

+

- by , on - . + by , on + .
- +
@@ -50,9 +51,9 @@ hosted at berthold's

- last commit was , - at , - . + last commit was , + at , + .

diff --git a/src/post-commit.sh b/src/post-commit.sh index 55c1ef5..a153632 100644 --- a/src/post-commit.sh +++ b/src/post-commit.sh @@ -19,7 +19,7 @@ commit_Hash=`git log -1 --format="%H"` commit_hash=`git log -1 --format="%h"` commit_author=`git log -1 --format="%an"` commit_author_email=`git log -1 --format="%ae" | sed "s/@/[at]/;s/\./(dot)/"` -commit_datetime=`git log -1 --format="%ai" | cut -d' ' -f1,2` +commit_datetime=`git log -1 --format="%ai"` commit_date=`git log -1 --format="%ad" --date="short"` commit_time=`git log -1 --format="%ai" | cut -d' ' -f2` commit_timestamp=`git log -1 --format="%at"` @@ -43,10 +43,10 @@ article_get_content() { } replace_var_by_string() { - sed "s/<\!--$1-->/$2/" + sed "s//$2/" } replace_var_by_file() { - sed "/<\!--$1-->/ { + sed "// { r $2 d }" } -- cgit v1.2.3