qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kw...@apache.org
Subject svn commit: r1574220 - in /qpid/site: python/transom/script.py scripts/gen-release-books
Date Tue, 04 Mar 2014 22:00:01 GMT
Author: kwall
Date: Tue Mar  4 22:00:01 2014
New Revision: 1574220

URL: http://svn.apache.org/r1574220
Log:
QPID-5593: Change site generation scripts to support the new jms_client08 book

Modified:
    qpid/site/python/transom/script.py
    qpid/site/scripts/gen-release-books

Modified: qpid/site/python/transom/script.py
URL: http://svn.apache.org/viewvc/qpid/site/python/transom/script.py?rev=1574220&r1=1574219&r2=1574220&view=diff
==============================================================================
--- qpid/site/python/transom/script.py (original)
+++ qpid/site/python/transom/script.py Tue Mar  4 22:00:01 2014
@@ -143,6 +143,10 @@ def copy(from_path, to_path):
     else:
         shutil.copy(from_path, to_path)
 
+def directory_exists(path):
+    """Returns true iff the path exists and is a directory"""
+    return is_dir(path)
+
 move = shutil.move
 
 def remove(path):

Modified: qpid/site/scripts/gen-release-books
URL: http://svn.apache.org/viewvc/qpid/site/scripts/gen-release-books?rev=1574220&r1=1574219&r2=1574220&view=diff
==============================================================================
--- qpid/site/scripts/gen-release-books (original)
+++ qpid/site/scripts/gen-release-books Tue Mar  4 22:00:01 2014
@@ -38,13 +38,18 @@ def gen_books(release, source_dir, outpu
     cpp_broker_input_dir = join(input_dir, "build", "AMQP-Messaging-Broker-CPP-Book")
     java_broker_input_dir = join(input_dir, "build", "AMQP-Messaging-Broker-Java-Book")
     programming_input_dir = join(input_dir, "build", "Programming-In-Apache-Qpid")
+    jms_client08_input_dir = join(input_dir, "build", "JMS-Client-Book")
+
+
     cpp_broker_output_dir = join(output_dir, "cpp-broker")
     java_broker_output_dir = join(output_dir, "java-broker")
     programming_output_dir = join(output_dir, "programming")
+    jms_client08_output_dir = join(output_dir, "jms-client-0-8")
 
     remove(cpp_broker_output_dir)
     remove(java_broker_output_dir)
     remove(programming_output_dir)
+    remove(jms_client08_output_dir)
 
     copy(join(cpp_broker_input_dir, "html"), join(cpp_broker_output_dir, "book"))
     copy(join(java_broker_input_dir, "html"), join(java_broker_output_dir, "book"))
@@ -57,7 +62,15 @@ def gen_books(release, source_dir, outpu
     copy(join(programming_input_dir, "pdf", "Programming-In-Apache-Qpid.pdf"),
          join(programming_output_dir, "programming-book.pdf"))
 
-    for dir in (cpp_broker_output_dir, java_broker_output_dir, programming_output_dir):
+    output_dirs = [cpp_broker_output_dir, java_broker_output_dir, programming_output_dir]
+
+    if directory_exists(jms_client08_input_dir):
+        copy(join(jms_client08_input_dir, "html"), join(jms_client08_output_dir, "book"))
+        copy(join(jms_client08_input_dir, "pdf", "JMS-Client-Book.pdf"),
+             join(jms_client08_output_dir, "jms_client08-book.pdf"))
+        output_dirs.append(jms_client08_output_dir)
+
+    for dir in output_dirs:
         for path in find(dir, "*.html"):
             tree = ElementTree.parse(path)
             elem = tree.find(".//{http://www.w3.org/1999/xhtml}body")
@@ -89,6 +102,8 @@ def gen_books(release, source_dir, outpu
                                       "@site-url@/releases/qpid-{}/programming/book/index.html".format(release))
             content = content.replace("../../AMQP-Messaging-Broker-CPP-Book/html/",
                                       "@site-url@/releases/qpid-{}/cpp-broker/book/index.html".format(release))
+            content = content.replace("../../AMQP-Messaging-Broker-Java-Book/html/",
+                                      "@site-url@/releases/qpid-{}/java-broker/book/".format(release))
             
             write("{}.in".format(path), content)
             remove(path)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message