You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2015/01/07 23:11:35 UTC

svn commit: r1650179 - in /qpid/dispatch/trunk: CMakeLists.txt doc/book/CMakeLists.txt doc/book/site-html.pd python/qpid_dispatch_internal/tools/command.py site/ site/CMakeLists.txt site/README

Author: aconway
Date: Wed Jan  7 22:11:35 2015
New Revision: 1650179

URL: http://svn.apache.org/r1650179
Log:
DISPATCH-94: Router documentation to Qpid web site for 0.3 release.

"make site" will now generate and copy documentation to a qpid site checkout,
you need to run cmake with -DQPID_SITE_DIR=<dir>

See site/README for more.

Documentation fixes:
- bare-html version of book for site.
- number headings in book.
- site/CMakeLists.txt to generate and copy documentation to site.

Added:
    qpid/dispatch/trunk/doc/book/site-html.pd
    qpid/dispatch/trunk/site/
    qpid/dispatch/trunk/site/CMakeLists.txt
    qpid/dispatch/trunk/site/README
Modified:
    qpid/dispatch/trunk/CMakeLists.txt
    qpid/dispatch/trunk/doc/book/CMakeLists.txt
    qpid/dispatch/trunk/python/qpid_dispatch_internal/tools/command.py

Modified: qpid/dispatch/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/CMakeLists.txt?rev=1650179&r1=1650178&r2=1650179&view=diff
==============================================================================
--- qpid/dispatch/trunk/CMakeLists.txt (original)
+++ qpid/dispatch/trunk/CMakeLists.txt Wed Jan  7 22:11:35 2015
@@ -142,4 +142,5 @@ execute_process(COMMAND ${RUN} --sh OUTP
 add_subdirectory(tests)
 add_subdirectory(python)
 add_subdirectory(router)
-add_subdirectory(doc) # doc last, runs executables for --help output.
+add_subdirectory(doc)
+add_subdirectory(site)

Modified: qpid/dispatch/trunk/doc/book/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/doc/book/CMakeLists.txt?rev=1650179&r1=1650178&r2=1650179&view=diff
==============================================================================
--- qpid/dispatch/trunk/doc/book/CMakeLists.txt (original)
+++ qpid/dispatch/trunk/doc/book/CMakeLists.txt Wed Jan  7 22:11:35 2015
@@ -39,25 +39,26 @@ install(FILES ${BOOK} DESTINATION ${QD_D
 # Generate man pages and book if pandoc is installed
 find_program(PANDOC pandoc)
 if (PANDOC)
-  set(CMD pandoc -s -S --toc -f markdown -V "title=Qpid Dispatch Router Book")
+  set(PD_ARGS --standalone --toc --number-sections -f markdown -V "title=Qpid Dispatch Router Book")
 
-  # Generate a book in FORMAT
-  macro(generate_book FORMAT)
-    set(OUTPUT ${bin}/qpid-dispatch-book.${FORMAT})
+  # Generate a book with the given suffix. Extra arguments are passed to pandoc
+  macro(generate_book SUFFIX)
+    set(OUTPUT ${bin}/qpid-dispatch-book${SUFFIX})
     add_custom_command(
       OUTPUT ${OUTPUT}
-      COMMAND ${CMD} -o ${OUTPUT} ${BOOK}
+      COMMAND ${PANDOC} ${PD_ARGS} -o ${OUTPUT} ${ARGN} ${BOOK}
       DEPENDS man ${BOOK}
     )
     install(FILES ${OUTPUT} DESTINATION ${QD_DOC_INSTALL_DIR})
     set(BOOKS ${BOOKS} ${OUTPUT})
   endmacro()
 
-  generate_book(html)  # Always generate HTML
+  generate_book(.html)          # Complete HTML document.
+  generate_book(.html.in --template ${src}/site-html.pd) # Headless fragment for Qpid website.
 
   find_program(PDFLATEX pdflatex)
   if (PDFLATEX)
-    generate_book(pdf)
+    generate_book(.pdf)      # Complete PDF document.
   else(PDFLATEX)
     message("Not generating PDF format book, pdflatex not available.")
   endif(PDFLATEX)

Added: qpid/dispatch/trunk/doc/book/site-html.pd
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/doc/book/site-html.pd?rev=1650179&view=auto
==============================================================================
--- qpid/dispatch/trunk/doc/book/site-html.pd (added)
+++ qpid/dispatch/trunk/doc/book/site-html.pd Wed Jan  7 22:11:35 2015
@@ -0,0 +1,51 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+  http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!--
+ Pandoc template for HTML content to go onto the Qpid web site.
+ Such a fragment is just the contents of the <body> element,
+ the site generation tools will add the <head> etc.
+-->
+
+$for(include-before)$
+$include-before$
+$endfor$
+$if(title)$
+<div id="$idprefix$header">
+<h1 class="title">$title$</h1>
+$if(subtitle)$
+<h1 class="subtitle">$subtitle$</h1>
+$endif$
+$for(author)$
+<h2 class="author">$author$</h2>
+$endfor$
+$if(date)$
+<h3 class="date">$date$</h3>
+$endif$
+</div>
+$endif$
+$if(toc)$
+<div id="$idprefix$TOC">
+$toc$
+</div>
+$endif$
+$body$
+$for(include-after)$
+$include-after$
+$endfor$

Modified: qpid/dispatch/trunk/python/qpid_dispatch_internal/tools/command.py
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/python/qpid_dispatch_internal/tools/command.py?rev=1650179&r1=1650178&r2=1650179&view=diff
==============================================================================
--- qpid/dispatch/trunk/python/qpid_dispatch_internal/tools/command.py (original)
+++ qpid/dispatch/trunk/python/qpid_dispatch_internal/tools/command.py Wed Jan  7 22:11:35 2015
@@ -65,16 +65,16 @@ def connection_options(options, title="C
     """Return an OptionGroup for connection options."""
     group = optparse.OptionGroup(options, title)
     group.add_option("-b", "--bus", action="store", type="string", default="0.0.0.0",
-                     metavar="<url>", help="URL of the messaging bus to connect to (default %default)")
+                     metavar="URL", help="URL of the messaging bus to connect to (default %default)")
     group.add_option("-r", "--router", action="store", type="string", default=None,
-                     metavar="<router-id>", help="Router to be queried")
-    group.add_option("-t", "--timeout", action="store", type="float", default=5, metavar="<secs>",
+                     metavar="ROUTER-ID", help="Router to be queried")
+    group.add_option("-t", "--timeout", action="store", type="float", default=5, metavar="SECS",
                       help="Maximum time to wait for connection in seconds (default %default)")
-    group.add_option("--sasl-mechanism", action="store", type="string", metavar="<mech>",
+    group.add_option("--sasl-mechanism", action="store", type="string", metavar="MECH",
                       help="Force SASL mechanism (e.g. EXTERNAL, ANONYMOUS, PLAIN, CRAM-MD5, DIGEST-MD5, GSSAPI).")
-    group.add_option("--ssl-certificate", action="store", type="string", metavar="<cert>",
+    group.add_option("--ssl-certificate", action="store", type="string", metavar="CERT",
                      help="Client SSL certificate (PEM Format)")
-    group.add_option("--ssl-key", action="store", type="string", metavar="<key>",
+    group.add_option("--ssl-key", action="store", type="string", metavar="KEY",
                      help="Client SSL private key (PEM Format)")
     return group
 

Added: qpid/dispatch/trunk/site/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/site/CMakeLists.txt?rev=1650179&view=auto
==============================================================================
--- qpid/dispatch/trunk/site/CMakeLists.txt (added)
+++ qpid/dispatch/trunk/site/CMakeLists.txt Wed Jan  7 22:11:35 2015
@@ -0,0 +1,39 @@
+##
+## Licensed to the Apache Software Foundation (ASF) under one
+## or more contributor license agreements.  See the NOTICE file
+## distributed with this work for additional information
+## regarding copyright ownership.  The ASF licenses this file
+## to you under the Apache License, Version 2.0 (the
+## "License"); you may not use this file except in compliance
+## with the License.  You may obtain a copy of the License at
+##
+##   http://www.apache.org/licenses/LICENSE-2.0
+##
+## Unless required by applicable law or agreed to in writing,
+## software distributed under the License is distributed on an
+## "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+## KIND, either express or implied.  See the License for the
+## specific language governing permissions and limitations
+## under the License.
+##
+
+# Content for the qpid website.
+# Copy ${CMAKE_CURRENT_BINARY_DIR}/input to to a checkout of the qpid site repository at:
+#  https://svn.apache.org/repos/asf/qpid/site
+# Then build and publish the site as per the README there.
+
+set(QPID_SITE_DIR ${CMAKE_CURRENT_BINARY_DIR} CACHE string
+  "Qpid site checkout directory for installing site documentation.")
+
+set(input ${QPID_SITE_DIR}/input)
+set(book ${CMAKE_BINARY_DIR}/doc/book)
+set(release ${input}/releases/qpid-dispatch-${QPID_DISPATCH_VERSION})
+
+add_custom_target(
+  site
+  COMMAND ${CMAKE_COMMAND} -E make_directory ${release}
+  COMMAND ${CMAKE_COMMAND} -E copy_if_different ${book}/qpid-dispatch-book.html.in ${release}
+  COMMAND ${CMAKE_COMMAND} -E copy_if_different ${book}/qpid-dispatch-book.pdf ${release}
+  )
+
+add_dependencies(site book man)

Added: qpid/dispatch/trunk/site/README
URL: http://svn.apache.org/viewvc/qpid/dispatch/trunk/site/README?rev=1650179&view=auto
==============================================================================
--- qpid/dispatch/trunk/site/README (added)
+++ qpid/dispatch/trunk/site/README Wed Jan  7 22:11:35 2015
@@ -0,0 +1,13 @@
+# Generate content for the qpid web site.
+
+Check out the Qpid site repository to $SITE_DIR
+    svn co https://svn.apache.org/repos/asf/qpid/site $SITE_DIR
+
+In the dispatch build directory run cmake and make site
+
+    cmake -DQPID_SITE_DIR=$SITE_DIR ..
+    make site
+
+This will copy the web site content to the correct place in $SITE_DIR.
+
+Now $SITE_DIR/README for instructions on updating the web site.



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