Browse files

Initial Commit

  • Loading branch information...
0 parents commit ccaff2ff76135e89e60a3ab724174cc5e3eb7be7 Corey Oordt committed Dec 16, 2009
Showing with 3,000 additions and 0 deletions.
  1. +11 −0 .gitignore
  2. +176 −0 LICENSE
  3. +7 −0 README
  4. +3 −0 build_docs.sh
  5. +89 −0 docs/Makefile
  6. BIN docs/_static/breadcrumb_background.png
  7. +760 −0 docs/_static/default.css
  8. BIN docs/_static/documentation.png
  9. BIN docs/_static/header_sm_mid.png
  10. BIN docs/_static/scrn1.png
  11. BIN docs/_static/scrn2.png
  12. BIN docs/_static/searchfield_leftcap.png
  13. BIN docs/_static/searchfield_repeat.png
  14. BIN docs/_static/searchfield_rightcap.png
  15. BIN docs/_static/title_background.png
  16. +20 −0 docs/_static/toc.js
  17. BIN docs/_static/triangle_closed.png
  18. BIN docs/_static/triangle_left.png
  19. BIN docs/_static/triangle_open.png
  20. +144 −0 docs/_templates/layout.html
  21. +195 −0 docs/conf.py
  22. +22 −0 docs/index.rst
  23. +113 −0 docs/make.bat
  24. +192 −0 docs/metadata.rst
  25. +3 −0 docs/reference/index.rst
  26. +5 −0 docs/templates.rst
  27. +108 −0 docs/tutorial.rst
  28. 0 epub/__init__.py
  29. +1 −0 epub/admin.py
  30. +19 −0 epub/bin/epubcheck-1.0.3/COPYING.txt
  31. +61 −0 epub/bin/epubcheck-1.0.3/README.txt
  32. BIN epub/bin/epubcheck-1.0.3/epubcheck-1.0.3.jar
  33. +12 −0 epub/bin/epubcheck-1.0.3/jing_license.txt
  34. BIN epub/bin/epubcheck-1.0.3/lib/saxon.jar
  35. +19 −0 epub/bin/epubpreflight-0.1.0/COPYING.txt
  36. +61 −0 epub/bin/epubpreflight-0.1.0/README.txt
  37. BIN epub/bin/epubpreflight-0.1.0/epubpreflight-0.1.0.jar
  38. +12 −0 epub/bin/epubpreflight-0.1.0/jing_license.txt
  39. BIN epub/bin/epubpreflight-0.1.0/lib/saxon.jar
  40. +1 −0 epub/forms.py
  41. 0 epub/media/epub/placeholder.txt
  42. +433 −0 epub/models.py
  43. +16 −0 epub/templates/epub/article.html
  44. +6 −0 epub/templates/epub/container.xml
  45. +24 −0 epub/templates/epub/content.opf
  46. +17 −0 epub/templates/epub/contents.html
  47. +1 −0 epub/templates/epub/mimetype
  48. +49 −0 epub/templates/epub/pagetemplate.xpgt
  49. +40 −0 epub/templates/epub/stylesheet.css
  50. +17 −0 epub/templates/epub/title_page.html
  51. +28 −0 epub/templates/epub/toc.ncx
  52. 0 epub/templatetags/__init__.py
  53. BIN epub/testpub.epub
  54. +72 −0 epub/tests.py
  55. +5 −0 epub/urls.py
  56. +4 −0 epub/views.py
  57. 0 example/__init__.py
  58. +11 −0 example/manage.py
  59. +85 −0 example/settings.py
  60. 0 example/simplestory/__init__.py
  61. +57 −0 example/simplestory/fixtures/dailytimes.svg
  62. +39 −0 example/simplestory/fixtures/stories.json
  63. +21 −0 example/simplestory/models.py
  64. +23 −0 example/simplestory/tests.py
  65. +1 −0 example/simplestory/views.py
  66. +17 −0 example/urls.py
  67. 0 setup.py
