diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b35b96 --- /dev/null +++ b/.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 diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..61b56a0 --- /dev/null +++ b/LICENSE @@ -0,0 +1,278 @@ +NASA OPEN SOURCE AGREEMENT VERSION 1.3 + +THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE, +REPRODUCTION, DISTRIBUTION, MODIFICATION AND REDISTRIBUTION OF CERTAIN +COMPUTER SOFTWARE ORIGINALLY RELEASED BY THE UNITED STATES GOVERNMENT AS +REPRESENTED BY THE GOVERNMENT AGENCY LISTED BELOW ("GOVERNMENT AGENCY"). +THE UNITED STATES GOVERNMENT, AS REPRESENTED BY GOVERNMENT AGENCY, IS AN +INTENDED THIRD-PARTY BENEFICIARY OF ALL SUBSEQUENT DISTRIBUTIONS OR +REDISTRIBUTIONS OF THE SUBJECT SOFTWARE. ANYONE WHO USES, REPRODUCES, +DISTRIBUTES, MODIFIES OR REDISTRIBUTES THE SUBJECT SOFTWARE, AS DEFINED +HEREIN, OR ANY PART THEREOF, IS, BY THAT ACTION, ACCEPTING IN FULL THE +RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS AGREEMENT. + +Government Agency: NASA Ames Research Center +Government Agency Original Software Designation: NASA Ames Research Center +Government Agency Original Software Title: GeoCam +User Registration Requested. Please Visit http://opensource.arc.nasa.gov/ +Government Agency Point of Contact for Original Software: Terry Fong + +DEFINITIONS + + +A. "Contributor" means Government Agency, as the developer of + the Original Software, and any entity that makes a + Modification. +B. "Covered Patents" mean patent claims licensable by a + Contributor that are necessarily infringed by the use or sale + of its Modification alone or when combined with the Subject + Software. +C. "Display" means the showing of a copy of the Subject + Software, either directly or by means of an image, or any + other device. +D. "Distribution" means conveyance or transfer of the Subject + Software, regardless of means, to another. +E. "Larger Work" means computer software that combines Subject + Software, or portions thereof, with software separate from + the Subject Software that is not governed by the terms of + this Agreement. +F. "Modification" means any alteration of, including addition + to or deletion from, the substance or structure of either the + Original Software or Subject Software, and includes + derivative works, as that term is defined in the Copyright + Statute, 17 USC 101. However, the act of including Subject + Software as part of a Larger Work does not in and of itself + constitute a Modification. +G. "Original Software" means the computer software first + released under this Agreement by Government Agency with + Government Agency designation NASA Ames Research Center and + entitled GeoCam, including source code, object + code and accompanying documentation, if any. +H. "Recipient" means anyone who acquires the Subject Software + under this Agreement, including all Contributors. +I. "Redistribution" means Distribution of the Subject Software + after a Modification has been made. +J. "Reproduction" means the making of a counterpart, image or + copy of the Subject Software. +K. "Sale" means the exchange of the Subject Software for money + or equivalent value. +L. "Subject Software" means the Original Software, + Modifications, or any respective parts thereof. +M. "Use" means the application or employment of the Subject + Software for any purpose. + + 1. GRANT OF RIGHTS + + A. Under Non-Patent Rights: Subject to the terms and conditions + of this Agreement, each Contributor, with respect to its own + contribution to the Subject Software, hereby grants to each + Recipient a non-exclusive, world-wide, royalty-free license + to engage in the following activities pertaining to the + Subject Software: + + 1. Use + 2. Distribution + 3. Reproduction + 4. Modification + 5. Redistribution + 6. Display + + B. Under Patent Rights: Subject to the terms and conditions of + this Agreement, each Contributor, with respect to its own + contribution to the Subject Software, hereby grants to each + Recipient under Covered Patents a non-exclusive, world-wide, + royalty-free license to engage in the following activities + pertaining to the Subject Software: + + 1. Use + 2. Distribution + 3. Reproduction + 4. Sale + 5. Offer for Sale + + C. The rights granted under Paragraph B. also apply to the + combination of a Contributor's Modification and the Subject + Software if, at the time the Modification is added by the + Contributor, the addition of such Modification causes the + combination to be covered by the Covered Patents. It does + not apply to any other combinations that include a + Modification. + + D. The rights granted in Paragraphs A. and B. allow the + Recipient to sublicense those same rights. Such sublicense + must be under the same terms and conditions of this + Agreement. + + 2. OBLIGATIONS OF RECIPIENT + + A. Distribution or Redistribution of the Subject Software must + be made under this Agreement except for additions covered + under paragraph 3H. + + 1. Whenever a Recipient distributes or redistributes the + Subject Software, a copy of this Agreement must be + included with each copy of the Subject Software; and + 2. If Recipient distributes or redistributes the Subject + Software in any form other than source code, Recipient + must also make the source code freely available, and must + provide with each copy of the Subject Software + information on how to obtain the source code in a + reasonable manner on or through a medium customarily used + for software exchange. + + B. Each Recipient must ensure that the following copyright + notice appears prominently in the Subject Software: + + Copyright (C) 2006-2010 United States Government as represented by + the Administrator of the National Aeronautics and Space Administration. + All Rights Reserved. + + + C. Each Contributor must characterize its alteration of the + Subject Software as a Modification and must identify itself + as the originator of its Modification in a manner that + reasonably allows subsequent Recipients to identify the + originator of the Modification. In fulfillment of these + requirements, Contributor must include a file (e.g., a change + log file) that describes the alterations made and the date of + the alterations, identifies Contributor as originator of the + alterations, and consents to characterization of the + alterations as a Modification, for example, by including a + statement that the Modification is derived, directly or + indirectly, from Original Software provided by Government + Agency. Once consent is granted, it may not thereafter be + revoked. + + D. A Contributor may add its own copyright notice to the Subject + Software. Once a copyright notice has been added to the + Subject Software, a Recipient may not remove it without the + express permission of the Contributor who added the notice. + + E. A Recipient may not make any representation in the Subject + Software or in any promotional, advertising or other material + that may be construed as an endorsement by Government Agency + or by any prior Recipient of any product or service provided + by Recipient, or that may seek to obtain commercial advantage + by the fact of Government Agency's or a prior Recipient's + participation in this Agreement. + + F. In an effort to track usage and maintain accurate records of + the Subject Software, each Recipient, upon receipt of the + Subject Software, is requested to register with Government + Agency by visiting the following website: + http://opensource.arc.nasa.gov/. Recipient's name and + personal information shall be used for statistical purposes + only. Once a Recipient makes a Modification available, it is + requested that the Recipient inform Government Agency at the + web site provided above how to access the Modification. + + G. Each Contributor represents that that its Modification is + believed to be Contributor's original creation and does not + violate any existing agreements, regulations, statutes or + rules, and further that Contributor has sufficient rights to + grant the rights conveyed by this Agreement. + + H. A Recipient may choose to offer, and to charge a fee for, + warranty, support, indemnity and/or liability obligations to + one or more other Recipients of the Subject Software. A + Recipient may do so, however, only on its own behalf and not + on behalf of Government Agency or any other Recipient. Such + a Recipient must make it absolutely clear that any such + warranty, support, indemnity and/or liability obligation is + offered by that Recipient alone. Further, such Recipient + agrees to indemnify Government Agency and every other + Recipient for any liability incurred by them as a result of + warranty, support, indemnity and/or liability offered by such + Recipient. + + I. A Recipient may create a Larger Work by combining Subject + Software with separate software not governed by the terms of + this agreement and distribute the Larger Work as a single + product. In such case, the Recipient must make sure Subject + Software, or portions thereof, included in the Larger Work is + subject to this Agreement. + + J. Notwithstanding any provisions contained herein, Recipient is + hereby put on notice that export of any goods or technical + data from the United States may require some form of export + license from the U.S. Government. Failure to obtain + necessary export licenses may result in criminal liability + under U.S. laws. Government Agency neither represents that a + license shall not be required nor that, if required, it shall + be issued. Nothing granted herein provides any such export + license. + + 3. DISCLAIMER OF WARRANTIES AND LIABILITIES; WAIVER AND INDEMNIFICATION + + A. No Warranty: THE SUBJECT SOFTWARE IS PROVIDED "AS IS" WITHOUT + ANY WARRANTY OF ANY KIND, EITHER EXPRESSED, IMPLIED, OR + STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTY THAT + THE SUBJECT SOFTWARE WILL CONFORM TO SPECIFICATIONS, ANY + IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A + PARTICULAR PURPOSE, OR FREEDOM FROM INFRINGEMENT, ANY + WARRANTY THAT THE SUBJECT SOFTWARE WILL BE ERROR FREE, OR ANY + WARRANTY THAT DOCUMENTATION, IF PROVIDED, WILL CONFORM TO THE + SUBJECT SOFTWARE. THIS AGREEMENT DOES NOT, IN ANY MANNER, + CONSTITUTE AN ENDORSEMENT BY GOVERNMENT AGENCY OR ANY PRIOR + RECIPIENT OF ANY RESULTS, RESULTING DESIGNS, HARDWARE, + SOFTWARE PRODUCTS OR ANY OTHER APPLICATIONS RESULTING FROM + USE OF THE SUBJECT SOFTWARE. FURTHER, GOVERNMENT AGENCY + DISCLAIMS ALL WARRANTIES AND LIABILITIES REGARDING THIRD- + PARTY SOFTWARE, IF PRESENT IN THE ORIGINAL SOFTWARE, AND + DISTRIBUTES IT "AS IS." + + B. Waiver and Indemnity: RECIPIENT AGREES TO WAIVE ANY AND ALL + CLAIMS AGAINST THE UNITED STATES GOVERNMENT, ITS CONTRACTORS + AND SUBCONTRACTORS, AS WELL AS ANY PRIOR RECIPIENT. IF + RECIPIENT'S USE OF THE SUBJECT SOFTWARE RESULTS IN ANY + LIABILITIES, DEMANDS, DAMAGES, EXPENSES OR LOSSES ARISING + FROM SUCH USE, INCLUDING ANY DAMAGES FROM PRODUCTS BASED ON, + OR RESULTING FROM, RECIPIENT'S USE OF THE SUBJECT SOFTWARE, + RECIPIENT SHALL INDEMNIFY AND HOLD HARMLESS THE UNITED STATES + GOVERNMENT, ITS CONTRACTORS AND SUBCONTRACTORS, AS WELL AS + ANY PRIOR RECIPIENT, TO THE EXTENT PERMITTED BY LAW. + RECIPIENT'S SOLE REMEDY FOR ANY SUCH MATTER SHALL BE THE + IMMEDIATE, UNILATERAL TERMINATION OF THIS AGREEMENT. + + + 4. GENERAL TERMS + + A. Termination: This Agreement and the rights granted hereunder + will terminate automatically if a Recipient fails to comply + with these terms and conditions, and fails to cure such + noncompliance within thirty (30) days of becoming aware of + such noncompliance. Upon termination, a Recipient agrees to + immediately cease use and distribution of the Subject + Software. All sublicenses to the Subject Software properly + granted by the breaching Recipient shall survive any such + termination of this Agreement. + + B. Severability: If any provision of this Agreement is invalid + or unenforceable under applicable law, it shall not affect + the validity or enforceability of the remainder of the terms + of this Agreement. + + C. Applicable Law: This Agreement shall be subject to United + States federal law only for all purposes, including, but not + limited to, determining the validity of this Agreement, the + meaning of its provisions and the rights, obligations and + remedies of the parties. + + D. Entire Understanding: This Agreement constitutes the entire + understanding and agreement of the parties relating to + release of the Subject Software and may not be superseded, + modified or amended except by further written agreement duly + executed by the parties. + + E. Binding Authority: By accepting and using the Subject + Software under this Agreement, a Recipient affirms its + authority to bind the Recipient to all terms and conditions + of this Agreement and that that Recipient hereby agrees to + all terms and conditions herein. + + F. Point of Contact: Any Recipient contact with Government + Agency is to be directed to the designated representative as + follows: + + Terry Fong + Terry.Fong@nasa.gov diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..87672a8 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,9 @@ +recursive-include doc_src * +recursive-include docs * + +recursive-include geocamUtil/media * +recursive-include geocamUtil/templates * + +include LICENSE +include README.rst +include *.txt diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..c411199 --- /dev/null +++ b/README.rst @@ -0,0 +1,7 @@ +Fill me in + +| __BEGIN_LICENSE__ +| Copyright (C) 2008-2010 United States Government as represented by +| the Administrator of the National Aeronautics and Space Administration. +| All Rights Reserved. +| __END_LICENSE__ \ No newline at end of file diff --git a/bin/relicense.pl b/bin/relicense.pl new file mode 100755 index 0000000..2bf4ff4 --- /dev/null +++ b/bin/relicense.pl @@ -0,0 +1,122 @@ +#!/usr/bin/perl +# __BEGIN_LICENSE__ +# Copyright (C) 2008-2010 United States Government as represented by +# the Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. +# __END_LICENSE__ + + +use strict; +use warnings; + +use File::Slurp; +use File::Basename; + +my %comment = ( + ".ac" => "dnl", + ".am" => "#", + ".cc" => "//", + ".cpp" => "//", + ".cxx" => "//", + ".oldtest" => "//", + ".hpp" => "//", + ".cg" => "//", + ".glsl" => "//", + ".h" => "//", + ".hh" => "//", + ".i" => "//", + ".m4" => "dnl", + ".mak" => "#", + ".pl" => "#", + ".py" => "#", + ".sh" => "#", + ".js" => "//", + ".tcc" => "//", + ".rst" => "|", + ".java" => "//", + ".aidl" => "//", + ".xml" => "", +); + +my %atEnd = ( + ".rst" => 1, +); + +# Read the license text from __DATA__ by default +my $f = \*DATA; +$f = $ARGV[0] if @ARGV > 0; + +my @license = read_file($f); +my $shebang = ''; + +@license = map { chop; $_; } @license; + +# process each line given on stdin +foreach my $filename (<>) { + chomp $filename; + + # get the extension, and skip it if we don't know about it + my (undef, undef, $ext) = fileparse($filename, qr/\.[^.]*/); + + unless (exists $comment{$ext}) { + warn "Skipped $filename\n"; + next; + } + + my $file = read_file($filename); + + next if ($file =~ /^\s*$/); + next if ($file =~ /__NO_RELICENSE__/); + + $shebang = ''; + # Protect a shebang line, xml declaration, or emacs mode line + if ($file =~ s/^(#!.*\n)//) { + if (defined($1)) { + $shebang = $1; + } + } elsif ($file =~ s/^(<\?xml.*\n)//) { + if (defined($1)) { + $shebang = $1; + } + } elsif ($file =~ s/^([^\n]*-\*-[^\n]*-\*-[^\n]*\n)//) { + if (defined($1)) { + $shebang = $1; + } + } + + # Remove a license header if it exists + $file =~ s/^[^\n]*__BEGIN_LICENSE__.*?__END_LICENSE__[^\n]*$//ms; + + my ($chead, $ctail); + if ($comment{$ext} =~ /,/) { + ($chead, $ctail) = split(/,/, $comment{$ext}); + $ctail = " " . $ctail; + } else { + ($chead, $ctail) = ($comment{$ext}, ""); + } + + # wrapping each line of the license in the comment head and tail strings + my $wrappedLicense = $chead . join($ctail . "\n" . $chead, @license) . $ctail; + if ($atEnd{$ext}) { + # Remove all blank lines from the bottom of the file + while ($file =~ s/\s*\n$//) {}; + + # append the wrapped license + $file = $shebang . $file . "\n\n" . $wrappedLicense; + } else { + # Remove all blank lines from the top of the file + while ($file =~ s/^\s*\n//) {}; + + # prepend the wrapped license + $file = $shebang . $wrappedLicense . "\n\n" . $file; + } + + write_file($filename, $file); +} + +__DATA__ + __BEGIN_LICENSE__ + Copyright (C) 2008-2010 United States Government as represented by + the Administrator of the National Aeronautics and Space Administration. + All Rights Reserved. + __END_LICENSE__ diff --git a/doc_src/Makefile b/doc_src/Makefile new file mode 100644 index 0000000..5660ff3 --- /dev/null +++ b/doc_src/Makefile @@ -0,0 +1,90 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build +DESTDIR = .. + +# 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 ' where 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) $(DESTDIR)/docs + @echo + @echo "Build finished. The HTML pages are in $(DESTDIR)/docs." + +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." diff --git a/doc_src/_build/doctrees/environment.pickle b/doc_src/_build/doctrees/environment.pickle new file mode 100644 index 0000000..caa1c84 Binary files /dev/null and b/doc_src/_build/doctrees/environment.pickle differ diff --git a/doc_src/_build/doctrees/getting_started.doctree b/doc_src/_build/doctrees/getting_started.doctree new file mode 100644 index 0000000..4ed48d4 Binary files /dev/null and b/doc_src/_build/doctrees/getting_started.doctree differ diff --git a/doc_src/_build/doctrees/index.doctree b/doc_src/_build/doctrees/index.doctree new file mode 100644 index 0000000..4bf4e78 Binary files /dev/null and b/doc_src/_build/doctrees/index.doctree differ diff --git a/doc_src/_build/doctrees/installation.doctree b/doc_src/_build/doctrees/installation.doctree new file mode 100644 index 0000000..a9b419e Binary files /dev/null and b/doc_src/_build/doctrees/installation.doctree differ diff --git a/doc_src/_build/doctrees/reference/index.doctree b/doc_src/_build/doctrees/reference/index.doctree new file mode 100644 index 0000000..a49f91c Binary files /dev/null and b/doc_src/_build/doctrees/reference/index.doctree differ diff --git a/doc_src/_build/doctrees/reference/settings.doctree b/doc_src/_build/doctrees/reference/settings.doctree new file mode 100644 index 0000000..e8d6ee6 Binary files /dev/null and b/doc_src/_build/doctrees/reference/settings.doctree differ diff --git a/doc_src/_static/breadcrumb_background.png b/doc_src/_static/breadcrumb_background.png new file mode 100644 index 0000000..9b45910 Binary files /dev/null and b/doc_src/_static/breadcrumb_background.png differ diff --git a/doc_src/_static/default.css b/doc_src/_static/default.css new file mode 100644 index 0000000..934f316 --- /dev/null +++ b/doc_src/_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; +} \ No newline at end of file diff --git a/doc_src/_static/documentation.png b/doc_src/_static/documentation.png new file mode 100644 index 0000000..f0d334b Binary files /dev/null and b/doc_src/_static/documentation.png differ diff --git a/doc_src/_static/header_sm_mid.png b/doc_src/_static/header_sm_mid.png new file mode 100644 index 0000000..dce5a40 Binary files /dev/null and b/doc_src/_static/header_sm_mid.png differ diff --git a/doc_src/_static/scrn1.png b/doc_src/_static/scrn1.png new file mode 100644 index 0000000..6499b3c Binary files /dev/null and b/doc_src/_static/scrn1.png differ diff --git a/doc_src/_static/scrn2.png b/doc_src/_static/scrn2.png new file mode 100644 index 0000000..2a60215 Binary files /dev/null and b/doc_src/_static/scrn2.png differ diff --git a/doc_src/_static/searchfield_leftcap.png b/doc_src/_static/searchfield_leftcap.png new file mode 100644 index 0000000..cc00c22 Binary files /dev/null and b/doc_src/_static/searchfield_leftcap.png differ diff --git a/doc_src/_static/searchfield_repeat.png b/doc_src/_static/searchfield_repeat.png new file mode 100644 index 0000000..b429a16 Binary files /dev/null and b/doc_src/_static/searchfield_repeat.png differ diff --git a/doc_src/_static/searchfield_rightcap.png b/doc_src/_static/searchfield_rightcap.png new file mode 100644 index 0000000..8e13620 Binary files /dev/null and b/doc_src/_static/searchfield_rightcap.png differ diff --git a/doc_src/_static/title_background.png b/doc_src/_static/title_background.png new file mode 100644 index 0000000..6fcd1cd Binary files /dev/null and b/doc_src/_static/title_background.png differ diff --git a/doc_src/_static/toc.js b/doc_src/_static/toc.js new file mode 100644 index 0000000..532ee7e --- /dev/null +++ b/doc_src/_static/toc.js @@ -0,0 +1,26 @@ +// __BEGIN_LICENSE__ +// Copyright (C) 2008-2010 United States Government as represented by +// the Administrator of the National Aeronautics and Space Administration. +// All Rights Reserved. +// __END_LICENSE__ + +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(); +}); \ No newline at end of file diff --git a/doc_src/_static/triangle_closed.png b/doc_src/_static/triangle_closed.png new file mode 100644 index 0000000..1e7f7bb Binary files /dev/null and b/doc_src/_static/triangle_closed.png differ diff --git a/doc_src/_static/triangle_left.png b/doc_src/_static/triangle_left.png new file mode 100644 index 0000000..2d86be7 Binary files /dev/null and b/doc_src/_static/triangle_left.png differ diff --git a/doc_src/_static/triangle_open.png b/doc_src/_static/triangle_open.png new file mode 100644 index 0000000..e5d3bfd Binary files /dev/null and b/doc_src/_static/triangle_open.png differ diff --git a/doc_src/_templates/layout.html b/doc_src/_templates/layout.html new file mode 100644 index 0000000..4e302db --- /dev/null +++ b/doc_src/_templates/layout.html @@ -0,0 +1,144 @@ +{% extends "basic/layout.html" %} +{%- block doctype -%} + +{%- endblock %} +{%- set reldelim1 = reldelim1 is not defined and ' »' or reldelim1 %} +{%- set reldelim2 = reldelim2 is not defined and ' |' or reldelim2 %} +{%- block linktags %} + {%- if hasdoc('about') %} + + {%- endif %} + {%- if hasdoc('genindex') %} + + {%- endif %} + {%- if hasdoc('search') %} + + {%- endif %} + {%- if hasdoc('copyright') %} + + {%- endif %} + + {%- if parents %} + + {%- endif %} + {%- if next %} + + {%- endif %} + {%- if prev %} + + {%- endif %} +{%- endblock %} +{%- block extrahead %} {% endblock %} +{%- block header %}{% endblock %} +{%- block relbar1 %} +
+

