Skip to content
Browse files

Initial checkin of documentation tools for generating Ti docs with Js…

…Duck.
  • Loading branch information...
1 parent 1410bcd commit 55c60507bb9f83a73251f902daeb89c5ca2ab95c Arthur Evans committed
View
44 README.md
@@ -0,0 +1,44 @@
+DocTools
+========
+
+This repository contains build scripts, configuration files, and other miscellany related
+to building the Titanium docs for JsDuck.
+
+To build the docs, you must have a local clone of this repo, the titanium_mobile repo, and
+the Titanium-flavored JsDuck repo.
+
+## Initial Setup
+
+1. Clone all three repos, preferably into the same parent folder (for example, ~/work).
+
+2. Set the TI_ROOT environment variable to the parent directory of all three repos.
+
+ TI_ROOT=~/work
+ export TI_ROOT
+
+ If the repos are in different locations, or use non-default names, you can set
+ environment variables for each repo. See `deploy.sh`.
+
+3. Make sure you have Ruby installed, and install JsDuck's dependencies:
+
+ gem install compass
+ gem install rdiscount
+ gem install json
+
+4. Make sure you have python installed and install pyyaml and Pygments.
+
+ easy_install pyyaml
+ easy_install Pygments
+
+5. Export the wiki docs as an Eclise Help archive. Extract the archive and rename the
+ folder to ${DOCTOOLS_DIR}/htmlguides.
+
+6. If the jsduck_generator has not yet been added to Titanium mobile, obtain a copy of
+ it and place it in the `titanium_mobile/apidoc/generators` folder.
+
+7. Here goes nothing! Try building the docs:
+
+ sh deploy.sh
+
+8. If all goes well, open dist/index.html and see how it looks.
+
View
17 deploy.sh
@@ -32,13 +32,12 @@ then
fi
python ${TI_DOCS}/docgen.py -f jsduck -o ./build
-python ${JSDUCK}/guides_parser.py --input "./htmlguides/toc.xml" --output "./build/guides"
+python ./guides_parser.py --input "./htmlguides/toc.xml" --output "./build/guides"
-compass compile ${JSDUCK}/jsduck/template/resources/sass
-ruby ${JSDUCK}/jsduck/bin/jsduck --config ./jsduck/jsduck.config
-cp -r "${JSDUCK}/htmlguides/images" "dist/images"
-cp -r "${JSDUCK}/htmlguides/attachments" "dist/attachments"
-cp -r "${JSDUCK}/htmlguides/css/common.css" "dist/resources/css/common.css"
-cp ${JSDUCK}/mock_video.png dist/resources/images/mock_video.png
-cp ${JSDUCK}/codestrong_logo_short.png dist/resources/images/codestrong_logo_short.png
-# cp -r "/landing" "dist/landing"
+compass compile ${JSDUCK}/template/resources/sass
+ruby ${JSDUCK}/bin/jsduck --template ${JSDUCK}/template --config ./jsduck.config
+cp -r "./htmlguides/images" "dist/images"
+cp -r "./htmlguides/attachments" "dist/attachments"
+cp -r "./htmlguides/css/common.css" "dist/resources/css/common.css"
+cp ./resources/mock_video.png dist/resources/images/mock_video.png
+cp ./resources/codestrong_logo_short.png dist/resources/images/codestrong_logo_short.png
View
6 guides_parser.py
@@ -51,7 +51,7 @@ def node2obj(node):
shortname = re.sub('(.*)\.html', '\\1', node.getAttribute('href'))
dirname = shortname
- dir = os.path.join(dest, 'tutorials', dirname)
+ dir = os.path.join(dest, 'guides', dirname)
try:
os.makedirs(dir)
except:
@@ -95,8 +95,8 @@ def node2obj(node):
# Rewrite any absolute links to http://docs.appcelerator.com
# Only way we can insert a link to the videos in the wiki is to use a full URL
- elif href.startswith('http://docs.appcelerator.com/titanium/latest/#!/video'):
- tag['href'] = href.replace('http://docs.appcelerator.com/titanium/latest/', '')
+ elif re.search('http://docs.appcelerator.com/titanium/.*#!.*', href):
+ tag['href'] = re.sub('http://docs.appcelerator.com/titanium/.*#!', '#!', href)
# In general, any link back to the wiki is a bad link.
# There are a very few exceptions, such as the community wiki.
View
9 jsduck.config
@@ -1,12 +1,11 @@
{
"--title": "Appcelerator Titanium Mobile",
- "--external": "void",
- "--output": "./../dist",
+ "--external": "void,Callback",
+ "--output": "./dist",
"--meta-tags": "meta",
- "--template": "./jsduck/template",
"--welcome": "welcome.html",
"--head-html": "<link rel='stylesheet' href='resources/css/my.css' type='text/css'><link rel='stylesheet' href='resources/css/common.css' type='text/css'>",
- "--guides": "./../tmp/guides/guides.json",
+ "--guides": "./build/guides/guides.json",
"--videos": "./videos.json",
- "--": ["./../tmp/titanium.js"]
+ "--": ["./build/titanium.js"]
}
View
BIN landing/appc_welcome.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN landing/arrow-link.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
353 landing/index.html
@@ -0,0 +1,353 @@
+<style type="text/css">
+
+.welcome-page {
+ width: 900px;
+ margin-left: auto;
+ margin-right: auto;
+ font-family: 'Helvetica Neue',Tahoma,Arial,sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+
+}
+
+.welcome-page .welcome-block {
+ padding-top: 20px;
+}
+
+.welcome-page .welcome_splash {
+ padding: 0px;
+ float: right;
+}
+
+.welcome-page .welcome-block .inner-container {
+ padding: 50px 10px 20px 10px;
+}
+
+.welcome-page .welcome-block .inner-container:before,
+.welcome-page .welcome-block .inner-container:after {
+ display: table;
+ content: "";
+ zoom: 1;
+ *display: inline;
+}
+
+.welcome-page .welcome-block .inner-container:after {
+ clear: both;
+}
+
+.welcome-page .welcome-block .inner-container h1{
+ font-size: 28px !important;
+ font-weight: normal;
+ line-height: 36px;
+ color: black !important;
+}
+
+.welcome-page .welcome-block .inner-container p {
+ color: #666666 !important;
+ font-size: 16px;
+ line-height: 22px;
+}
+
+.welcome-page .welcome-block .inner-container img {
+ padding: 0 10px;
+}
+
+.welcome-page .row {
+ width: 100%;
+ zoom: 1;
+ padding-top: 10px;
+}
+
+.welcome-page .row:before, .welcome-page .row:after {
+ display: table;
+ content: "";
+ zoom: 1;
+ *display: inline;
+}
+
+.welcome-page .row:after {
+ clear: both;
+}
+
+.welcome-page .half-pane {
+ float: left;
+ width: 48%;
+}
+
+.welcome-page .one-third-pane {
+ float: left;
+ width: 30%;
+ padding: 0 10px;
+}
+
+.welcome-page h2 {
+ color: #9b1c1f;
+ font-size: 18px;
+ font-weight: bold;
+ margin-bottom: 5px;
+}
+
+.welcome-page p {
+ color: #666666;
+ margin-top: 5px;
+}
+
+.welcome-page a {
+ color: #5d87a1;
+ text-decoration: none;
+}
+.welcome-page a:hover, .welcome-page a:visited {
+ color: #5D87A1;
+}
+.welcome-page ul {
+ margin-top: 5px;
+}
+
+.welcome-page li {
+ margin-top: 2px;
+}
+
+.welcome-page .update-date {
+ font-weight: bold;
+ margin-top: 7px;
+ margin-bottom: -4px;
+ color: black;
+}
+
+.welcome-page table {
+ width: 100%;
+}
+.welcome-page thead {
+ background-color: #f0f1f1;
+}
+.welcome-page thead th{
+ font-weight: bold;
+ font-size: 13px;
+ padding:0 10px 2px 10px;
+}
+.welcome-page tbody td{
+ padding:0 10px 2px 10px;
+ font-size: 13px;
+ color: #666666;
+ vertical-align: top;
+}
+
+.welcome-page .arrow-link {
+ background-image: url(arrow-link.png);
+ background-repeat: no-repeat;
+ background-position: 100% 3px;
+ padding-right: 13px;
+}
+
+</style>
+<div class="welcome-page">
+ <div class="row welcome-block">
+ <div class="inner-container">
+ <img class="welcome_splash" src="appc_welcome.png" alt="">
+ <div class="half-pane welcome-text">
+ <h1>Titanium SDK & Titanium Studio</h1>
+ <p>The Titanium Mobile SDK lets you develop native, hybrid and mobile web applications from a single codebase.</p>
+ <p>Titanium Studio is an extensible, Eclipse-based IDE for building Titanium Mobile applications and web applications.</p>
+ </div>
+ </div>
+ </div>
+ <div class="row">
+ <div class="one-third-pane">
+ <h2>What's New</h2>
+ <p>Titanium Mobile SDK 2.1.0 and Titanium Studio 2.1.0 released!</p>
+ <ul>
+ <li><a target="_top"
+ href="http://docs.appcelerator.com/titanium/release-notes/?version=2.1.0.GA" class="arrow-link">Titanium Mobile SDK 2.1.0 Release Notes</a></li>
+ <li><a target="_top"
+ href="http://docs.appcelerator.com/titanium/2.1/index.html#!/guide/Titanium_Studio_Release_Notes">Titanium Studio 2.1.0 Release Notes</a></li>
+ <!--
+ <li><a target="_top"
+ href="http://developer.appcelerator.com/blog/category/release_2.1" class="arrow-link">Blog posts about Release 2.1</a></li>
+ -->
+ </ul>
+ </div>
+ <div class="one-third-pane">
+ <h2>Get Started</h2>
+ <ul>
+ <li><a target="_top" href="http://docs.appcelerator.com/titanium/2.1/index.html#!/guide/Quick_Start">Get Up to Speed with the Quick Start Guide</a></li>
+ <li><a target="_top" href="https://my.appcelerator.com/resources" class="arrow-link">Download Titanium Studio & the Titanium Mobile SDK</a></li>
+ <li><a target="_top" href="http://docs.appcelerator.com/titanium/2.1/index.html#!/api" >Read the API Docs</a></li>
+ <li><a target="_top" href="http://docs.appcelerator.com/titanium/2.1/index.html#!/video" >Videos</a></li>
+ </ul>
+ </div>
+ <div class="one-third-pane">
+ <h2>Appcelerator Cloud Services</h2>
+ <p>Appcelerator Cloud Services provide a wide array of automatically scaled network features and data objects for your app.</p>
+ <p><a target="_top" href="http://cloud.appcelerator.com/docs/quickstart" class="arrow-link">Read the Appcelerator Cloud Services Documentation</a></p>
+ </div>
+ </div>
+ <div class="row">
+ <div class="one-third-pane">
+ <h2>Documentation Updates</h2>
+ <p class="update-date">06/29/2012</p>
+ <p>Doc site updated for release 2.1.0.</p>
+ <p>Fixes for inheritance issues.</p>
+ <p class="update-date">05/31/2012</p>
+ <p>Doc site updated for release 2.0.2.</p>
+ <p class="update-date">04/24/2012</p>
+ <p>Updated <a target="_top" href="http://docs.appcelerator.com/titanium/2.1/#!/guide/Titanium_Compatibility_Matrix">compatibility matrix</a> and
+ <a target="_top" href="http://docs.appcelerator.com/titanium/2.1/#!/guide/Integrating_with_Appcelerator_Cloud_Services">ACS guide</a>,
+ bug fixes.<p>
+ <p class="update-date">04/17/2012</p>
+ <p>New doc site released.</p>
+ <p>Reorganized and updated guides; added guides chapters on Mobile Web and Best Practices.</p>
+ <p>Added or updated docs for Geolocation, JSON, Ti.Media.Sound, Ti.Media.Android, Ti.Stream,
+ Ti.Android, Ti.Android.Notification and NotificationManager.</p>
+ <p>Corrected errors and omissions in Ti.UI.TextArea and TextField docs.</p>
+ <p class="update-date">02/29/2012</p>
+ <p>Updated docs for Ti.App module and submodules, Ti.Facebook, Ti.Map, Map.View, Annotation, Ti.Media.VideoPlayer, and Ti.iOS.</p>
+ <p>Updated docs for UI controls: AlertDialog, EmailDialog, OptionDialog ScrollableView, SearchBar, Slider, and WebView.</p>
+ </div>
+ <div class="one-third-pane">
+ <h2>SDK Updates</h2>
+ <table>
+ <thead>
+ <tr>
+ <th>version</th>
+ <th>release date</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>2.1.0</td>
+ <td>06/29/2012</td>
+ <td>
+ <a target="_top"
+ href="http://docs.appcelerator.com/titanium/2.1/#!/api" >API Docs</a>
+ <br />
+ <a target="_top"
+ href="http://docs.appcelerator.com/titanium/release-notes/?version=2.1.0.GA"
+ class="arrow-link">Rel Notes</a>
+ <br />
+ <a target="_top"
+ href="http://docs.appcelerator.com/titanium/data/2.1.0/api.json"
+ class="arrow-link">JSON Docs</a></td>
+ </tr>
+ <tr>
+ <td>2.0.2</td>
+ <td>05/31/2012</td>
+ <td>
+ <a target="_top"
+ href="http://docs.appcelerator.com/titanium/2.0/#!/api" >API Docs</a>
+ <br />
+ <a target="_top"
+ href="http://docs.appcelerator.com/titanium/release-notes/?version=2.0.2.GA"
+ class="arrow-link">Rel Notes</a>
+ <br />
+ <a target="_top"
+ href="http://docs.appcelerator.com/titanium/data/2.0.2/api.json"
+ class="arrow-link">JSON Docs</a></td>
+ </tr>
+ <tr>
+ <td>2.0.1</td>
+ <td>04/17/2012</td>
+ <td><a target="_top" href="http://docs.appcelerator.com/titanium/2.0/#!/api" >API Docs</a>
+ <br /><a target="_top" href="http://docs.appcelerator.com/titanium/release-notes/?version=2.0.1.GA" class="arrow-link">Rel Notes</a>
+ <br /><a target="_top" href="http://docs.appcelerator.com/titanium/data/2.0.1/api.json" class="arrow-link">JSON Docs</a></td>
+ </tr>
+ <tr>
+ <td>1.8.2</td>
+ <td>02/29/2012</td>
+ <td><a target="_top" href="http://developer.appcelerator.com/apidoc/mobile/1.8.2" class="arrow-link">API Docs</a></td>
+ </tr>
+ <tr>
+ <td>1.8.1</td>
+ <td>01/31/2012</td>
+ <td><a target="_top"
+ href="http://developer.appcelerator.com/apidoc/mobile/1.8.1" class="arrow-link">API Docs</a></td>
+ </tr>
+ <tr>
+ <td>1.8.0.1</td>
+ <td>12/22/2011</td>
+ <td><a target="_top"
+ href="http://developer.appcelerator.com/apidoc/mobile/1.8.0.1" class="arrow-link">API Docs</a></td>
+ </tr>
+ </tbody>
+ </table> </div>
+ <div class="one-third-pane">
+ <h2>Older Releases</h2>
+ <table>
+ <thead>
+ <tr>
+ <th>version</th>
+ <th>release date</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>1.7.5</td>
+ <td>11/02/2011</td>
+ <td><a target="_top"
+ href="http://developer.appcelerator.com/apidoc/mobile/1.7.5" class="arrow-link">API Docs</a></td>
+ </tr>
+
+ <tr>
+ <td>1.7.4</td>
+ <td>10/31/2011</td>
+ <td><a target="_top"
+ href="http://developer.appcelerator.com/apidoc/mobile/1.7.4" class="arrow-link">API Docs</a></td>
+ </tr>
+ <tr>
+ <td>1.7.3</td>
+ <td>10/17/2011</td>
+ <td><a target="_top"
+ href="http://developer.appcelerator.com/apidoc/mobile/1.7.3" class="arrow-link">API Docs</a></td>
+ </tr>
+ <tr>
+ <td>1.7.2</td>
+ <td>07/20/2011</td>
+ <td><a target="_top"
+ href="http://developer.appcelerator.com/apidoc/mobile/1.7.2" class="arrow-link">API Docs</a></td>
+ </tr>
+ <tr>
+ <td>1.7.1</td>
+ <td>06/16/2011</td>
+ <td><a target="_top"
+ href="http://developer.appcelerator.com/apidoc/mobile/1.7.1" class="arrow-link">API Docs</a></td>
+ </tr>
+ <tr>
+ <td>1.7.0</td>
+ <td>06/06/2011</td>
+ <td><a target="_top"
+ href="http://developer.appcelerator.com/apidoc/mobile/1.7.0" class="arrow-link">API Docs</a></td>
+ </tr>
+ <tr>
+ <td>1.6.2</td>
+ <td>04/18/2011</td>
+ <td><a target="_top" href="http://developer.appcelerator.com/apidoc/mobile/1.6.2" class="arrow-link">API Docs</a></td>
+ </tr>
+ <tr>
+ <td>1.6.1</td>
+ <td>03/15/2011</td>
+ <td><a target="_top"
+ href="http://developer.appcelerator.com/apidoc/mobile/1.6.1" class="arrow-link">API Docs</a></td>
+ </tr>
+ <tr>
+ <td>1.6.0</td>
+ <td>02/23/2011</td>
+ <td><a target="_top"
+ href="http://developer.appcelerator.com/apidoc/mobile/1.6.0" class="arrow-link">API Docs</a></td>
+ </tr>
+ <tr>
+ <td>1.5.1</td>
+ <td>12/16/2010</td>
+ <td><a target="_top"
+ href="http://developer.appcelerator.com/apidoc/mobile/1.5.1" class="arrow-link">API Docs</a></td> </tr>
+ <tr>
+ <td>1.5.0</td>
+ <td>12/10/2010</td>
+ <td><a target="_top"
+ href="http://developer.appcelerator.com/apidoc/mobile/1.5.0" class="arrow-link">API Docs</a></td> </tr>
+
+ </tbody>
+ </table>
+ </div>
+ </div>
+</div>
View
BIN resources/codestrong_logo_short.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN resources/mock_video.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 55c6050

Please sign in to comment.
Something went wrong with that request. Please try again.