[DRE-commits] r1348 - in website: plugin src

Arnaud Cornet nohar-guest at alioth.debian.org
Sat Apr 7 14:26:47 UTC 2007


Author: nohar-guest
Date: 2007-04-07 14:26:47 +0000 (Sat, 07 Apr 2007)
New Revision: 1348

Added:
   website/plugin/fileadate.rb
   website/plugin/filecdate.rb
   website/plugin/filemdate.rb
Removed:
   website/plugin/stat.rb
Modified:
   website/src/default.template
Log:
Update the site to webgen0.4.

Added: website/plugin/fileadate.rb
===================================================================
--- website/plugin/fileadate.rb	2007-04-07 10:01:19 UTC (rev 1347)
+++ website/plugin/fileadate.rb	2007-04-07 14:26:47 UTC (rev 1348)
@@ -0,0 +1,20 @@
+# This webgen plugin extends the available tags with tags that can retrieve
+# stat(2) information.
+#
+# Copyright (2006) Paul van Tilburg <paulvt at debian.org>
+
+# This plugin is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+class FileADateTag < Tags::DefaultTag
+  infos( :name => 'Custom/FileADate', :author => 'Paul van Tilburg',
+        :summary => "Puts the access time and date of the file on the page")
+
+  register_tag 'fileatime'
+
+  def process_tag(tag, chain)
+    return File.atime( chain.last.node_info[:src] ).to_s
+  end
+end # class FileADateTag

Added: website/plugin/filecdate.rb
===================================================================
--- website/plugin/filecdate.rb	2007-04-07 10:01:19 UTC (rev 1347)
+++ website/plugin/filecdate.rb	2007-04-07 14:26:47 UTC (rev 1348)
@@ -0,0 +1,20 @@
+# This webgen plugin extends the available tags with tags that can retrieve
+# stat(2) information.
+#
+# Copyright (2006) Paul van Tilburg <paulvt at debian.org>
+
+# This plugin is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+class FileCDateTag < Tags::DefaultTag
+  infos( :name => 'Custom/FileCDate', :author => 'Paul van Tilburg',
+         :summary => "Puts the create time and date of the file on the page" )
+
+  register_tag 'filecatime'
+
+  def process_tag(tag, chain)
+    return File.ctime( chain.last.node_info[:src] ).to_s
+  end
+end # class FileCDateTag

Added: website/plugin/filemdate.rb
===================================================================
--- website/plugin/filemdate.rb	2007-04-07 10:01:19 UTC (rev 1347)
+++ website/plugin/filemdate.rb	2007-04-07 14:26:47 UTC (rev 1348)
@@ -0,0 +1,22 @@
+# This webgen plugin extends the available tags with tags that can retrieve
+# stat(2) information.
+#
+# Copyright (2006) Paul van Tilburg <paulvt at debian.org>
+
+# This plugin is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by the
+# Free Software Foundation; either version 2 of the License, or (at your
+# option) any later version.
+
+class FileMDateTag < Tags::DefaultTag
+  infos( :name => "Custom/FileMdate", :author => 'Paul van Tilburg',
+         :summary =>
+         "Puts the modification time and date of the file on the page" )
+
+  register_tag 'filemtime'
+
+  def process_tag(tag, chain)
+    return File.mtime( chain.last.node_info[:src] ).to_s
+  end
+
+end # class FileMDateTag

Deleted: website/plugin/stat.rb
===================================================================
--- website/plugin/stat.rb	2007-04-07 10:01:19 UTC (rev 1347)
+++ website/plugin/stat.rb	2007-04-07 14:26:47 UTC (rev 1348)
@@ -1,60 +0,0 @@
-# This webgen plugin extends the available tags with tags that can retrieve
-# stat(2) information.
-#
-# Copyright (2006) Paul van Tilburg <paulvt at debian.org>
-
-# This plugin is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 2 of the License, or (at your
-# option) any later version.
-
-require 'webgen/plugins/tags/tags'
-
-module Tags
-
-  class FileADateTag < DefaultTag
-
-    summary "Puts the access time and date of the file on the page" 
-    add_param 'format', '%A, %B %d %H:%M:%S %Z %Y', 
-              'The format of the date (same options as Time#strftime).'
-    depends_on 'Tags'
-    tag 'fileatime'
-
-    def process_tag(tag, node, refNode)
-      atime = File.stat(node.recursive_value('src')).atime
-      return atime.strftime(get_param('format'))
-    end
-
-  end # class FileADateTag
-
-  class FileCDateTag < DefaultTag
-
-    summary "Puts the create time and date of the file on the page" 
-    add_param 'format', '%A, %B %d %H:%M:%S %Z %Y', 
-              'The format of the date (same options as Time#strftime).'
-    depends_on 'Tags'
-    tag 'filcatime'
-
-    def process_tag(tag, node, refNode)
-      atime = File.stat(node.recursive_value('src')).ctime
-      return ctime.strftime(get_param('format'))
-    end
-
-  end # class FileCDateTag
-
-  class FileMDateTag < DefaultTag
-
-    summary "Puts the modification time and date of the file on the page" 
-    add_param 'format', '%A, %B %d %H:%M:%S %Z %Y', 
-              'The format of the date (same options as Time#strftime).'
-    depends_on 'Tags'
-    tag 'filemtime'
-
-    def process_tag(tag, node, refNode)
-      mtime = File.stat(node.recursive_value('src')).mtime
-      return mtime.strftime(get_param('format'))
-    end
-
-  end # class FileMDateTag
-
-end

Modified: website/src/default.template
===================================================================
--- website/src/default.template	2007-04-07 10:01:19 UTC (rev 1347)
+++ website/src/default.template	2007-04-07 14:26:47 UTC (rev 1348)
@@ -1,3 +1,4 @@
+--- content, html
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang:}">
@@ -21,11 +22,11 @@
       </div>
 
       <div id="menu">
-        {menu: }
+	      {menu: {menuStyle: vertical}}
       </div>
 
       <div id="body">
-        {content: }
+        {block: }
       </div>
 
       <div id="footer" class="bar">




More information about the Pkg-ruby-extras-commits mailing list