*** empty log message ***
authorgc <gc>
Sat, 5 Mar 2005 12:45:56 +0000 (12:45 +0000)
committergc <gc>
Sat, 5 Mar 2005 12:45:56 +0000 (12:45 +0000)
booh
html_merges.rb
themes/simple/skeleton.html

diff --git a/booh b/booh
index deb3ddc7335dfb4d2a1f2ad5d8b7f37876e0a5ea..409effad5e1ad20a0d9c99c350bb7868b2f560a7 100755 (executable)
--- a/booh
+++ b/booh
@@ -123,10 +123,10 @@ def check_installation
     }
 end
 
-def replace_line(prefix, keyword, line)
+def replace_line(surround, keyword, line)
     begin
         contents = eval "$#{keyword}"
-        line.sub!(/#{prefix}#{keyword}/, contents)
+        line.sub!(/#{surround}#{keyword}#{surround}/, contents)
     rescue NameError
         die "No `#{keyword}' found for substitution"
     end
@@ -136,7 +136,7 @@ def build_html_skeleton
     theme_file = File.open("themes/#{$theme}/skeleton.html").readlines
     msg 2, "Read theme `#{$theme}'"
     for line in theme_file
-        while line =~ /~~~(\w+)/
+        while line =~ /~~~(\w+)~~~/
             replace_line('~~~', $1, line)
         end
     end
@@ -174,8 +174,8 @@ def walk_source_dir
         html = $skeleton.collect { |l| l.clone }
         images4js = final_images.collect { |img| "\"#{img}\"" }.join(', ')
         for i in html
-            i.sub!(/~~images/, images4js)
-            i.sub!(/~~title/, File.basename(dir))
+            i.sub!(/~~images~~/, images4js)
+            i.sub!(/~~title~~/, File.basename(dir))
         end
             
         File.open("#{dest_dir}/index.html", "w").write(html)
index 39e1fcbfaecfc6f26365d7af017b16193e387303..a721c90a0eeae6281d492f25e28ad9269c13dbfc 100644 (file)
@@ -24,7 +24,7 @@ $head_code = <<'EOF'
 <link rev="made" href="http://zarb.org/~gc/html/booh.html" />
 <script language="JavaScript1.1" type="text/JavaScript">
 
-var images = new Array(~~images);
+var images = new Array(~~images~~);
 
 var images_ary = new Array();
 var images_loaded = new Array();
index c0bbb349bf5d03620dfa48e7691c781c7b86ae99..774bafb419e7c933f1196eba54493a0ba9756b8b 100644 (file)
@@ -2,41 +2,41 @@
 <html xmlns="http://www.w3.org/1999/xhtml">
 
 <head>
-    <title>~~title</title>
-    ~~~head_code
+    <title>~~title~~</title>
+    ~~~head_code~~~
 </head>
 
-<body bgcolor="#FFFFFF" ~~~body_additions>
+<body bgcolor="#FFFFFF" ~~~body_additions~~~>
 
 <table width="100%">
 <tr>
     <td width="10%"></td>
-    <td width="1%">~~~button_first</td>
+    <td width="1%">~~~button_first~~~</td>
     <td width="3%"></td>
-    <td width="1%">~~~button_previous</td>
+    <td width="1%">~~~button_previous~~~</td>
     <td></td>
-    <td width="1%">~~~button_next</td>
+    <td width="1%">~~~button_next~~~</td>
     <td width="3%"></td>
-    <td width="1%">~~~button_last</td>
+    <td width="1%">~~~button_last~~~</td>
     <td width="10%"></td>
 </tr>
 <tr>
     <td align="center" colspan="9">
-        ~~~image
+        ~~~image~~~
     </td>
 </tr>
 <tr>
     <td align="center" colspan="9">
-    <font size="+1" ~~~caption_additions>&nbsp;</font>
+    <font size="+1" ~~~caption_additions~~~>&nbsp;</font>
     </td>
 </tr>
 </table>
 
-~~~body_code
+~~~body_code~~~
 
 <table width="100%">
 <tr>
-    <td align="center">~~~button_slideshow</td>
+    <td align="center">~~~button_slideshow~~~</td>
 </tr>
 </table>