ADD FIX#3
authorGreg Burri <greg.burri@gmail.com>
Sun, 3 Aug 2008 18:10:51 +0000 (18:10 +0000)
committerGreg Burri <greg.burri@gmail.com>
Sun, 3 Aug 2008 18:10:51 +0000 (18:10 +0000)
doc/graphiques/maquette_1.svg
nbproject/private/private.xml
pages/about.html
tools/tools.rb

index 6bc4f07..f1491a1 100644 (file)
        id="path2542"
        sodipodi:nodetypes="cc" />
     <image
        id="path2542"
        sodipodi:nodetypes="cc" />
     <image
-       y="235.1068"
-       x="532.7345"
+       y="178.13184"
+       x="524.82129"
        id="image2612"
        height="16"
        width="16"
        id="image2612"
        height="16"
        width="16"
index ea8bdaf..add2b74 100644 (file)
@@ -3,7 +3,7 @@
     <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1">
         <file>
             <url>modules/erl/euphorik_protocole.erl</url>
     <editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/1">
         <file>
             <url>modules/erl/euphorik_protocole.erl</url>
-            <line>713</line>
+            <line>722</line>
         </file>
         <file>
             <url>js/pageMinichat.js</url>
         </file>
         <file>
             <url>js/pageMinichat.js</url>
index fff8eee..e42dace 100644 (file)
@@ -1,7 +1,7 @@
 <!-- encoding: utf-8 -->\r
 \r
 <h1>euphorik.ch</h1>\r
 <!-- encoding: utf-8 -->\r
 \r
 <h1>euphorik.ch</h1>\r
-<p>Version : 1.1a</p>\r
+<p>Version : <span class="version">1.1.0a</span></p>\r
 <p>Auteur : <a href="{EMAIL_LIEN}">Pifou</a></p>\r
 \r
 <h2>FAQ</h2>\r
 <p>Auteur : <a href="{EMAIL_LIEN}">Pifou</a></p>\r
 \r
 <h2>FAQ</h2>\r
index 2a5a1fe..ec0950e 100644 (file)
@@ -1,5 +1,5 @@
 #!/usr/bin/ruby\r
 #!/usr/bin/ruby\r
-# coding: utf8\r
+# coding: utf-8\r
 =begin\r
 Copyright 2008 Grégory Burri\r
 \r
 =begin\r
 Copyright 2008 Grégory Burri\r
 \r
@@ -52,6 +52,33 @@ class VerifJS
       }\r
       return true\r
    end\r
       }\r
       return true\r
    end\r
+end
+
+# Classe de gestion de la version
+class Version    
+   # @param dossier la racine du site (par exemple "/var/www/euphorik"
+   def initialize(dossier)
+      @dossier = dossier
+      File.open(@dossier + '/VERSION') {|file|
+         @version = file.readline()
+      }
+      # les fichiers HTML dans lesquels mettre à jour la version
+      @fichiers  = ['/pages/about.html']
+      @balise = /(<span.+?class.*?=.*?"version".*?>).*?(<\/span>)/
+   end
+   
+   # met à jour la version dans les fichiers @fichiers
+   def  maj   
+      @fichiers.each{|fichier|
+         fichier = @dossier + fichier
+         lines = IO.readlines(fichier)
+         File.open(fichier, 'w') {|io|
+            lines.each{|l|
+               io.write(l.sub(@balise){|m| $1 + @version + $2})
+            }
+         }   
+      }
+   end
 end\r
 \r
 \r
 end\r
 \r
 \r
@@ -130,5 +157,8 @@ class MiseEnProd
 end\r
 \r
 \r
 end\r
 \r
 \r
-v = VerifJS.new("../js")\r
-v.verifier()
\ No newline at end of file
+#verifJS = VerifJS.new("../js")\r
+#verifJS.verifier()
+
+#version = Version.new("..")
+#version.maj()