Permalink
Browse files

Adding scripts to manage publishing to live server

  • Loading branch information...
1 parent a27d385 commit 946a1a0f94ffa2f4f2f01606a5338ee0d1b049c9 @tobrien tobrien committed Aug 8, 2011
Showing with 293 additions and 2 deletions.
  1. +1 −0 airspeed
  2. +7 −0 apply_template.py
  3. +8 −0 assemble.sh
  4. +4 −1 build.sh
  5. +0 −1 html/html_chunk.xsl
  6. +259 −0 site/book-template.html
  7. +14 −0 template.py
Submodule airspeed added at cc862e
View
@@ -0,0 +1,7 @@
+#!/usr/bin/env python
+book_title = "Repository Management with Nexus"
+page_title = "BLAHBLAH"
+page_body = "WHOOP WHOOP"
+template = open('site/book-template.html').read()
+print template
+
View
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+mkdir -p target/site/reference
+mkdir -p target/site/pdf
+cp -r target/book-nexus.chunked/* target/site/reference
+cp target/book-nexus.pdf target/site/pdf/nxbook-pdf.pdf
+python template.py
+rsync -e ssh -av target/site/* deployer@www.sonatype.com:/var/www/domains/sonatype.com/www/shared/books/nexus-book/
View
@@ -11,4 +11,7 @@ rm -rf target/images
rm -rf target/figs
cp -r figs target
cp -r images target
-a2x -v -k -fpdf -dbook --dblatex-opts=" -P latex.output.revhistory=0" -D target book-nexus.doc
+a2x -v -k -fpdf -dbook --dblatex-opts=" -P latex.output.revhistory=0" -D target book-nexus.doc
+
+# Build the Chunked HTML
+a2x -v -k -fchunked -dbook --dblatex-opts=" -P latex.output.revhistory=0" -D target book-nexus.doc
View
@@ -7,7 +7,6 @@
xmlns:d="http://docbook.org/ns/docbook"
version="1.0">
- <xsl:import href="urn:docbkx:stylesheet"/>
<!--###################################################
HTML Settings
################################################### -->
View
@@ -0,0 +1,259 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
+ <head>
+<!-- Links : Start --> <title>${title} / Documentation Sonatype.com</title>
+
+ <meta name="Content-Type" content="text/html; charset=utf-8" /> <meta name="Content-language" content="en-US" /> <meta name="author" content="Sonatype, Inc." />
+ <meta name="copyright" content="Sonatype, Inc." />
+ <meta name="description" content="Sonatype provides the most widely used tools in Java development, including: Maven, Nexus, Hudson, m2eclipse, and Maven Central." />
+ <meta name="keywords" content="" />
+ <meta name="MSSmartTagsPreventParsing" content="TRUE" /><!-- Links : End -->
+
+<!-- Load Stylesheets -->
+<link rel="stylesheet" type="text/css" href="/var/ezflow_site/cache/public/stylesheets/6448fb4a1e092dc20997b2211c085806_all.css" />
+
+<link rel="stylesheet" href="/extension/sonatype/design/sonatype_com/stylesheets/print.css" type="text/css" media="print">
+<!--[if lt IE 8]>
+ <link rel="stylesheet" type="text/css" href="/extension/sonatype/design/sonatype_com/stylesheets/browsers/ie-lt8.css" />
+
+<![endif]-->
+<!-- Load Javascripts -->
+<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js" type="text/javascript"></script>
+<script src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js" type="text/javascript"></script>
+<script type="text/javascript" src="/var/ezflow_site/cache/public/javascript/a8400fc5b3b994015bca03b554ff5725.js" charset="utf-8"></script>
+
+<!--
+ <script type="text/javascript" src="http://use.typekit.com/mlk8aso.js"></script>
+ <script type="text/javascript">try{Typekit.load();}catch(e){}</script>
+-->
+ </head>
+ <body>
+ <!-- Accessibility Links -->
+ <div class="hide">
+ <ul>
+ <li><a href="#content-a" title="Skip to main content">Skip to main content</a></li>
+ <li><a href="#site-search-a" title="Skip to site search">Skip to site search and quick links</a></li>
+ <li><a href="#nav-global-a" title="Skip to site navigation">Skip to site navigation</a></li>
+ <li><a href="#footer-a" title="Skip to site map, terms &amp; conditions, and privacy policy">Skip to footer links</a></li>
+ </ul>
+ </div>
+ <!-- page : START -->
+ <div id="page" class="nosidemenu extrainfo section_id_1 subtree_level_0_node_id_2 subtree_level_1_node_id_84 subtree_level_2_node_id_86">
+
+
+ <!-- page_header : START -->
+ <div id="header">
+ <div class="trunk"> <h1 id="logo"><a href="/" title="Sonatype.com Homepage"><span>Sonatype.com | Transforming Software Development</span></a></h1> <a class="off" name="site-search-a"></a>
+ <div id="header-search" class="search-box">
+ <form action="/content/search">
+ <label for="searchtext" class="hide">Search Site:</label>
+ <input type="image" class="search-btn" id="searchbutton" src="/extension/sonatype/design/sonatype_com/images/spacer.png" width="28" height="20" value="" />
+ <input type="text" class="search-text" id="searchtext" name="SearchText" size="15" maxlength="255" value="" />
+ <input type="hidden" name="SubTreeArray[]" value="86" />
+ </form> </div>
+
+ <ul id="header-actions" class="fineprint">
+ <li><a href="/people" title="Tips, Tricks, and news on all things Maven, Hudson, Nexus, and Central!">Our Blog</a></li>
+ <li><a id="header-connect" href="/Connect">Connect</a>
+ <ul class="connect-options" style="display:none;">
+ <li><a class="bgi30 i30-blog" href="/people" title="Tips, Tricks, and news on all things Maven, Hudson, Nexus, and Central!">Follow our Blog</a></li>
+ <li><a class="bgi30 i30-newsletter" href="/Request/Newsletter" title="So you prefer email? No problem! Sign-up and we'll keep you current.">Subscribe to our Newsletter</a></li>
+ <li><a class="bgi30 i30-twitter" target="_blank" href="http://twitter.com/SonatypeCM" title="Follow Sonatype on Twitter!">Follow us on Twitter</a></li>
+ <li><a class="bgi30 i30-youtube" target="_blank" href="http://www.youtube.com/user/sonatype" title="Watch Sonatype's YouTube Channel!">Tune in on YouTube</a></li>
+ <li><a class="bgi30 i30-linkedin" target="_blank" href="http://www.linkedin.com/company/sonatype" title="Follow us on LinkedIn!">Connect on LinkedIn</a></li>
+ </ul></li>
+ <li><a href="/Contact-Us">Contact Us</a></li>
+ <li class="last"><a href="/shop/basket">Cart</a></li>
+ </ul>
+
+ <div id="nav-main">
+<a class="hide" name="nav-global-a"></a>
+ <ul class="nav-main-sf">
+ <li class="m1"><a href="/Products" class="tab"><span>Products</span></a>
+ <ul>
+ <li><a href="/Products/Sonatype-Insight" class="gm m1-4"><em>Nexus Professional</em></a>
+ <ul>
+ <li><a href="/Products/Sonatype-Insight/Why-Insight">Why Insight</a></li>
+ <li><a href="/Products/Sonatype-Insight/Management-Insight">Management Insight</a></li>
+ <li><a href="/Products/Sonatype-Insight/Application-Insight">Application Insight</a></li>
+ <li><a href="/Products/Sonatype-Insight/Development-Insight">Development Insight</a>
+ <ul>
+ <li class="last"><a href="/Products/Sonatype-Insight/Development-Insight/Development-Insight-for-Eclipse">For Eclipse</a></li> </ul></li>
+ <li class="last"><a href="/Request/Information/Sonatype-Insight">Request Information</a></li>
+ </ul>
+ </li>
+ <li><a href="/Products/Sonatype-Pro-for-Nexus" class="gm m1-2"><em>Nexus Professional</em></a>
+ <ul>
+ <li><a href="/Products/Sonatype-Pro-for-Nexus/At-A-Glance">At a Glance</a></li>
+ <li><a href="/Products/Sonatype-Pro-for-Nexus/Why-Go-Pro">Why go Pro</a></li>
+ <li><a href="/Products/Sonatype-Pro-for-Nexus/Features-Overview">Features Overview</a></li>
+ <li><a href="/Products/Sonatype-Pro-for-Nexus/Integration">Integration</a></li>
+ <li><a href="/Products/Sonatype-Pro-for-Nexus/Requirements">Requirements</a></li>
+ <li><a href="/Request/Free-Trial/Free-Nexus-Professional-Trial">Free Trial</a></li>
+ <li><a href="/Request/Live-Demo/Live-Nexus-Professional-Demo">Live Demo</a></li>
+ <li class="last"><a href="/Products/Sonatype-Pro-for-Nexus/Purchase">Purchase</a></li>
+ </ul>
+ </li>
+ <li><a href="/Products/Sonatype-Pro-for-Hudson" class="gm m1-3"><em>Sonatype Pro for Hudson</em></a>
+ <ul>
+ <li><a href="/Products/Sonatype-Pro-for-Hudson/At-A-Glance">At a Glance</a></li>
+ <li><a href="/Products/Sonatype-Pro-for-Hudson/Why-Go-Pro">Why go Pro</a></li>
+ <li><a href="/Products/Sonatype-Pro-for-Hudson/Features-Overview">Features Overview</a></li>
+ <li><a href="/Products/Sonatype-Pro-for-Hudson/Integration">Integration</a></li>
+ <li><a href="/Products/Sonatype-Pro-for-Hudson/Requirements">Requirements</a></li>
+ <li><a href="/Request/Free-Trial/Free-Hudson-Professional-Trial">Free Trial</a></li>
+ <li><a href="/Request/Live-Demo/Live-Hudson-Professional-Demo">Live Demo</a></li>
+ <li class="last"><a href="/Products/Sonatype-Pro-for-Hudson/Purchase">Purchase</a></li>
+ </ul>
+ </li>
+ <li class="last"><a href="/Products/Sonatype-Pro-Suite" class="gm m1-1"><em>Sonatype Pro Suite</em></a>
+ <ul>
+ <li><a href="/Products/Sonatype-Pro-Suite/At-A-Glance">At a Glance</a></li>
+ <li><a href="/Products/Sonatype-Pro-Suite/Why-Go-Pro">Why go Pro</a></li>
+ <li><a href="/Products/Sonatype-Pro-Suite/Features-Overview">Features Overview</a></li>
+ <li><a href="/Products/Sonatype-Pro-Suite/Integration">Integration</a></li>
+ <li><a href="/Products/Sonatype-Pro-Suite/Requirements">Requirements</a></li>
+ <li><a href="/Request/Free-Trial/Free-Sonatype-Professional-Trial">Free Trial</a></li>
+ <li><a href="/Request/Live-Demo/Live-Sonatype-Professional-Demo">Live Demo</a></li>
+ <li class="last"><a href="/Products/Sonatype-Pro-Suite/Purchase">Purchase</a></li>
+ </ul>
+ </li>
+ </ul>
+ </li>
+ <li class="m2"><a href="/Services" class="tab"><span>Services</span></a>
+ <ul>
+ <li><a href="/Services/Enterprise-Support">Enterprise Support</a></li>
+ <li><a href="/Services/Training">Training</a></li>
+ <li class="last"><a href="/Services/Webinars">Webinars</a></li>
+ </ul>
+ </li>
+ <li class="m3"><a href="/Success-Stories" class="tab"><span>Success Stories</span></a></li>
+ <li class="m4"><a href="/About-Sonatype" class="tab"><span>About Sonatype</span></a>
+ <ul>
+ <li><a href="/About-Sonatype/Contributions">Our Contributions</a></li>
+ <li><a href="/About-Sonatype/History">History</a></li>
+ <li><a href="/About-Sonatype/Leadership">Leadership</a></li>
+ <li><a href="/About-Sonatype/Board-of-Directors">Board of Directors</a></li>
+ <li><a href="/About-Sonatype/Investors">Investors</a></li>
+ <li><a href="/About-Sonatype/News">News</a></li>
+ <li class="last"><a href="/About-Sonatype/Careers">Careers</a></li>
+ </ul>
+ </li>
+ <li class="m5"><a href="/Support" class="tab"><span>Support</span></a>
+ <ul>
+ <li><a href="https://issues.sonatype.org/browse/SUPPORT">Issue Management</a></li>
+ <li><a href="/Support/Books">Books</a></li>
+ <li class="last"><a href="/Support/Videos">Videos</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div> <!-- page_header : END -->
+
+ <!-- page-content : START -->
+ <div id="page-content" class="book s-books ss-book-${bookId}">
+
+ <!-- Toolbar area: START -->
+ <!-- Toolbar area: END -->
+
+
+<!-- module_result : START -->
+ <!-- title-block and subnav : START -->
+ <div class="title-block trunk">
+ <div class="title s-icon">
+ <h1>${bookTitle}<br />
+ <span>${title}</span></h1>
+ </div>
+ <!-- top_subnav : START -->
+ <!-- top_subnav : END -->
+ </div>
+ <!-- title-block and subnav : END -->
+
+
+<div id="content" class="trunk container">
+ <div class="span-17">
+ ${body}
+ </div>
+ <div class="span-7 last" id="sidebar">
+ <!-- This section will be populated by a call resembling $('#sidebar').load('ez-cms-page.htm') -->
+ </div>
+</div>
+</div>
+<!-- module_result : END -->
+ </div>
+ <!-- page-content : END -->
+
+ <!-- page_footer : START -->
+ <div id="super-footer">
+ <div class="trunk">
+ <a class="hide" name="footer-a"></a>
+ <div id="footer-quote">
+ <img src="/extension/sonatype/design/sonatype_com/images/footer-quote-photo.png" alt="Photo of Mike Milinkovich"/>
+ <blockquote>Sonatype is a visionary contributor to the open source community. We're delighted by their support of the Eclipse Foundation.
+ <div>Mike Milinkovich <br /><span>Executive Director<br />Eclipse Foundation</span></div>
+ </blockquote>
+ </div>
+
+ <div id="footer-actions">
+ <h2 class="wht">Still Have Questions?</h2>
+ <div id="footer-search" class="search-box">
+ <form action="/content/search">
+ <label for="searchtext" class="hide">Search Site:</label>
+ <input type="image" class="search-btn" id="searchbutton" src="/extension/sonatype/design/sonatype_com/images/spacer.png" width="28" height="20" value="" />
+ <input type="text" class="search-text" id="searchtext" name="SearchText" size="15" maxlength="255" value="" />
+ <input type="hidden" name="SubTreeArray[]" value="86" />
+ </form> </div>
+ <a class="gbtn gb-tte" href="/Contact-Us?r=eng" title="Talk to an Engineer"><span>Talk to an Engineer</span></a>
+ <a class="gbtn gb-rad" href="/Contact-Us?r=demo" title="Request a Demo"><span>Request a Demo</span></a>
+ </div>
+
+ <div id="footer-links">
+ <ul class="fineprint">
+ <li class="wht"><a href="/Products">Products</a></li>
+ <li><a href="/Products/Sonatype-Pro-for-Nexus">Sonatype Pro for Nexus</a></li>
+ <li><a href="/Products/Sonatype-Pro-for-Hudson">Sonatype Pro for Hudson</a></li>
+ <li><a href="/Products/Sonatype-Pro-Suite">Sonatype Pro Suite</a></li>
+ </ul>
+ <ul class="fineprint">
+ <li class="wht"><a href="/Services">Services</a></li>
+ <li><a href="/Services/Enterprise-Support">Enterprise Support</a></li>
+ <li><a href="/Services/Training">Training</a></li>
+ <li><a href="/Services/Webinars">Webinars</a></li>
+ </ul>
+ <ul class="fineprint">
+ <li class="wht"><a href="https://docs.sonatype.com">Support</a></li>
+ <li><a href="https://issues.sonatype.org/browse/SUPPORT">Issues</a></li>
+ <li><a href="/Support/Books">Books</a></li>
+ <li><a href="/Support/Videos">Videos</a></li>
+ </ul>
+ <ul class="fineprint">
+ <li class="wht"><a href="/Connect">Connect</a></li>
+ <li><a class="bgi14 i14-blog" href="/people" title="Tips, Tricks, and news on all things Maven, Hudson, Nexus, and Central!">Blog</a></li>
+ <li><a class="bgi14 i14-newsletter" href="/Request/Newsletter" title="So you prefer email? No problem! Sign-up and we'll keep you current!">Newsletter</a></li>
+ <li><a class="bgi14 i14-twitter" target="_blank" href="http://twitter.com/SonatypeCM" title="Follow us on Twitter!">Twitter</a></li>
+ <li><a class="bgi14 i14-youtube" target="_blank" href="http://www.youtube.com/user/sonatype" title="Watch Sonatype's YouTube Channel!">YouTube</a></li>
+ <li><a class="bgi14 i14-linkedin" target="_blank" href="http://www.linkedin.com/company/sonatype" title="Follow us on LinkedIn!">LinkedIn</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+
+ <div id="footer">
+ <div class="trunk fineprint clearfix">
+ <ul id="footer-actions">
+ <li><a href="/Usage/Terms-of-Service">Terms of Service</a></li>
+ <li class="last"><a href="/Usage/Privacy">Privacy</a></li>
+ </ul>
+ <p>Copyright &copy; 2008-2011, Sonatype Inc. All rights reserved. Includes the third-party code <a href="/Usage/Attributions"><em>listed here</em></a>.
+ Sonatype and Sonatype Nexus are trademarks of Sonatype, Inc. Apache Maven and Maven are trademarks of the <a href="http://www.apache.org" rel="nofollow">Apache Software Foundation</a>. M2Eclipse is a trademark of the Eclipse Foundation. All other trademarks are the property of their respective owners.</p>
+ </div>
+ </div> <!-- page_footer : END -->
+
+</div>
+<!-- page : END -->
+<!-- Footer script area: START --><!-- Eloqua, Google Analytics, Chartbeat -->
+<script type="text/javascript" src="/extension/sonatype/design/sonatype_com/javascript/elqNow/elqCfg.js"></script>
+<script type="text/javascript" src="/extension/sonatype/design/sonatype_com/javascript/elqNow/elqImg.js"></script><script type="text/javascript" src="/extension/sonatype/design/sonatype_com/javascript/footer.js"></script><!-- Footer script area: END -->
+ </body>
+</html>
View
@@ -0,0 +1,14 @@
+import airspeed
+import glob
+import os
+
+t = airspeed.Template(open("site/book-template.html", "r").read())
+bookTitle = "Repository Management with Nexus"
+bookId = "nxbook"
+
+path = 'target/site/reference'
+for infile in glob.glob( os.path.join(path, '*.html') ):
+ body = open(infile, "r").read()
+ body = body[ body.index( "<body>") + 6 : body.rindex("</body>") ]
+ title = "Repository Management with Nexus"
+ open(infile, "w").write( t.merge(locals()) );

0 comments on commit 946a1a0

Please sign in to comment.