11 .gitignore
@@ -0,0 +1,11 @@
+*.pyc
+dev.db
+local_settings.py
+media/ugc
+docs/_build/
+src/
+pip-log.txt
+media/js/*.r*.js
+media/css/*.r*.css
+*DS_Store
+*.egg-info
176 LICENSE
@@ -0,0 +1,176 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+END OF TERMS AND CONDITIONS
7 README
@@ -0,0 +1,7 @@
+1: Create an EPub object
+2. Set metadata- title, publisher, description, creator, date, type, rights
+3. optionally set identifier (does uuid by default)
+4. Set any other global metadata (contributors are added as each article is added)
+5: Get list of articles/chapters
+6. Loop through each article and add it into the epub:
+ 6.1. it adds the author to the contributors list
3 build_docs.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+cd docs
+make html
89 docs/Makefile
@@ -0,0 +1,89 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = _build
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ -rm -rf $(BUILDDIR)/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/app.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/app.qhc"
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
+ "run these through (pdf)latex."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
BIN docs/_static/breadcrumb_background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
760 docs/_static/default.css
@@ -0,0 +1,760 @@
+/**
+ * Sphinx stylesheet -- basic theme
+ * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ */
+ h3 {
+ color:#000000;
+ font-size: 17px;
+ margin-bottom:0.5em;
+ margin-top:2em;
+ }
+/* -- main layout ----------------------------------------------------------- */
+
+div.clearer {
+ clear: both;
+}
+
+/* -- header ---------------------------------------------------------------- */
+
+#header #title {
+ background:#29334F url(title_background.png) repeat-x scroll 0 0;
+ border-bottom:1px solid #B6B6B6;
+ height:25px;
+ overflow:hidden;
+}
+#headerButtons {
+ position: absolute;
+ list-style: none outside;
+ top: 26px;
+ left: 0px;
+ right: 0px;
+ margin: 0px;
+ padding: 0px;
+ border-top: 1px solid #2B334F;
+ border-bottom: 1px solid #EDEDED;
+ height: 20px;
+ font-size: 8pt;
+ overflow: hidden;
+ background-color: #D8D8D8;
+}
+
+#headerButtons li {
+ background-repeat:no-repeat;
+ display:inline;
+ margin-top:0;
+ padding:0;
+}
+
+.headerButton {
+ display: inline;
+ height:20px;
+}
+
+.headerButton a {
+ text-decoration: none;
+ float: right;
+ height: 20px;
+ padding: 4px 15px;
+ border-left: 1px solid #ACACAC;
+ font-family:'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
+ color: black;
+}
+.headerButton a:hover {
+ color: white;
+ background-color: #787878;
+
+}
+
+li#toc_button {
+ text-align:left;
+}
+
+li#toc_button .headerButton a {
+ width:198px;
+ padding-top: 4px;
+ font-family:'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
+ color: black;
+ float: left;
+ padding-left:15px;
+ border-right:1px solid #ACACAC;
+ background:transparent url(triangle_open.png) no-repeat scroll 4px 6px;
+}
+
+li#toc_button .headerButton a:hover {
+ background-color: #787878;
+ color: white;
+}
+
+li#page_buttons {
+position:absolute;
+right:0;
+}
+
+#breadcrumbs {
+ color: black;
+ background-image:url(breadcrumb_background.png);
+ border-top:1px solid #2B334F;
+ bottom:0;
+ font-size:10px;
+ height:15px;
+ left:0;
+ overflow:hidden;
+ padding:3px 10px 0;
+ position:absolute;
+ right:0;
+ white-space:nowrap;
+ z-index:901;
+}
+#breadcrumbs a {
+ color: black;
+ text-decoration: none;
+}
+#breadcrumbs a:hover {
+ text-decoration: underline;
+}
+#breadcrumbs img {
+ padding-left: 3px;
+}
+/* -- sidebar --------------------------------------------------------------- */
+#sphinxsidebar {
+ position: absolute;
+ top: 84px;
+ bottom: 19px;
+ left: 0px;
+ width: 229px;
+ background-color: #E4EBF7;
+ border-right: 1px solid #ACACAC;
+ border-top: 1px solid #2B334F;
+ overflow-x: hidden;
+ overflow-y: auto;
+ padding: 0px 0px 0px 0px;
+ font-size:11px;
+}
+
+div.sphinxsidebarwrapper {
+ padding: 10px 5px 0 10px;
+}
+
+#sphinxsidebar li {
+ margin: 0px;
+ padding: 0px;
+ font-weight: normal;
+ margin: 0px 0px 7px 0px;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ font-size: 11px;
+}
+
+#sphinxsidebar ul {
+ list-style: none;
+ margin: 0px 0px 0px 0px;
+ padding: 0px 5px 0px 5px;
+}
+
+#sphinxsidebar ul ul,
+#sphinxsidebar ul.want-points {
+ list-style: square;
+}
+
+#sphinxsidebar ul ul {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+#sphinxsidebar form {
+ margin-top: 10px;
+}
+
+#sphinxsidebar input {
+ border: 1px solid #787878;
+ font-family: sans-serif;
+ font-size: 1em;
+}
+
+img {
+ border: 0;
+}
+
+#sphinxsidebar li.toctree-l1 a {
+ font-weight: bold;
+ color: #000;
+ text-decoration: none;
+}
+
+#sphinxsidebar li.toctree-l2 a {
+ font-weight: bold;
+ color: #4f4f4f;
+ text-decoration: none;
+}
+
+/* -- search page ----------------------------------------------------------- */
+
+ul.search {
+ margin: 10px 0 0 20px;
+ padding: 0;
+}
+
+ul.search li {
+ padding: 5px 0 5px 20px;
+ background-image: url(file.png);
+ background-repeat: no-repeat;
+ background-position: 0 7px;
+}
+
+ul.search li a {
+ font-weight: bold;
+}
+
+ul.search li div.context {
+ color: #888;
+ margin: 2px 0 0 30px;
+ text-align: left;
+}
+
+ul.keywordmatches li.goodmatch a {
+ font-weight: bold;
+}
+#sphinxsidebar input.prettysearch {border:none;}
+input.searchbutton {
+ float: right;
+}
+.search-wrapper {width: 100%; height: 25px;}
+.search-wrapper input.prettysearch { border: none; width:200px; height: 16px; background: url(searchfield_repeat.png) center top repeat-x; border: 0px; margin: 0; padding: 3px 0 0 0; font: 11px "Lucida Grande", "Lucida Sans Unicode", Arial, sans-serif; }
+.search-wrapper input.prettysearch { width: 184px; margin-left: 20px; *margin-top:-1px; *margin-right:-2px; *margin-left:10px; }
+.search-wrapper .search-left { display: block; position: absolute; width: 20px; height: 19px; background: url(searchfield_leftcap.png) left top no-repeat; }
+.search-wrapper .search-right { display: block; position: relative; left: 204px; top: -19px; width: 10px; height: 19px; background: url(searchfield_rightcap.png) right top no-repeat; }
+
+/* -- index page ------------------------------------------------------------ */
+
+table.contentstable {
+ width: 90%;
+}
+
+table.contentstable p.biglink {
+ line-height: 150%;
+}
+
+a.biglink {
+ font-size: 1.3em;
+}
+
+span.linkdescr {
+ font-style: italic;
+ padding-top: 5px;
+ font-size: 90%;
+}
+
+/* -- general index --------------------------------------------------------- */
+
+table.indextable td {
+ text-align: left;
+ vertical-align: top;
+}
+
+table.indextable dl, table.indextable dd {
+ margin-top: 0;
+ margin-bottom: 0;
+}
+
+table.indextable tr.pcap {
+ height: 10px;
+}
+
+table.indextable tr.cap {
+ margin-top: 10px;
+ background-color: #f2f2f2;
+}
+
+img.toggler {
+ margin-right: 3px;
+ margin-top: 3px;
+ cursor: pointer;
+}
+
+/* -- general body styles --------------------------------------------------- */
+.document {
+ border-top:1px solid #2B334F;
+ overflow:auto;
+ padding-left:2em;
+ padding-right:2em;
+ position:absolute;
+ z-index:1;
+ top:84px;
+ bottom:19px;
+ right:0;
+ left:230px;
+}
+
+a.headerlink {
+ visibility: hidden;
+}
+
+h1:hover > a.headerlink,
+h2:hover > a.headerlink,
+h3:hover > a.headerlink,
+h4:hover > a.headerlink,
+h5:hover > a.headerlink,
+h6:hover > a.headerlink,
+dt:hover > a.headerlink {
+ visibility: visible;
+}
+
+div.body p.caption {
+ text-align: inherit;
+}
+
+div.body td {
+ text-align: left;
+}
+
+.field-list ul {
+ padding-left: 1em;
+}
+
+.first {
+ margin-top: 0 !important;
+}
+
+p.rubric {
+ margin-top: 30px;
+ font-weight: bold;
+}
+
+/* -- sidebars -------------------------------------------------------------- */
+
+/*div.sidebar {
+ margin: 0 0 0.5em 1em;
+ border: 1px solid #ddb;
+ padding: 7px 7px 0 7px;
+ background-color: #ffe;
+ width: 40%;
+ float: right;
+}
+
+p.sidebar-title {
+ font-weight: bold;
+}
+*/
+/* -- topics ---------------------------------------------------------------- */
+
+div.topic {
+ border: 1px solid #ccc;
+ padding: 7px 7px 0 7px;
+ margin: 10px 0 10px 0;
+}
+
+p.topic-title {
+ font-size: 1.1em;
+ font-weight: bold;
+ margin-top: 10px;
+}
+
+/* -- admonitions ----------------------------------------------------------- */
+.admonition {
+ border: 1px solid #a1a5a9;
+ background-color: #f7f7f7;
+ margin: 20px;
+ padding: 0px 8px 7px 9px;
+ text-align: left;
+}
+.warning {
+ background-color:#E8E8E8;
+ border:1px solid #111111;
+ margin:30px;
+}
+.admonition p {
+ font: 12px 'Lucida Grande', Geneva, Helvetica, Arial, sans-serif;
+ margin-top: 7px;
+ margin-bottom: 0px;
+}
+
+div.admonition dt {
+ font-weight: bold;
+}
+
+div.admonition dl {
+ margin-bottom: 0;
+}
+
+p.admonition-title {
+ margin: 0px 10px 5px 0px;
+ font-weight: bold;
+ padding-top: 3px;
+}
+
+div.body p.centered {
+ text-align: center;
+ margin-top: 25px;
+}
+
+/* -- tables ---------------------------------------------------------------- */
+
+table.docutils {
+ border-collapse: collapse;
+ border-top: 1px solid #919699;
+ border-left: 1px solid #919699;
+ border-right: 1px solid #919699;
+ font-size:12px;
+ padding:8px;
+ text-align:left;
+ vertical-align:top;
+}
+
+table.docutils td, table.docutils th {
+ padding: 8px;
+ font-size: 12px;
+ text-align: left;
+ vertical-align: top;
+ border-bottom: 1px solid #919699;
+}
+
+table.docutils th {
+ font-weight: bold;
+}
+/* This alternates colors in up to six table rows (light blue for odd, white for even)*/
+.docutils tr {
+ background: #F0F5F9;
+}
+
+.docutils tr + tr {
+ background: #FFFFFF;
+}
+
+.docutils tr + tr + tr {
+ background: #F0F5F9;
+}
+
+.docutils tr + tr + tr + tr {
+ background: #FFFFFF;
+}
+
+.docutils tr + tr + tr +tr + tr {
+ background: #F0F5F9;
+}
+
+.docutils tr + tr + tr + tr + tr + tr {
+ background: #FFFFFF;
+}
+
+.docutils tr + tr + tr + tr + tr + tr + tr {
+ background: #F0F5F9;
+}
+
+table.footnote td, table.footnote th {
+ border: 0 !important;
+}
+
+th {
+ text-align: left;
+ padding-right: 5px;
+}
+
+/* -- other body styles ----------------------------------------------------- */
+
+dl {
+ margin-bottom: 15px;
+}
+
+dd p {
+ margin-top: 0px;
+ font-size: 12px;
+}
+
+dd ul, dd table {
+ margin-bottom: 10px;
+}
+
+dd {
+ margin-top: 3px;
+ margin-bottom: 10px;
+ margin-left: 30px;
+ font-size: 12px;
+}
+
+dt:target, .highlight {
+ background-color: #fbe54e;
+}
+
+dl.glossary dt {
+ font-weight: bold;
+ font-size: 0.8em;
+}
+
+dl.glossary dd {
+ font-size:12px;
+}
+.field-list ul {
+ vertical-align: top;
+ margin: 0;
+ padding-bottom: 0;
+ list-style: none inside;
+}
+
+.field-list ul li {
+ margin-top: 0;
+}
+
+.field-list p {
+ margin: 0;
+}
+
+.refcount {
+ color: #060;
+}
+
+.optional {
+ font-size: 1.3em;
+}
+
+.versionmodified {
+ font-style: italic;
+}
+
+.system-message {
+ background-color: #fda;
+ padding: 5px;
+ border: 3px solid red;
+}
+
+.footnote:target {
+ background-color: #ffa
+}
+
+/* -- code displays --------------------------------------------------------- */
+
+pre {
+ overflow: auto;
+ background-color:#F1F5F9;
+ border:1px solid #C9D1D7;
+ border-spacing:0;
+ font-family:"Bitstream Vera Sans Mono",Monaco,"Lucida Console",Courier,Consolas,monospace;
+ font-size:11px;
+ padding: 10px;
+}
+
+td.linenos pre {
+ padding: 5px 0px;
+ border: 0;
+ background-color: transparent;
+ color: #aaa;
+}
+
+table.highlighttable {
+ margin-left: 0.5em;
+}
+
+table.highlighttable td {
+ padding: 0 0.5em 0 0.5em;
+}
+
+tt {
+ font-family:"Bitstream Vera Sans Mono",Monaco,"Lucida Console",Courier,Consolas,monospace;
+
+}
+
+tt.descname {
+ background-color: transparent;
+ font-weight: bold;
+ font-size: 1em;
+}
+
+tt.descclassname {
+ background-color: transparent;
+}
+
+tt.xref, a tt {
+ background-color: transparent;
+ font-weight: bold;
+}
+
+h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
+ background-color: transparent;
+}
+
+/* -- math display ---------------------------------------------------------- */
+
+img.math {
+ vertical-align: middle;
+}
+
+div.body div.math p {
+ text-align: center;
+}
+
+span.eqno {
+ float: right;
+}
+
+/* -- printout stylesheet --------------------------------------------------- */
+
+@media print {
+ div.document,
+ div.documentwrapper,
+ div.bodywrapper {
+ margin: 0;
+ width: 100%;
+ }
+
+ div.sphinxsidebar,
+ div.related,
+ div.footer,
+ #top-link {
+ display: none;
+ }
+}
+
+body {
+ font-family:'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
+}
+
+dl.class dt {
+ padding: 3px;
+/* border-top: 2px solid #999;*/
+}
+
+em.property {
+ font-style: normal;
+}
+
+dl.class dd p {
+ margin-top: 6px;
+}
+
+dl.class dd dl.exception dt {
+ padding: 3px;
+ background-color: #FFD6D6;
+ border-top: none;
+}
+
+dl.class dd dl.method dt {
+ padding: 3px;
+ background-color: #e9e9e9;
+ border-top: none;
+
+}
+
+dl.function dt {
+ padding: 3px;
+ border-top: 2px solid #999;
+}
+
+ul {
+list-style-image:none;
+list-style-position:outside;
+list-style-type:square;
+margin:0 0 0 30px;
+padding:0 0 12px 6px;
+}
+#docstitle {
+ height: 36px;
+ background-image: url(header_sm_mid.png);
+ left: 0;
+ top: 0;
+ position: absolute;
+ width: 100%;
+}
+#docstitle p {
+ padding:7px 0 0 45px;
+ margin: 0;
+ color: white;
+ text-shadow:0 1px 0 #787878;
+ background: transparent url(documentation.png) no-repeat scroll 10px 3px;
+ height: 36px;
+ font-size: 15px;
+}
+#header {
+height:45px;
+left:0;
+position:absolute;
+right:0;
+top:36px;
+z-index:900;
+}
+
+#header h1 {
+font-size:10pt;
+margin:0;
+padding:5px 0 0 10px;
+text-shadow:0 1px 0 #D5D5D5;
+white-space:nowrap;
+}
+
+h1 {
+-x-system-font:none;
+color:#000000;
+font-family:'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
+font-size:30px;
+font-size-adjust:none;
+font-stretch:normal;
+font-style:normal;
+font-variant:normal;
+font-weight:bold;
+line-height:normal;
+margin-bottom:25px;
+margin-top:1em;
+}
+
+.footer {
+border-top:1px solid #DDDDDD;
+clear:both;
+padding-top:9px;
+width:100%;
+font-size:10px;
+}
+
+p {
+-x-system-font:none;
+font-family:'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
+font-size:12px;
+font-size-adjust:none;
+font-stretch:normal;
+font-style:normal;
+font-variant:normal;
+font-weight:normal;
+line-height:normal;
+margin-bottom:10px;
+margin-top:0;
+}
+
+h2 {
+border-bottom:1px solid #919699;
+color:#000000;
+font-size:24px;
+margin-top:2.5em;
+padding-bottom:2px;
+}
+
+a:link:hover {
+color:#093D92;
+text-decoration:underline;
+}
+
+a:link {
+color:#093D92;
+text-decoration:none;
+}
+
+
+ol {
+list-style-position:outside;
+list-style-type:decimal;
+margin:0 0 0 30px;
+padding:0 0 12px 6px;
+}
+li {
+margin-top:7px;
+font-family:'Lucida Grande',Geneva,Helvetica,Arial,sans-serif;
+font-size:12px;
+font-size-adjust:none;
+font-stretch:normal;
+font-style:normal;
+font-variant:normal;
+font-weight:normal;
+line-height:normal;
+}
+li > p {
+display:inline;
+}
+li p {
+margin-top:8px;
+}
BIN docs/_static/documentation.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN docs/_static/header_sm_mid.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN docs/_static/scrn1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN docs/_static/scrn2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN docs/_static/searchfield_leftcap.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN docs/_static/searchfield_repeat.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN docs/_static/searchfield_rightcap.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN docs/_static/title_background.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 docs/_static/toc.js
@@ -0,0 +1,20 @@
+var TOC = {
+ load: function () {
+ $('#toc_button').click(TOC.toggle);
+ },
+
+ toggle: function () {
+ if ($('#sphinxsidebar').toggle().is(':hidden')) {
+ $('div.document').css('left', "0px");
+ $('toc_button').removeClass("open");
+ } else {
+ $('div.document').css('left', "230px");
+ $('#toc_button').addClass("open");
+ }
+ return $('#sphinxsidebar');
+ }
+};
+
+$(document).ready(function () {
+ TOC.load();
+});
BIN docs/_static/triangle_closed.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN docs/_static/triangle_left.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
BIN docs/_static/triangle_open.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
144 docs/_templates/layout.html
@@ -0,0 +1,144 @@
+{% extends "basic/layout.html" %}
+{%- block doctype -%}
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+{%- endblock %}
+{%- set reldelim1 = reldelim1 is not defined and ' &raquo;' or reldelim1 %}
+{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %}
+{%- block linktags %}
+ {%- if hasdoc('about') %}
+ <link rel="author" title="{{ _('About these documents') }}" href="{{ pathto('about') }}" />
+ {%- endif %}
+ {%- if hasdoc('genindex') %}
+ <link rel="index" title="{{ _('Index') }}" href="{{ pathto('genindex') }}" />
+ {%- endif %}
+ {%- if hasdoc('search') %}
+ <link rel="search" title="{{ _('Search') }}" href="{{ pathto('search') }}" />
+ {%- endif %}
+ {%- if hasdoc('copyright') %}
+ <link rel="copyright" title="{{ _('Copyright') }}" href="{{ pathto('copyright') }}" />
+ {%- endif %}
+ <link rel="top" title="{{ docstitle|e }}" href="{{ pathto('index') }}" />
+ {%- if parents %}
+ <link rel="up" title="{{ parents[-1].title|striptags }}" href="{{ parents[-1].link|e }}" />
+ {%- endif %}
+ {%- if next %}
+ <link rel="next" title="{{ next.title|striptags }}" href="{{ next.link|e }}" />
+ {%- endif %}
+ {%- if prev %}
+ <link rel="prev" title="{{ prev.title|striptags }}" href="{{ prev.link|e }}" />
+ {%- endif %}
+{%- endblock %}
+{%- block extrahead %} {% endblock %}
+{%- block header %}{% endblock %}
+{%- block relbar1 %}
+<div id="docstitle">
+ <p>{{docstitle}}</p>
+</div>
+<div id="header">
+ <div id="title"><h1>{{ title|striptags }}</h1></div>
+ <ul id="headerButtons">
+ <li id="toc_button"><div class="headerButton"><a href="#">Table of Contents</a></div></li>
+ <li id="page_buttons">
+ {%- for rellink in rellinks %}
+ <div class="headerButton"><a href="{{ pathto(rellink[0]) }}" title="{{ rellink[1]|striptags }}" {{ accesskey(rellink[2]) }}>{{ rellink[3] }}</a></div>
+ {%- endfor %}
+ </li>
+ </ul>
+</div>
+{% endblock %}
+
+{%- block sidebar1 %}
+{%- if not embedded %}{% if not theme_nosidebar|tobool %}
+<div id="sphinxsidebar">
+ <div class="sphinxsidebarwrapper">
+ {%- block sidebarlogo %}
+ {%- if logo %}
+ <p class="logo"><a href="{{ pathto(master_doc) }}">
+ <img class="logo" src="{{ pathto('_static/' + logo, 1) }}" alt="Logo"/>
+ </a></p>
+ {%- endif %}
+ {%- endblock %}
+ {%- block sidebartoc %}
+ <ul><li class="toctree-l1"><a href="{{ pathto(master_doc) }}">{{ _('Main Page') }}</a></li></ul>
+ {{ toctree() }}
+ {%- endblock %}
+ {%- block sidebarrel %}
+ {%- endblock %}
+ {%- block sidebarsourcelink %}
+ {%- if show_source and has_source and sourcename %}
+ <h3>{{ _('This Page') }}</h3>
+ <ul class="this-page-menu">
+ <li><a href="{{ pathto('_sources/' + sourcename, true)|e }}"
+ rel="nofollow">{{ _('Show Source') }}</a></li>
+ </ul>
+ {%- endif %}
+ {%- endblock %}
+ {%- if customsidebar %}
+ {% include customsidebar %}
+ {%- endif %}
+ {%- block sidebarsearch %}
+ {%- if pagename != "search" %}
+ <div id="searchbox" style="display: none">
+ {# <h3>{{ _('Quick search') }}</h3> #}
+ <form class="search" action="{{ pathto('search') }}" method="get">
+ <div class="search-wrapper">
+ <span class="search-left"></span>
+ <input class="prettysearch" type="text" name="q" size="18" />
+ <span class="search-right">&nbsp;</span>
+ </div>
+ <input type="submit" value="{{ _('Search') }}" class="searchbutton" />
+ <input type="hidden" name="check_keywords" value="yes" />
+ <input type="hidden" name="area" value="default" />
+ </form>
+ <p class="searchtip" style="font-size: 90%">
+ {{ _('Enter search terms or a module, class or function name.') }}
+ </p>
+ </div>
+ <script type="text/javascript">$('#searchbox').show(0);</script>
+ {%- endif %}
+ {%- endblock %}
+ </div>
+</div>
+{%- endif %}{% endif %}
+
+{% endblock %}
+{%- block document %}
+ <div class="documentwrapper">
+ {%- if not embedded %}{% if not theme_nosidebar|tobool %}
+ <div class="bodywrapper">
+ {%- endif %}{% endif %}
+ <div class="body">
+ {% block body %} {% endblock %}
+ </div>
+ {%- if not embedded %}{% if not theme_nosidebar|tobool %}
+ </div>
+ {%- endif %}{% endif %}
+ </div>
+ <div class="footer">
+ <p>{%- if hasdoc('copyright') %}
+ {% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}.{% endtrans %}
+ {%- else %}
+ {% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}.{% endtrans %}
+ {%- endif %}
+ {%- if last_updated %}
+ {% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
+ {%- endif %}
+ {%- if show_sphinx %}
+ {% trans sphinx_version=sphinx_version|e %}Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> {{ sphinx_version }}.{% endtrans %}
+ {%- endif %}
+ </p>
+ </div>
+{%- endblock %}
+{%- block sidebar2 %}{% endblock %}
+{%- block relbar2 %}{% endblock %}
+{%- block footer %}
+ <div id="breadcrumbs">
+ {%- for parent in parents %}
+ <a href="{{ parent.link|e }}" {{ accesskey("U") }}>{{ parent.title|safe }}</a><img src="{{ pathto('_static/triangle_closed.png', 1) }}" height="9" width="9" alt="&gt;">
+ {%- endfor %}
+ {{ title|safe|e }}
+ </ul>
+ </div>
+ <script type="text/javascript" charset="utf-8" src="{{ pathto('_static/toc.js', 1) }}"></script>
+{%- endblock %}
195 docs/conf.py
@@ -0,0 +1,195 @@
+# -*- coding: utf-8 -*-
+#
+# app documentation build configuration file, created by
+# sphinx-quickstart on Wed Oct 21 13:18:22 2009.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+sys.path.append(os.path.abspath('..'))
+os.environ['DJANGO_SETTINGS_MODULE'] = 'example.settings'
+
+# -- General configuration -----------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.autodoc']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'ePub Creator'
+copyright = u'2009, The Washington Times'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '0.1'
+# The full version, including alpha/beta/rc tags.
+release = '0.1'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directory, that shouldn't be searched
+# for source files.
+exclude_trees = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. Major themes that come with
+# Sphinx are currently 'default' and 'sphinxdoc'.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_use_modindex = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+html_show_sourcelink = False
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'epubdoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+ ('index', 'app.tex', u'epub Documentation',
+ u'me', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True
22 docs/index.rst
@@ -0,0 +1,22 @@
+==============
+ePub Generator
+==============
+
+Contents:
+
+.. toctree::
+ :maxdepth: 2
+ :glob:
+
+ tutorial
+ metadata
+ templates
+ reference/index
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
113 docs/make.bat
@@ -0,0 +1,113 @@
+@ECHO OFF
+
+REM Command file for Sphinx documentation
+
+set SPHINXBUILD=sphinx-build
+set BUILDDIR=_build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
+if NOT "%PAPER%" == "" (
+ set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+ :help
+ echo.Please use `make ^<target^>` where ^<target^> is one of
+ echo. html to make standalone HTML files
+ echo. dirhtml to make HTML files named index.html in directories
+ echo. pickle to make pickle files
+ echo. json to make JSON files
+ echo. htmlhelp to make HTML files and a HTML help project
+ echo. qthelp to make HTML files and a qthelp project
+ echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+ echo. changes to make an overview over all changed/added/deprecated items
+ echo. linkcheck to check all external links for integrity
+ echo. doctest to run all doctests embedded in the documentation if enabled
+ goto end
+)
+
+if "%1" == "clean" (
+ for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+ del /q /s %BUILDDIR%\*
+ goto end
+)
+
+if "%1" == "html" (
+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+ goto end
+)
+
+if "%1" == "dirhtml" (
+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+ goto end
+)
+
+if "%1" == "pickle" (
+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+ echo.
+ echo.Build finished; now you can process the pickle files.
+ goto end
+)
+
+if "%1" == "json" (
+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+ echo.
+ echo.Build finished; now you can process the JSON files.
+ goto end
+)
+
+if "%1" == "htmlhelp" (
+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+ echo.
+ echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+ goto end
+)
+
+if "%1" == "qthelp" (
+ %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+ echo.
+ echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+ echo.^> qcollectiongenerator %BUILDDIR%\qthelp\app.qhcp
+ echo.To view the help file:
+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\app.ghc
+ goto end
+)
+
+if "%1" == "latex" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ echo.
+ echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "changes" (
+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+ echo.
+ echo.The overview file is in %BUILDDIR%/changes.
+ goto end
+)
+
+if "%1" == "linkcheck" (
+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+ echo.
+ echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+ goto end
+)
+
+if "%1" == "doctest" (
+ %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+ echo.
+ echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+ goto end
+)
+
+:end
192 docs/metadata.rst
@@ -0,0 +1,192 @@
+.. _metadata:
+
+========
+Metadata
+========
+
+Metadata for a publication is handled by the :class:`EPubMetadata` class. When you instantiate an :class:`EPub` object, an empty :class:`EPubMetadata` object is created with default values for the required elements: ``title``, ``indicator``, ``language``.
+
+There are several standard metadata tags:
+
+* `title <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.1>`_
+ *Required.* The title of the publication. Although the specification allows
+ for more than one ``title`` element, we only allow one. ::
+
+ epub = EPub()
+ epub.metadata.title = 'My Cool Publication'
+
+* `creator <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.2>`_
+ *Optional.* A primary creator or author of this publication, with each
+ person in their own element. For publications with multiple articles, the
+ authors should be listed as ``contributor`` elements (in fact :class:`EPub`
+ will do it for you when you add an article).
+
+ There are two *optional* attributes: ``file_as`` and ``role``. The
+ ``file-as`` attribute is to specify a normalized form of the contents,
+ suitable for machine processing. ``EPubMetadata`` attempts to convert the
+ value to a ``lastname, firstname`` format if the attribute is not specified.
+
+ The ``role`` attribute must be one of those listed `in the specification <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.6>`_. It defaults to ``aut``. ::
+
+ epub = EPub()
+ epub.metadata.add_creator('Rev. Dr. Martin Luther King Jr.')
+ # The resulting element would look like:
+ # <dc:creator opf:file-as="King Jr, Rev Dr Martin Luther" opf:role="aut">
+ # Rev. Dr. Martin Luther King Jr.
+ # </dc:creator>
+ epub.metadata.add_creator('Jean Claude Van Damme', file_as='Van Damme, J C', role='edt')
+ # The resulting element would look like:
+ # <dc:creator opf:file-as="Van Damme, J C" opf:role="edt">
+ # Jean Claude Van Damme
+ # </dc:creator>
+
+* `subject <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.3>`_
+ *Optional.* Arbitrary keywords or phrases describing what the publication is
+ about. ::
+
+ epub = EPub()
+ epub.metadata.add_subject('Entertainment')
+ epub.metadata.add_subject('Mary Poppins')
+
+* `description <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.4>`_
+ *Optional.* The description of the publication's content. ::
+
+ epub = EPub()
+ epub.metadata.description = "An exposé of the immoral events leading to the tragic death of Mary Poppins."
+
+* `publisher <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.5>`_
+ *Optional.* An entity responsible for making the resource available.
+ Examples of ``publisher`` include a person, organization, or service. ::
+
+ epub = EPub()
+ epub.publisher = "The Daily Times, LLC"
+
+* `contributor <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.6>`_
+ *Optional.* Contributors are identical to creators, only implying less
+ significance in contribution to the whole work. There can be more than one,
+ and they have ``file_as`` and ``role`` attributes, which have the same
+ defaults as the ``creator`` element.
+
+ When you add an article with :meth:`EPub.add_article()` and specify an
+ ``author``, a ``contributor`` element is added automatically. ::
+
+ epub = EPub()
+ epub.add_article(title='Awesome Article', content=my_content_var, author='Johnny Appleseed')
+ # A contributor element is added for Johnny Appleseed with a role of 'aut'
+
+ epub.metadata.add_contributor('P T Barnum', role='ill')
+ # Adds an illustrator contributor of Barnum, P T
+
+* `date <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.7>`_
+ *Optional.* The date of publication, in the form ``YYYY`` or ``YYYY-MM`` or
+ ``YYYY-MM-DD``. The optional ``event`` attribute can specify: ``creation``,
+ ``publication``, or ``modification``. The :class:`EPubMetadata` has three
+ attributes that serve as shortcuts to setting and getting specific events:
+ ``EPubMetadata.creation_date``, ``EPubMetadata.modification_date``, and
+ ``EPubMetadata.publication_date``. ::
+
+ epub = EPub()
+ epub.metadata.add_date('2009-01-01')
+ # Sets a generic publication date
+ epub.metadata.add_date('2008-05', event='creation')
+ # Sets a creation date
+ epub.metadata.creation_date
+ # returns '2008-05'
+ epub.metadata.modification_date = '2010'
+ # Same as: epub.metadata.add_date('2010', event='modification')
+
+* `type <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.8>`_
+ *Optional.* The nature or genre of the content of the resource. Type
+ includes terms describing general categories, functions, genres, or
+ aggregation levels for content. Wikipedia has a list of
+ `literary genres <http://en.wikipedia.org/wiki/Literary_genre>`_. To
+ describe the physical or digital manifestation of the resource, use the
+ ``format`` element. ::
+
+ epub = EPub()
+ epub.metadata.add_type('Fiction')
+ epub.metadata.add_type('Comedy')
+ epub.metadata.add_type('Romance')
+
+* `format <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.9>`_
+ *Optional.* The specifications say "The media type or dimensions of
+ the resource. and suggest using MIME types. It doesn't make any sense
+ to me. I'd recommend not using this. ::
+
+ epub = EPub()
+ epub.metadata.format = 'US Letter'
+
+* `identifier <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.10>`_
+ *Required.* A string or number used to uniquely identify the resource. One
+ set up for you at the creation of the :class:`EPub` object. You can override
+ this with :meth:`EPub.metadata.set_unique_id`. The unique id requires one
+ attribute, ``id``, which is unique across all publication ``identifier``
+ elements, and optionally a ``scheme`` attribute to identify the system or
+ authority that assigned or created the value of the identifier (ISBN, uuid,
+ URL, etc.)
+
+ You can add additional ``identifier`` elements with or without the ``id``
+ and ``scheme`` attributes. ::
+
+ epub = EPub()
+ epub.metadata.unique_id
+ # returns the automatically generated id as a dictionary.
+ epub.metadata.set_unique_id('1-60239-243-9', id='BookId', scheme='ISBN')
+ epub.metadata.add_identifier('978-1-60239-243-9', scheme='ISBN-13')
+
+* `source <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.11>`_
+ *Optional.* If this publication was derived from a prior resource, indicate
+ from which resource it was derived using a formal identification system. ::
+
+ epub = EPub()
+ epub.metadata.source = 'http://www.example.com/booknotes/'
+
+* `language <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.12>`_
+ *Required.* By default it is set to ``en``. You can change it to any two- or
+ three-letter value in `ISO 639.2 <http://www.loc.gov/standards/iso639-2/langhome.html>`_ and you can add a two-
+ letter `country abbrviation <http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm>`_ to specify a country-specific dialect such as ``en-US`` or ``en-GB``. ::
+
+ epub = EPub()
+ epub.metadata.language = 'fr-CA'
+
+* `relation <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.13>`_
+ *Optional.* An identifier of an auxiliary resource and its relationship to
+ the publication. There can be more than one ``relation`` element. ::
+
+ epub = EPub()
+ epub.metadata.add_relation('http://www.example.com/errata.html')
+ epub.metadata.add_relation('ISBN:1-60239-243-9')
+
+* `coverage <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.14>`_
+ *Optional.* Typically, coverage will include spatial location (a place name
+ or geographic coordinates), temporal period (a period label, date, or date
+ range) or jurisdiction (such as a named administrative entity). Recommended
+ best practice is to select a value from a controlled vocabulary (for
+ example, the `Thesaurus of Geographic Names <http://www.getty.edu/research/tools/vocabulary/tgn/index.html>`_) and to use, where
+ appropriate, named places or time periods in preference to numeric
+ identifiers such as sets of coordinates or date ranges. ::
+
+ epub = EPub()
+ epub.metadata.coverage = 'Italy, 1440-1560'
+
+* `rights <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.15>`_
+ *Optional.* A statement about rights held in and over the publication.
+ Rights information often encompasses Intellectual Property Rights (IPR),
+ Copyright, and various Property Rights. ::
+
+ epub = EPub()
+ epub.metadata.rights = 'Copyright © 2009 by Digital Times, LLC. All rights reserved.'
+
+
+* `meta <http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2>`_
+ *Optional.* This is the catch-all metadata tag. Anything not specified
+ above, can be specified here, as long as it applies to the whole
+ publication.
+
+ When adding the meta information, you must specify the name of the metadata
+ and the content of the metadata ::
+
+ epub = EPub()
+ epub.metadata.add_meta(name="price", currency="USD", value="9.99")
+ # The tag generated is: <meta name="price" content="USD 9.99" />
+
3 docs/reference/index.rst
@@ -0,0 +1,3 @@
+=========
+Reference
+=========
5 docs/templates.rst
@@ -0,0 +1,5 @@
+.. _templates:
+
+=========
+Templates
+=========
108 docs/tutorial.rst
@@ -0,0 +1,108 @@
+==========================
+Tutorial: Creating an ePub
+==========================
+
+An ePub is really just a bunch of files compressed using zip. Unfortunately, the files are XML and XML is a bit ... particular. We have attempted to make the process as easy as possible.
+
+Things you need to worry about
+==============================
+
+Much of the details of the ePub are handled for you, but not everything. Here are a few things to think about:
+
+**Metadata.** There are three pieces of required metadata: title, language and a unique id. These pieces of metadata are set to reasonable defaults. Look at the section on :ref:`metadata` for more information.
+
+**Templates.** The actual content of the ePub is in XHTML, formatted with CSS. Although you can override the templates for all the files that are used in the ePub, there are three you should be concerned about: ``article.html``, ``contents.html`` and ``title_page.html``. These templates are discussed in the :ref:`templates` section below.
+
+
+Download ePub Generator
+=======================
+
+Get into a terminal or command line
+git clone ...
+download from github
+
+
+Setting up the tutorial environment
+===================================
+
+We are going to start by setting up an isolated python environment. If you haven't installed ``virtualenv`` and ``virtualenvwrapper``, install them from the terminal prompt. ::
+
+ easy_install virtualenv
+ easy_install virtualenvwrapper
+
+Add the following lines to your ~/.profile (or wherever it might go on windows)::
+
+ export WORKON_HOME=\$HOME/.virtualenvs
+ source /usr/local/bin/virtualenvwrapper_bashrc
+
+Change into the epub project directory that you downloaded. ::
+
+ cd epub
+
+Now we are going to make the virtual environment::
+
+ mkvirtualenv --no-site-packages epub
+
+You now have created a new virtualenv that is isolated from your normal python installation. Your command prompt should have ``(epub)`` in front of it. That means you are using the isolated environment. Let's install Django to get things going::
+
+ easy_install django
+
+Change directories to the example project and create the database. Answer all the questions for creating the superuser::
+
+ cd example
+ python manage.py syncdb
+
+Finally we'll load some sample data::
+
+ python manage.py loaddata stories.json
+
+
+Creating the ePub
+=================
+
+We'll do this from the python shell, although you could just as easily create a script for this. ::
+
+ python manage.py shell
+
+Start by importing a few models and modules. We'll use the ``os`` module and the Django ``settings`` module to create some paths. The ``EPub`` and ``Story`` models are for the actual creation of the ePub. ::
+
+ import os
+ from django.conf import settings
+ from epub.models import EPub
+ from simplestory.models import Story
+
+Here are some paths we'll need later on. The ``img_path`` is the path for a Scalable Vector Graphic (SVG) logo that we'll embed. ``final_path`` is where the final ePub will be saved::
+
+ img_path = os.path.abspath(os.path.join(settings.APP,'example','simplestory','fixtures','dailytimes.svg'))
+ final_path = os.path.abspath(os.path.join(settings.APP,'example','testpub.epub'))
+
+Create an empty :class:`EPub` object::
+
+ e = EPub()
+
+We'll set some of the metadata for this publication::
+
+ e.metadata.title = "The Daily Times for Today"
+ e.metadata.publisher = "Daily Times Publishing Inc"
+ e.metadata.language = 'en-US'
+ e.metadata.add_date('2009-07-05')
+ e.metadata.add_date('2009-07-04', event="creation")
+ e.metadata.modification_date = '2009-08-08'
+ e.metadata.add_subject("Zombies")
+ e.metadata.add_subject("Apocolypse")
+ e.metadata.add_subject("Teen Angst")
+ e.metadata.add_meta('price', 'USD 9.99')
+
+The ePub format allows for the embedding of images. The image file is copied into the final document. Your XHTML documents can reference it using ``../images/filename.jpg``. The :meth:`EPub.add_image` method requires a path to the original file. It also allows a ``name`` parameter if you want to rename the file. The The :meth:`EPub.add_image` method tries to guess the MIME type of the file passed in, but you can override this by passing a ``mimetype`` parameter::
+
+ e.add_image(img_path, name='logo.svg')
+
+Adding the articles or chapters is very straightforward. The :meth:`EPub.add_article` method has two required parameters: ``title`` and ``content``, and two optional parameters: ``filename`` and ``author``. If the ``filename`` is left off, the ``title`` is modified to become the name of the file. If the ``author`` is included, the value is added as a ``contributor``. Here we get all the :class:`Story` objects, loop through them and add each to the publication::
+
+ s = Story.objects.all()
+ for item in s:
+ e.add_article(item.headline, item, item.slug+".html", item.byline)
+
+At last we generate the actual ePub::
+
+ e.generate_epub(final_path)
0 epub/__init__.py
No changes.
1 epub/admin.py
@@ -0,0 +1 @@
+from django.contrib import admin
19 epub/bin/epubcheck-1.0.3/COPYING.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2007 Adobe Systems Incorporated
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
61 epub/bin/epubcheck-1.0.3/README.txt
@@ -0,0 +1,61 @@
+This folder contains the distribution of epubcheck project.
+
+EpubCheck is a tool to validate IDPF Epub files. It can detect many
+types of errors in Epub. OCF container structure, OPF and OPS mark-up,
+and internal reference consistency are checked. EpubCheck can be run
+as a standalone command-line tool, installed as a web application or
+used as a library.
+
+Epubcheck project home: http://code.google.com/p/epubcheck/
+
+BUILDING
+
+To build epubcheck from the sources you need Java Development Kit (JDK) 1.5 or above
+and Apache ant (http://ant.apache.org/) 1.6 or above installed
+
+Run
+
+ant -f build.xml
+
+RUNNING
+
+To run the tool you need Java Runtime (1.5 or above). Any OS should do. Run
+it from the command line:
+
+java -jar epubcheck-x.x.x.jar file.epub
+
+All detected errors are simply printed to stderr.
+
+USING AS A LIBRARY
+
+You can also use EpubCheck as a library in your Java application. EpubCheck
+public interfaces can be found in com.adobe.epubcheck.api package. EpubCheck
+class can be used to instantiate a validation engine. Use one of its
+constructors and then call validate() method. Report is an interface that
+you can implement to get a list of the errors and warnings reported by the
+validation engine (instead of the error list being printed out).
+
+LICENSING
+
+See COPYING.txt
+
+AUTHORS
+
+Peter Sorotokin
+Garth Conboy
+Markus Gylling
+Piotr Kula
+
+Most of the EpubCheck functionality comes from the schema validation tool Jing
+and schemas that were developed by IDPF and DAISY. EpubCheck development was
+largely done at Adobe Systems.
+
+
+
+
+
+
+
+
+
+
BIN epub/bin/epubcheck-1.0.3/epubcheck-1.0.3.jar
Binary file not shown.
12 epub/bin/epubcheck-1.0.3/jing_license.txt
@@ -0,0 +1,12 @@
+Jing Copying Conditions
+
+Copyright (c) 2001-2003 Thai Open Source Software Center Ltd
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of the Thai Open Source Software Center Ltd nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
BIN epub/bin/epubcheck-1.0.3/lib/saxon.jar
Binary file not shown.
19 epub/bin/epubpreflight-0.1.0/COPYING.txt
@@ -0,0 +1,19 @@
+Copyright (c) 2007 Adobe Systems Incorporated
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
61 epub/bin/epubpreflight-0.1.0/README.txt
@@ -0,0 +1,61 @@
+This folder contains the distribution of epubcheck project.
+
+EpubCheck is a tool to validate IDPF Epub files. It can detect many
+types of errors in Epub. OCF container structure, OPF and OPS mark-up,
+and internal reference consistency are checked. EpubCheck can be run
+as a standalone command-line tool, installed as a web application or
+used as a library.
+
+Epubcheck project home: http://code.google.com/p/epubcheck/
+
+BUILDING
+
+To build epubcheck from the sources you need Java Development Kit (JDK) 1.5 or above
+and Apache ant (http://ant.apache.org/) 1.6 or above installed
+
+Run
+
+ant -f build.xml
+
+RUNNING
+
+To run the tool you need Java Runtime (1.5 or above). Any OS should do. Run
+it from the command line:
+
+java -jar epubcheck-x.x.x.jar file.epub
+
+All detected errors are simply printed to stderr.
+
+USING AS A LIBRARY
+
+You can also use EpubCheck as a library in your Java application. EpubCheck
+public interfaces can be found in com.adobe.epubcheck.api package. EpubCheck
+class can be used to instantiate a validation engine. Use one of its
+constructors and then call validate() method. Report is an interface that
+you can implement to get a list of the errors and warnings reported by the
+validation engine (instead of the error list being printed out).
+
+LICENSING
+
+See COPYING.txt
+
+AUTHORS
+
+Peter Sorotokin
+Garth Conboy
+Markus Gylling
+Piotr Kula
+
+Most of the EpubCheck functionality comes from the schema validation tool Jing
+and schemas that were developed by IDPF and DAISY. EpubCheck development was
+largely done at Adobe Systems.
+
+
+
+
+
+
+
+
+
+
BIN epub/bin/epubpreflight-0.1.0/epubpreflight-0.1.0.jar
Binary file not shown.
12 epub/bin/epubpreflight-0.1.0/jing_license.txt
@@ -0,0 +1,12 @@
+Jing Copying Conditions
+
+Copyright (c) 2001-2003 Thai Open Source Software Center Ltd
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+ * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
+ * Neither the name of the Thai Open Source Software Center Ltd nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
BIN epub/bin/epubpreflight-0.1.0/lib/saxon.jar
Binary file not shown.
1 epub/forms.py
@@ -0,0 +1 @@
+from django import forms
0 epub/media/epub/placeholder.txt
No changes.
433 epub/models.py
@@ -0,0 +1,433 @@
+from django import template
+from django.template.loader import get_template
+
+common_second_words = ('al', 'da', 'de', 'del', 'dela', 'della', 'di', 'du', 'el', 'la', 'le', 'mc', 'o\'', 'san', 'st', 'sta', 'van', 'vande', 'vanden', 'vander', 'von',)
+common_third_words = ('van', 'de', )
+common_suffixes = ("jr", "sr", "ii", "iii", "iv", "md", "phd")
+def format_name(name):
+ """
+ Takes a name in the format ``first [middle/initial] last [suffix]`` and
+ returns it as ``last [suffix], first [middle/initial]``. Covers a wide variety
+ of names, but not guaranteed to be perfect.
+
+ The algorithm is:
+ 1. Normalize spacing and strip out periods and commas
+ 2. Split the name by spaces into a list
+ 2. If the last item is a suffix, merge it with the previous element
+ 3. Assume the last element is at least *part* of the last name: remove it from the list
+ 4. Assume the first element is at least *part* of the first name: remove it from the list
+ 5. If there are no more elements, return the lastname, firstname string
+ 6. If there are 2 or more elements left, and the second from the last item is in three-word-last-names: pop the last two elements off and add them to the last name
+ 7. If there is at least 1 element left, and the last item is in the two-word-last-names: pop the last element off and add it to the last name
+ 8. Anything left is assumed to be middle or compound first names, and added to the first name
+ 9. Return the last name, first name string
+ """
+ # strip out commas and periods
+ new_name = name.replace(u',',u'').replace(u'.',u'').replace(u' ', u' ')
+ new_name.strip()
+ # Split on spaces
+ pieces = new_name.split()
+
+ # Check for suffixes
+ if pieces[-1].lower() in common_suffixes:
+ suffix = pieces.pop(-1)
+ pieces[-1] = " ".join([pieces[-1], suffix])
+
+ # The last item is at least PART of the last name
+ last_name = pieces.pop(-1)
+
+ # The first item is at least PART of the first name
+ first_name = pieces.pop(0)
+
+ # Test for the easy 'firstname lastname' case
+ length = len(pieces)
+ if length == 0:
+ return u'%s, %s' % (last_name, first_name)
+
+ #check for 3-word last names, then 2-word last names
+ if length >= 2 and pieces[-2].lower() in common_third_words:
+ lname = [pieces.pop(-2), pieces.pop(-1), lastname]
+ last_name = " ".join(lname)
+ elif length >= 1 and pieces[-1].lower() in common_second_words:
+ last_name = " ".join([pieces.pop(-1), last_name])
+
+ # Anything else, put as middle name so add it to the first_name
+ if len(pieces) > 0:
+ first_name = " ".join([first_name,]+pieces)
+ return u'%s, %s' % (last_name, first_name)
+
+
+class EPubMetadata(object):
+ """
+ Manages the metadata for an :class:`EPubMetadata` object. It has some methods
+ to make things simpler and some basic error detecting.
+ """
+ # certain keys can have many items. They are stored as a list of items.
+ _has_many = ("identifier", "creator", "contributor", "subject", "relation", "date", "type", "meta")
+
+ # From http://www.idpf.org/2007/opf/OPF_2.0_final_spec.html#Section2.2.6
+ valid_roles = (
+ 'adp','ann','arr','art','asn','aut','aqt','aft','aui','ant','bkp','clb',
+ 'cmm','dsr','edt','ill','lyr','mdc','mus','nrt','oth','pht','prt','red',
+ 'rev','spn','ths','trc','trl',
+ )
+ valid_date_events = ['creation', 'publication', 'modification']
+ _unique_id = None
+
+ _default_metadata = lambda x: dict(title='', language='en', identifier=[], creator={}, contributor={}, subject=[], relation=[], date=[], type=[])
+
+ def __init__(self, *args, **kwargs):
+ """
+ When the object is instantiated, it sets up a dictionary to manage the
+ various types of data. Some tags are one and only one, some zero ore
+ more, some are must have at least one with this attribute, but other can
+ be there too. It's a bit confusing.
+
+ By default, the required attributes (title, language, a unique identifier)
+ are set to ``''``, ``'en'`` and a uuid, respectively. All can be overridden
+ at a later time. The idea was to make it as easy as possible to generate
+ a valid ePub.
+ """
+ import uuid
+ self._metadata = self._default_metadata()
+ self.set_unique_id(id="BookId", scheme="uuid", value=str(uuid.uuid4()))
+ self._metadata.update(kwargs)
+
+ def __setattr__(self, name, value):
+ if name in ['_metadata','_unique_id', 'unique_id', 'creation_date', 'modification_date', 'publication_date',]:
+ object.__setattr__(self, name, value)