Author: glondu-guest
Date: Sat Feb 28 23:05:26 2009
New Revision: 6293

URL: http://svn.debian.org/wsvn/?sc=1&rev=6293
Log:
Rename ocaml-status.css to ocaml_transition_monitor.css (+cosmetic)

Added:
    trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.css   (props 
changed)
      - copied unchanged from r6292, 
trunk/tools/ocaml_transition_monitor/ocaml-status.css
Removed:
    trunk/tools/ocaml_transition_monitor/ocaml-status.css
Modified:
    trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.mll

Propchange: trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.css
------------------------------------------------------------------------------
    svn:mergeinfo = 

Modified: trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.mll
URL: 
http://svn.debian.org/wsvn/trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.mll?rev=6293&op=diff
==============================================================================
--- trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.mll (original)
+++ trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.mll Sat Feb 
28 23:05:26 2009
@@ -15,6 +15,11 @@
   let mirror = "http://ftp.fr.debian.org/debian";
   let suite = "unstable"
   let section = "main"
+
+  (** Basename of all files handled by this script *)
+  let basename = "ocaml_transition_monitor"
+
+  let src_webbrowse_url = 
"http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.mll?op=file&rev=0&sc=0";
 
   let architectures =
     [ "alpha"; "amd64"; "armel"; "hppa"; "i386"; "ia64"; "mips"; "mipsel"; 
"powerpc"; "s390"; "sparc" ]
@@ -300,14 +305,14 @@
 
   let main () =
     let (sources_map, binaries) =
+      let cache = basename^".cache" in
       if !use_cache then begin
         progress "Loading cache...%!";
-        let r =  with_in_file "ocaml_transition_monitor.cache" 
Marshal.from_channel in
+        let r =  with_in_file cache Marshal.from_channel in
         progress "\n%!"; r
       end else begin
         let x = (get_sources (), List.map get_binaries architectures) in
-        with_out_file "ocaml_transition_monitor.cache"
-          (fun chan -> Marshal.to_channel chan x []);
+        with_out_file cache (fun chan -> Marshal.to_channel chan x []);
         x
       end
     in
@@ -327,18 +332,18 @@
     let format_section_body section = List.map
       (fun (pkg, status) -> tr
          (td ~a:[a_class [(class_of_status (source_status status))^" src"]; 
a_id pkg]
-            [a ~a:[a_href (uri_of_string 
("http://packages.qa.debian.org/"^pkg))] [pcdata pkg];
-            small [pcdata " [ ";
-                    a ~a:[a_href (uri_of_string 
("http://buildd.debian.org/~luk/status/package.php?p="^pkg))]
-                      [pcdata "buildd"];
+            [a_link ("http://packages.qa.debian.org/"^pkg) pkg;
+             small [pcdata " [ ";
+                    a_link 
("http://buildd.debian.org/~luk/status/package.php?p="^pkg) "buildd";
                     pcdata " ] "
                    ];
-            small [
-              pcdata " ( ";
-              a ~a:[a_href (uri_of_string 
("http://packages.debian.org/changelogs/pool/main/"^(String.sub pkg 0 
1)^"/"^pkg^"/current/changelog"))]
-                [pcdata (sprintf "%s" ((M.find pkg sources_map).sversion))];
-              pcdata " ) ";
-            ];
+             small [
+               pcdata " ( ";
+               a_link
+                 (sprintf 
"http://packages.debian.org/changelogs/pool/main/%c/%s/current/changelog"; 
pkg.[0] pkg)
+                 (M.find pkg sources_map).sversion;
+               pcdata " ) ";
+             ];
             ])
          (List.map (fun x ->
                      let x = class_of_status x and xx = string_of_status x
@@ -365,11 +370,9 @@
          pcdata "Contact: ";
          a_link "mailto:st...@glondu.net"; "Stéphane Glondu";
          pcdata "; the code that generates this page ";
-         a_link
-           
"http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/tools/ocaml_transition_monitor/ocaml_transition_monitor.mll?op=file&rev=0&sc=0";
-           "is available";
+         a_link src_webbrowse_url "is available";
          pcdata "."; br ();
-         pcdata "This page has been type-check by OCaml using ";
+         pcdata "This page has been type-checked by OCaml using ";
          a_link "http://ocsigen.org/docu/1.1.0/XHTML.M.html"; "XHTML.M";
          pcdata " and should be ";
          a_link "http://validator.w3.org/check?uri=referer"; "XHTML Valid";
@@ -380,9 +383,9 @@
         ]] in
     let html = html ~a:[a_xmlns `W3_org_1999_xhtml]
       (head (title (pcdata page_title))
-         [link ~a:[a_rel [`Stylesheet]; a_href (uri_of_string 
"ocaml-status.css")] ();
+         [link ~a:[a_rel [`Stylesheet]; a_href (uri_of_string 
(basename^".css"))] ();
           script ~contenttype:"text/javascript" ~a:[a_src (uri_of_string 
"http://code.jquery.com/jquery-latest.js";)] (pcdata "");
-          script ~contenttype:"text/javascript" ~a:[a_src (uri_of_string 
"ocaml_transition_monitor.js")] (pcdata "");
+          script ~contenttype:"text/javascript" ~a:[a_src (uri_of_string 
(basename^".js"))] (pcdata "");
          meta ~content:"text/html;charset=utf-8" ~a:[a_http_equiv 
"Content-Type"] ();
          ])
       (body [h1 [pcdata page_title];
@@ -408,7 +411,7 @@
              div ~a:[a_class ["status"]] [summary];
              div ~a:[a_class ["footer"]] footer])
     in
-    with_out_file "ocaml_transition_monitor.html"
+    with_out_file (basename^".html")
       (fun chan -> pretty_print (fun s -> fprintf chan "%s%!" s) html)
 
   let _ =


_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to