{{docstitle}}

+
+ +{% endblock %} + +{%- block sidebar1 %} +{%- if not embedded %}{% if not theme_nosidebar|tobool %} +
+
+ {%- block sidebarlogo %} + {%- if logo %} + + {%- endif %} + {%- endblock %} + {%- block sidebartoc %} + + {{ toctree() }} + {%- endblock %} + {%- block sidebarrel %} + {%- endblock %} + {%- block sidebarsourcelink %} + {%- if show_source and has_source and sourcename %} +

{{ _('This Page') }}

+ + {%- endif %} + {%- endblock %} + {%- if customsidebar %} + {% include customsidebar %} + {%- endif %} + {%- block sidebarsearch %} + {%- if pagename != "search" %} + + + {%- endif %} + {%- endblock %} +
+
+{%- endif %}{% endif %} + +{% endblock %} +{%- block document %} +
+ {%- if not embedded %}{% if not theme_nosidebar|tobool %} +
+ {%- endif %}{% endif %} +
+ {% block body %} {% endblock %} +
+ {%- if not embedded %}{% if not theme_nosidebar|tobool %} +
+ {%- endif %}{% endif %} +
+ +{%- endblock %} +{%- block sidebar2 %}{% endblock %} +{%- block relbar2 %}{% endblock %} +{%- block footer %} + + +{%- endblock %} diff --git a/doc_src/conf.py b/doc_src/conf.py new file mode 100644 index 0000000..2e26c99 --- /dev/null +++ b/doc_src/conf.py @@ -0,0 +1,202 @@ +# -*- coding: utf-8 -*- +# __BEGIN_LICENSE__ +# Copyright (C) 2008-2010 United States Government as represented by +# the Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. +# __END_LICENSE__ + +# +# 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('..')) +import geocamUtil +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'geocamUtilWeb' +copyright = u'2010, Trey Smith' + +# 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 = geocamUtil.get_version() +# The full version, including alpha/beta/rc tags. +release = geocamUtil.get_version() + +# 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 +# " v 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 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 = 'geocamUtilWebdoc' + + +# -- 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'geocamUtilWeb Documentation', + u'Trey Smith', '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 diff --git a/doc_src/getting_started.rst b/doc_src/getting_started.rst new file mode 100644 index 0000000..c9697fe --- /dev/null +++ b/doc_src/getting_started.rst @@ -0,0 +1,9 @@ + +Getting Started +=============== + +| __BEGIN_LICENSE__ +| Copyright (C) 2008-2010 United States Government as represented by +| the Administrator of the National Aeronautics and Space Administration. +| All Rights Reserved. +| __END_LICENSE__ \ No newline at end of file diff --git a/doc_src/index.rst b/doc_src/index.rst new file mode 100644 index 0000000..4053863 --- /dev/null +++ b/doc_src/index.rst @@ -0,0 +1,27 @@ +.. app documentation master file, created by + sphinx-quickstart on Wed Oct 21 13:18:22 2009. + You can adapt this file completely to your liking, but it should at least + contain the root `toctree` directive. + +Welcome to app's documentation! +=============================== + +Contents: + +.. toctree:: + :maxdepth: 2 + :glob: + + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + +| __BEGIN_LICENSE__ +| Copyright (C) 2008-2010 United States Government as represented by +| the Administrator of the National Aeronautics and Space Administration. +| All Rights Reserved. +| __END_LICENSE__ \ No newline at end of file diff --git a/doc_src/installation.rst b/doc_src/installation.rst new file mode 100644 index 0000000..da5c99f --- /dev/null +++ b/doc_src/installation.rst @@ -0,0 +1,23 @@ + +Installation +============ + +Installation is easy using ``pip`` or ``easy_install``. + +.. code-block:: bash + + pip install geocamUtilWeb + +or +.. code-block:: bash + + easy_install geocamUtilWeb + +Dependencies +************ + +| __BEGIN_LICENSE__ +| Copyright (C) 2008-2010 United States Government as represented by +| the Administrator of the National Aeronautics and Space Administration. +| All Rights Reserved. +| __END_LICENSE__ \ No newline at end of file diff --git a/doc_src/make.bat b/doc_src/make.bat new file mode 100644 index 0000000..da4229c --- /dev/null +++ b/doc_src/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 ^` where ^ 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 diff --git a/doc_src/reference/index.rst b/doc_src/reference/index.rst new file mode 100644 index 0000000..6a3a048 --- /dev/null +++ b/doc_src/reference/index.rst @@ -0,0 +1,18 @@ +.. The reference section is for low-level documentation for programmers. + There should be a file for each class + Include Docstring and parameter expectations for each class + +Reference +========= + +.. toctree:: + :maxdepth: 2 + :glob: + + settings + +| __BEGIN_LICENSE__ +| Copyright (C) 2008-2010 United States Government as represented by +| the Administrator of the National Aeronautics and Space Administration. +| All Rights Reserved. +| __END_LICENSE__ \ No newline at end of file diff --git a/doc_src/reference/settings.rst b/doc_src/reference/settings.rst new file mode 100644 index 0000000..c087f27 --- /dev/null +++ b/doc_src/reference/settings.rst @@ -0,0 +1,9 @@ + +Settings +======== + +| __BEGIN_LICENSE__ +| Copyright (C) 2008-2010 United States Government as represented by +| the Administrator of the National Aeronautics and Space Administration. +| All Rights Reserved. +| __END_LICENSE__ \ No newline at end of file diff --git a/geocamUtil/MultiSettings.py b/geocamUtil/MultiSettings.py new file mode 100644 index 0000000..d6080c2 --- /dev/null +++ b/geocamUtil/MultiSettings.py @@ -0,0 +1,29 @@ +# __BEGIN_LICENSE__ +# Copyright (C) 2008-2010 United States Government as represented by +# the Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. +# __END_LICENSE__ + +import itertools + +class MultiSettings(object): + """ + A settings container object built out of an ordered list of + child settings objects. When you request the value of an attribute, + it returns the value found in the first child that defines that + attribute. + """ + def __init__(self, *sources): + self._sources = sources + + def __getattr__(self, key): + for src in self._sources: + if hasattr(src, key): + return getattr(src, key) + raise AttributeError(key) + + def __dir__(self): + return list(itertools.chain(*[dir(src) for src in self._sources])) + + # For Python < 2.6: + __members__ = property(lambda self: self.__dir__()) diff --git a/geocamUtil/MultiSettingsTest.py b/geocamUtil/MultiSettingsTest.py new file mode 100644 index 0000000..f3ad174 --- /dev/null +++ b/geocamUtil/MultiSettingsTest.py @@ -0,0 +1,35 @@ +# __BEGIN_LICENSE__ +# Copyright (C) 2008-2010 United States Government as represented by +# the Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. +# __END_LICENSE__ + +import unittest + +from MultiSettings import MultiSettings + +class Container(object): + def __init__(self, **kwargs): + for k, v in kwargs.iteritems(): + setattr(self, k, v) + +class MultiSettingsTest(unittest.TestCase): + def setUp(self): + mod1 = Container(a=1, b=2) + mod2 = Container(b=99, c=3) + self.settings = MultiSettings(mod1, mod2) + + def test_first(self): + self.assertEqual(self.settings.a, 1) + + def test_order(self): + self.assertEqual(self.settings.b, 2) + + def test_second(self): + self.assertEqual(self.settings.c, 3) + + def test_missing(self): + self.assertRaises(AttributeError, lambda: self.settings.d) + +if __name__ == '__main__': + unittest.main() diff --git a/geocamUtil/__init__.py b/geocamUtil/__init__.py new file mode 100644 index 0000000..5ac351d --- /dev/null +++ b/geocamUtil/__init__.py @@ -0,0 +1,30 @@ +# __BEGIN_LICENSE__ +# Copyright (C) 2008-2010 United States Government as represented by +# the Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. +# __END_LICENSE__ + +""" +geocamUtilWeb -- Utilities used by Django apps in the GeoCam Share app collection. +""" +__version_info__ = { + 'major': 0, + 'minor': 1, + 'micro': 0, + 'releaselevel': 'final', + 'serial': 1 +} + +def get_version(): + """ + Return the formatted version information + """ + vers = ["%(major)i.%(minor)i" % __version_info__, ] + + if __version_info__['micro']: + vers.append(".%(micro)i" % __version_info__) + if __version_info__['releaselevel'] != 'final': + vers.append('%(releaselevel)s%(serial)i' % __version_info__) + return ''.join(vers) + +__version__ = get_version() diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..e69de29 diff --git a/setup.py b/setup.py new file mode 100644 index 0000000..2cacd10 --- /dev/null +++ b/setup.py @@ -0,0 +1,37 @@ +# __BEGIN_LICENSE__ +# Copyright (C) 2008-2010 United States Government as represented by +# the Administrator of the National Aeronautics and Space Administration. +# All Rights Reserved. +# __END_LICENSE__ + +import os +from setuptools import setup, find_packages + +def read_file(filename): + """Read a file into a string""" + path = os.path.abspath(os.path.dirname(__file__)) + filepath = os.path.join(path, filename) + try: + return open(filepath).read() + except IOError: + return '' + +# Use the docstring of the __init__ file to be the description +DESC = " ".join(__import__('geocamUtil').__doc__.splitlines()).strip() + +setup( + name = "geocamUtilWeb", + version = __import__('geocamUtil').get_version().replace(' ', '-'), + url = 'http://github.com/geocam/geocamUtilWeb', + author = 'Trey Smith', + author_email = 'trey.smith@nasa.gov', + description = DESC, + long_description = read_file('README'), + packages = find_packages(), + include_package_data = True, + install_requires=read_file('requirements.txt'), + classifiers = [ + 'License :: OSI Approved :: NASA Open Source Agreement', + 'Framework :: Django', + ], +)