├── .gitignore ├── LICENSE ├── MANIFEST.in ├── README.rst ├── docs ├── Makefile ├── _build │ ├── doctrees │ │ ├── environment.pickle │ │ ├── index.doctree │ │ ├── influenceexplorer.doctree │ │ └── transparencydata.doctree │ └── html │ │ ├── .buildinfo │ │ ├── _modules │ │ ├── index.html │ │ └── influenceexplorer.html │ │ ├── _sources │ │ ├── index.txt │ │ ├── influenceexplorer.txt │ │ └── transparencydata.txt │ │ ├── _static │ │ ├── basic.css │ │ ├── default.css │ │ ├── doctools.js │ │ ├── file.png │ │ ├── jquery.js │ │ ├── minus.png │ │ ├── plus.png │ │ ├── pygments.css │ │ ├── searchtools.js │ │ ├── sidebar.js │ │ └── underscore.js │ │ ├── genindex.html │ │ ├── index.html │ │ ├── influenceexplorer.html │ │ ├── objects.inv │ │ ├── py-modindex.html │ │ ├── search.html │ │ ├── searchindex.js │ │ └── transparencydata.html ├── conf.py ├── index.rst ├── influenceexplorer.rst └── transparencydata.rst ├── influenceexplorer.py ├── setup.py └── transparencydata.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | ignored.py 3 | .project 4 | .pydevproject 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD-style license 2 | ================= 3 | 4 | Copyright (c) 2010, Sunlight Labs 5 | 6 | All rights reserved. 7 | 8 | Redistribution and use in source and binary forms, with or without modification, 9 | are permitted provided that the following conditions are met: 10 | 11 | * Redistributions of source code must retain the above copyright notice, 12 | this list of conditions and the following disclaimer. 13 | * Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | * Neither the name of Sunlight Labs nor the names of its contributors may be 17 | used to endorse or promote products derived from this software without 18 | specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 21 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 22 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 23 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 24 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 25 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 26 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 27 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 28 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 29 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 30 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /MANIFEST.in: -------------------------------------------------------------------------------- 1 | include LICENSE *.rst *.py 2 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | ======================= 2 | python-transparencydata 3 | ======================= 4 | 5 | Python library for interacting with the TransparencyData.com API. 6 | 7 | The TransparencyData.com API provides campaign contribution and lobbying data. 8 | 9 | http://transparencydata.com/api/ 10 | 11 | python-transparencydata is a project of Sunlight Labs (c) 2010 12 | Written by Jeremy Carbaugh 13 | 14 | All code is under a BSD-style license, see LICENSE for details. 15 | 16 | Source: http://github.com/sunlightlabs/python-transparencydata/ 17 | 18 | Requirements 19 | ============ 20 | 21 | python >= 2.4 22 | 23 | simplejson >= 1.8 (not required with Python 2.6, will use built-in ``json`` module) 24 | 25 | -------------------------------------------------------------------------------- /docs/Makefile: -------------------------------------------------------------------------------- 1 | # Makefile for Sphinx documentation 2 | # 3 | 4 | # You can set these variables from the command line. 5 | SPHINXOPTS = 6 | SPHINXBUILD = sphinx-build 7 | PAPER = 8 | BUILDDIR = _build 9 | 10 | # Internal variables. 11 | PAPEROPT_a4 = -D latex_paper_size=a4 12 | PAPEROPT_letter = -D latex_paper_size=letter 13 | ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . 14 | 15 | .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest 16 | 17 | help: 18 | @echo "Please use \`make ' where is one of" 19 | @echo " html to make standalone HTML files" 20 | @echo " dirhtml to make HTML files named index.html in directories" 21 | @echo " singlehtml to make a single large HTML file" 22 | @echo " pickle to make pickle files" 23 | @echo " json to make JSON files" 24 | @echo " htmlhelp to make HTML files and a HTML help project" 25 | @echo " qthelp to make HTML files and a qthelp project" 26 | @echo " devhelp to make HTML files and a Devhelp project" 27 | @echo " epub to make an epub" 28 | @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" 29 | @echo " latexpdf to make LaTeX files and run them through pdflatex" 30 | @echo " text to make text files" 31 | @echo " man to make manual pages" 32 | @echo " changes to make an overview of all changed/added/deprecated items" 33 | @echo " linkcheck to check all external links for integrity" 34 | @echo " doctest to run all doctests embedded in the documentation (if enabled)" 35 | 36 | clean: 37 | -rm -rf $(BUILDDIR)/* 38 | 39 | html: 40 | $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html 41 | @echo 42 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." 43 | 44 | dirhtml: 45 | $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml 46 | @echo 47 | @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." 48 | 49 | singlehtml: 50 | $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml 51 | @echo 52 | @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." 53 | 54 | pickle: 55 | $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle 56 | @echo 57 | @echo "Build finished; now you can process the pickle files." 58 | 59 | json: 60 | $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json 61 | @echo 62 | @echo "Build finished; now you can process the JSON files." 63 | 64 | htmlhelp: 65 | $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp 66 | @echo 67 | @echo "Build finished; now you can run HTML Help Workshop with the" \ 68 | ".hhp project file in $(BUILDDIR)/htmlhelp." 69 | 70 | qthelp: 71 | $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp 72 | @echo 73 | @echo "Build finished; now you can run "qcollectiongenerator" with the" \ 74 | ".qhcp project file in $(BUILDDIR)/qthelp, like this:" 75 | @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/python-transparencydata.qhcp" 76 | @echo "To view the help file:" 77 | @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/python-transparencydata.qhc" 78 | 79 | devhelp: 80 | $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp 81 | @echo 82 | @echo "Build finished." 83 | @echo "To view the help file:" 84 | @echo "# mkdir -p $$HOME/.local/share/devhelp/python-transparencydata" 85 | @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/python-transparencydata" 86 | @echo "# devhelp" 87 | 88 | epub: 89 | $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub 90 | @echo 91 | @echo "Build finished. The epub file is in $(BUILDDIR)/epub." 92 | 93 | latex: 94 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 95 | @echo 96 | @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." 97 | @echo "Run \`make' in that directory to run these through (pdf)latex" \ 98 | "(use \`make latexpdf' here to do that automatically)." 99 | 100 | latexpdf: 101 | $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex 102 | @echo "Running LaTeX files through pdflatex..." 103 | make -C $(BUILDDIR)/latex all-pdf 104 | @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." 105 | 106 | text: 107 | $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text 108 | @echo 109 | @echo "Build finished. The text files are in $(BUILDDIR)/text." 110 | 111 | man: 112 | $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man 113 | @echo 114 | @echo "Build finished. The manual pages are in $(BUILDDIR)/man." 115 | 116 | changes: 117 | $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes 118 | @echo 119 | @echo "The overview file is in $(BUILDDIR)/changes." 120 | 121 | linkcheck: 122 | $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck 123 | @echo 124 | @echo "Link check complete; look for any errors in the above output " \ 125 | "or in $(BUILDDIR)/linkcheck/output.txt." 126 | 127 | doctest: 128 | $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest 129 | @echo "Testing of doctests in the sources finished, look at the " \ 130 | "results in $(BUILDDIR)/doctest/output.txt." 131 | -------------------------------------------------------------------------------- /docs/_build/doctrees/environment.pickle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunlightlabs/python-transparencydata/f843f7c54b4aa742f55f6a8ea5b4f7f12788c9f8/docs/_build/doctrees/environment.pickle -------------------------------------------------------------------------------- /docs/_build/doctrees/index.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunlightlabs/python-transparencydata/f843f7c54b4aa742f55f6a8ea5b4f7f12788c9f8/docs/_build/doctrees/index.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/influenceexplorer.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunlightlabs/python-transparencydata/f843f7c54b4aa742f55f6a8ea5b4f7f12788c9f8/docs/_build/doctrees/influenceexplorer.doctree -------------------------------------------------------------------------------- /docs/_build/doctrees/transparencydata.doctree: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunlightlabs/python-transparencydata/f843f7c54b4aa742f55f6a8ea5b4f7f12788c9f8/docs/_build/doctrees/transparencydata.doctree -------------------------------------------------------------------------------- /docs/_build/html/.buildinfo: -------------------------------------------------------------------------------- 1 | # Sphinx build info version 1 2 | # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. 3 | config: be6005d333f3d05869027222eb47f79e 4 | tags: fbb0d17656682115ca4d033fb2f83ba1 5 | -------------------------------------------------------------------------------- /docs/_build/html/_modules/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 7 | 8 | 9 | 10 | Overview: module code — python-transparencydata v1.0 documentation 11 | 12 | 13 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 40 | 41 |
42 |
43 |
44 |
45 | 46 |

All modules for which code is available

47 | 49 | 50 |
51 |
52 |
53 |
54 |
55 | 67 | 68 |
69 |
70 |
71 |
72 | 84 | 88 | 89 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/index.txt: -------------------------------------------------------------------------------- 1 | .. python-transparencydata documentation master file, created by 2 | sphinx-quickstart on Fri Mar 18 11:16:10 2011. 3 | You can adapt this file completely to your liking, but it should at least 4 | contain the root `toctree` directive. 5 | 6 | python-transparencydata's documentation 7 | ======================================= 8 | 9 | Python API wrappers for TransparencyData.com and InfluenceExplorer.com data. 10 | Both APIs provide a variety of political influence data. 11 | Influence Explorer provides easy to use summary information for politicians, 12 | organizations, industries and prominent individuals. 13 | Transparency Data provides extensive search capabilities over raw transactional 14 | records. It is useful for retrieving data sets for your own analysis. 15 | 16 | Both sites currently include data on campaign finance (federal- and 17 | state-level), federal lobbying, earmarks, and federal grants and contracts. 18 | More data sets will be added over time. 19 | 20 | .. toctree:: 21 | :maxdepth: 2 22 | 23 | transparencydata 24 | influenceexplorer 25 | 26 | 27 | Indices and tables 28 | ================== 29 | 30 | * :ref:`genindex` 31 | * :ref:`modindex` 32 | * :ref:`search` 33 | 34 | -------------------------------------------------------------------------------- /docs/_build/html/_sources/influenceexplorer.txt: -------------------------------------------------------------------------------- 1 | Influence Explorer API 2 | ====================== 3 | 4 | 5 | .. automodule:: influenceexplorer 6 | 7 | .. autoclass:: influenceexplorer.InfluenceExplorer 8 | 9 | ---------------------- 10 | General Entity Methods 11 | ---------------------- 12 | 13 | .. autoclass:: influenceexplorer.Entities() 14 | :members: 15 | 16 | ------------------ 17 | Politician Methods 18 | ------------------ 19 | 20 | .. autoclass:: influenceexplorer.Politician() 21 | :members: 22 | 23 | -------------------- 24 | Organization Methods 25 | -------------------- 26 | 27 | .. autoclass:: influenceexplorer.Organization() 28 | :members: 29 | 30 | ------------------ 31 | Individual Methods 32 | ------------------ 33 | 34 | .. autoclass:: influenceexplorer.Individual() 35 | :members: -------------------------------------------------------------------------------- /docs/_build/html/_sources/transparencydata.txt: -------------------------------------------------------------------------------- 1 | Transparency Data API 2 | ===================== 3 | 4 | ----- 5 | Usage 6 | ----- 7 | 8 | The TransparencyData class is constructed with your API key as an initialization parameter: 9 | 10 | >>> from transparencydata import TransparencyData 11 | >>> td = TransparencyData() 12 | 13 | If you do not have an API key visit http://services.sunlightlabs.com/api/ to 14 | register for one. 15 | 16 | ------------------- 17 | Parameter Operators 18 | ------------------- 19 | 20 | Some parameters allow multiple values or greater than, less than, or between operations. We allow operators to be added similar to the method used by the Django ORM. The operator is appended to the end of the parameter name using double underscore. 21 | 22 | >>> td.contributions(amount=100) # contributions equal to 100 dollars 23 | >>> td.contributions(amount__lt=100) # contributions less than 100 dollars 24 | 25 | >>> td.contributions(cycle=1990) # contributions from the 1990 election cycle 26 | >>> td.contributions(cycle__in=(1990,2008)) # contributions from the 1990 and 2008 election cycles 27 | 28 | gt 29 | Greater than specified value. 30 | 31 | lt 32 | Less than specified value. 33 | 34 | between 35 | Between the lesser value and greater value. Parameters must be passed as a two-value tuple or list. 36 | 37 | >>> td.contributions(date__between=(start_date, end_date)) 38 | 39 | in 40 | Matches any in a range of values. Parameter must be a tuple or list. 41 | 42 | 43 | See the parameter documentation (http://transparencydata.com/api/) to find out which operators are valid for each parameter. 44 | 45 | ---------------------- 46 | Campaign Contributions 47 | ---------------------- 48 | 49 | To find all contributions to Chris Van Hollen from the state of CA during the 2008 election cycle: 50 | 51 | >>> td.contributions(cycle=2008, contributor_state='CA', recipient_ft='van hollen') 52 | 53 | A list of valid contributions parameters can be accessed programmatically: 54 | 55 | >>> print td.contributions.parameters 56 | 57 | Parameter documentation: http://transparencydata.com/api/contributions 58 | 59 | Response documentation: http://transparencydata.com/docs/contributions 60 | 61 | -------- 62 | Lobbying 63 | -------- 64 | 65 | To find all lobbying conducted by John Wonderlich: 66 | 67 | >>> td.lobbying(lobbyist_ft='john wonderlich') 68 | 69 | A list of valid lobbying parameters can be accessed programmatically: 70 | 71 | >>> print td.lobbying.parameters 72 | 73 | Parameter documentation: http://transparencydata.com/api/lobbying 74 | 75 | Response documentation: http://transparencydata.com/docs/lobbying 76 | 77 | 78 | -------- 79 | Earmarks 80 | -------- 81 | 82 | To find all earmarks directed towards Seattle, WA: 83 | 84 | >>> td.earmarks(city='Seattle', state='WA') 85 | 86 | A list of valid earmark parameters can be accessed programmatically: 87 | 88 | >>> print td.earmarks.parameters 89 | 90 | Parameter documentation: http://transparencydata.com/api/earmarks 91 | 92 | Response documentation: http://transparencydata.com/docs/earmarks 93 | 94 | 95 | -------------- 96 | Federal Grants 97 | -------------- 98 | 99 | To find all grants made by the NEA in 2010: 100 | 101 | >>> td.grants(agency_ft='national endowment for the arts', fiscal_year='2010') 102 | 103 | A list of valid grant parameters can be accessed programmatically: 104 | 105 | >>> td.grants.parameters 106 | 107 | Parameter documentation: http://transparencydata.com/api/grants/ 108 | 109 | Response documentation: http://transparencydata.com/docs/grants/ 110 | 111 | 112 | ----------------- 113 | Federal Contracts 114 | ----------------- 115 | 116 | To find all federal contracts issued to Bank of America: 117 | 118 | >>> td.contracts(vendor_name='bank of america') 119 | 120 | A list of valid contract parameters can be accessed programmatically: 121 | 122 | >>> td.contracts.parameters 123 | 124 | Parameter documentation: http://transparencydata.com/api/contracts 125 | 126 | Response documentation: http://transparencydata.com/docs/contracts 127 | 128 | 129 | -------------------------------------------------------------------------------- /docs/_build/html/_static/basic.css: -------------------------------------------------------------------------------- 1 | /* 2 | * basic.css 3 | * ~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- basic theme. 6 | * 7 | * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /* -- main layout ----------------------------------------------------------- */ 13 | 14 | div.clearer { 15 | clear: both; 16 | } 17 | 18 | /* -- relbar ---------------------------------------------------------------- */ 19 | 20 | div.related { 21 | width: 100%; 22 | font-size: 90%; 23 | } 24 | 25 | div.related h3 { 26 | display: none; 27 | } 28 | 29 | div.related ul { 30 | margin: 0; 31 | padding: 0 0 0 10px; 32 | list-style: none; 33 | } 34 | 35 | div.related li { 36 | display: inline; 37 | } 38 | 39 | div.related li.right { 40 | float: right; 41 | margin-right: 5px; 42 | } 43 | 44 | /* -- sidebar --------------------------------------------------------------- */ 45 | 46 | div.sphinxsidebarwrapper { 47 | padding: 10px 5px 0 10px; 48 | } 49 | 50 | div.sphinxsidebar { 51 | float: left; 52 | width: 230px; 53 | margin-left: -100%; 54 | font-size: 90%; 55 | } 56 | 57 | div.sphinxsidebar ul { 58 | list-style: none; 59 | } 60 | 61 | div.sphinxsidebar ul ul, 62 | div.sphinxsidebar ul.want-points { 63 | margin-left: 20px; 64 | list-style: square; 65 | } 66 | 67 | div.sphinxsidebar ul ul { 68 | margin-top: 0; 69 | margin-bottom: 0; 70 | } 71 | 72 | div.sphinxsidebar form { 73 | margin-top: 10px; 74 | } 75 | 76 | div.sphinxsidebar input { 77 | border: 1px solid #98dbcc; 78 | font-family: sans-serif; 79 | font-size: 1em; 80 | } 81 | 82 | img { 83 | border: 0; 84 | } 85 | 86 | /* -- search page ----------------------------------------------------------- */ 87 | 88 | ul.search { 89 | margin: 10px 0 0 20px; 90 | padding: 0; 91 | } 92 | 93 | ul.search li { 94 | padding: 5px 0 5px 20px; 95 | background-image: url(file.png); 96 | background-repeat: no-repeat; 97 | background-position: 0 7px; 98 | } 99 | 100 | ul.search li a { 101 | font-weight: bold; 102 | } 103 | 104 | ul.search li div.context { 105 | color: #888; 106 | margin: 2px 0 0 30px; 107 | text-align: left; 108 | } 109 | 110 | ul.keywordmatches li.goodmatch a { 111 | font-weight: bold; 112 | } 113 | 114 | /* -- index page ------------------------------------------------------------ */ 115 | 116 | table.contentstable { 117 | width: 90%; 118 | } 119 | 120 | table.contentstable p.biglink { 121 | line-height: 150%; 122 | } 123 | 124 | a.biglink { 125 | font-size: 1.3em; 126 | } 127 | 128 | span.linkdescr { 129 | font-style: italic; 130 | padding-top: 5px; 131 | font-size: 90%; 132 | } 133 | 134 | /* -- general index --------------------------------------------------------- */ 135 | 136 | table.indextable { 137 | width: 100%; 138 | } 139 | 140 | table.indextable td { 141 | text-align: left; 142 | vertical-align: top; 143 | } 144 | 145 | table.indextable dl, table.indextable dd { 146 | margin-top: 0; 147 | margin-bottom: 0; 148 | } 149 | 150 | table.indextable tr.pcap { 151 | height: 10px; 152 | } 153 | 154 | table.indextable tr.cap { 155 | margin-top: 10px; 156 | background-color: #f2f2f2; 157 | } 158 | 159 | img.toggler { 160 | margin-right: 3px; 161 | margin-top: 3px; 162 | cursor: pointer; 163 | } 164 | 165 | div.modindex-jumpbox { 166 | border-top: 1px solid #ddd; 167 | border-bottom: 1px solid #ddd; 168 | margin: 1em 0 1em 0; 169 | padding: 0.4em; 170 | } 171 | 172 | div.genindex-jumpbox { 173 | border-top: 1px solid #ddd; 174 | border-bottom: 1px solid #ddd; 175 | margin: 1em 0 1em 0; 176 | padding: 0.4em; 177 | } 178 | 179 | /* -- general body styles --------------------------------------------------- */ 180 | 181 | a.headerlink { 182 | visibility: hidden; 183 | } 184 | 185 | h1:hover > a.headerlink, 186 | h2:hover > a.headerlink, 187 | h3:hover > a.headerlink, 188 | h4:hover > a.headerlink, 189 | h5:hover > a.headerlink, 190 | h6:hover > a.headerlink, 191 | dt:hover > a.headerlink { 192 | visibility: visible; 193 | } 194 | 195 | div.body p.caption { 196 | text-align: inherit; 197 | } 198 | 199 | div.body td { 200 | text-align: left; 201 | } 202 | 203 | .field-list ul { 204 | padding-left: 1em; 205 | } 206 | 207 | .first { 208 | margin-top: 0 !important; 209 | } 210 | 211 | p.rubric { 212 | margin-top: 30px; 213 | font-weight: bold; 214 | } 215 | 216 | img.align-left, .figure.align-left, object.align-left { 217 | clear: left; 218 | float: left; 219 | margin-right: 1em; 220 | } 221 | 222 | img.align-right, .figure.align-right, object.align-right { 223 | clear: right; 224 | float: right; 225 | margin-left: 1em; 226 | } 227 | 228 | img.align-center, .figure.align-center, object.align-center { 229 | display: block; 230 | margin-left: auto; 231 | margin-right: auto; 232 | } 233 | 234 | .align-left { 235 | text-align: left; 236 | } 237 | 238 | .align-center { 239 | clear: both; 240 | text-align: center; 241 | } 242 | 243 | .align-right { 244 | text-align: right; 245 | } 246 | 247 | /* -- sidebars -------------------------------------------------------------- */ 248 | 249 | div.sidebar { 250 | margin: 0 0 0.5em 1em; 251 | border: 1px solid #ddb; 252 | padding: 7px 7px 0 7px; 253 | background-color: #ffe; 254 | width: 40%; 255 | float: right; 256 | } 257 | 258 | p.sidebar-title { 259 | font-weight: bold; 260 | } 261 | 262 | /* -- topics ---------------------------------------------------------------- */ 263 | 264 | div.topic { 265 | border: 1px solid #ccc; 266 | padding: 7px 7px 0 7px; 267 | margin: 10px 0 10px 0; 268 | } 269 | 270 | p.topic-title { 271 | font-size: 1.1em; 272 | font-weight: bold; 273 | margin-top: 10px; 274 | } 275 | 276 | /* -- admonitions ----------------------------------------------------------- */ 277 | 278 | div.admonition { 279 | margin-top: 10px; 280 | margin-bottom: 10px; 281 | padding: 7px; 282 | } 283 | 284 | div.admonition dt { 285 | font-weight: bold; 286 | } 287 | 288 | div.admonition dl { 289 | margin-bottom: 0; 290 | } 291 | 292 | p.admonition-title { 293 | margin: 0px 10px 5px 0px; 294 | font-weight: bold; 295 | } 296 | 297 | div.body p.centered { 298 | text-align: center; 299 | margin-top: 25px; 300 | } 301 | 302 | /* -- tables ---------------------------------------------------------------- */ 303 | 304 | table.docutils { 305 | border: 0; 306 | border-collapse: collapse; 307 | } 308 | 309 | table.docutils td, table.docutils th { 310 | padding: 1px 8px 1px 5px; 311 | border-top: 0; 312 | border-left: 0; 313 | border-right: 0; 314 | border-bottom: 1px solid #aaa; 315 | } 316 | 317 | table.field-list td, table.field-list th { 318 | border: 0 !important; 319 | } 320 | 321 | table.footnote td, table.footnote th { 322 | border: 0 !important; 323 | } 324 | 325 | th { 326 | text-align: left; 327 | padding-right: 5px; 328 | } 329 | 330 | table.citation { 331 | border-left: solid 1px gray; 332 | margin-left: 1px; 333 | } 334 | 335 | table.citation td { 336 | border-bottom: none; 337 | } 338 | 339 | /* -- other body styles ----------------------------------------------------- */ 340 | 341 | ol.arabic { 342 | list-style: decimal; 343 | } 344 | 345 | ol.loweralpha { 346 | list-style: lower-alpha; 347 | } 348 | 349 | ol.upperalpha { 350 | list-style: upper-alpha; 351 | } 352 | 353 | ol.lowerroman { 354 | list-style: lower-roman; 355 | } 356 | 357 | ol.upperroman { 358 | list-style: upper-roman; 359 | } 360 | 361 | dl { 362 | margin-bottom: 15px; 363 | } 364 | 365 | dd p { 366 | margin-top: 0px; 367 | } 368 | 369 | dd ul, dd table { 370 | margin-bottom: 10px; 371 | } 372 | 373 | dd { 374 | margin-top: 3px; 375 | margin-bottom: 10px; 376 | margin-left: 30px; 377 | } 378 | 379 | dt:target, .highlighted { 380 | background-color: #fbe54e; 381 | } 382 | 383 | dl.glossary dt { 384 | font-weight: bold; 385 | font-size: 1.1em; 386 | } 387 | 388 | .field-list ul { 389 | margin: 0; 390 | padding-left: 1em; 391 | } 392 | 393 | .field-list p { 394 | margin: 0; 395 | } 396 | 397 | .refcount { 398 | color: #060; 399 | } 400 | 401 | .optional { 402 | font-size: 1.3em; 403 | } 404 | 405 | .versionmodified { 406 | font-style: italic; 407 | } 408 | 409 | .system-message { 410 | background-color: #fda; 411 | padding: 5px; 412 | border: 3px solid red; 413 | } 414 | 415 | .footnote:target { 416 | background-color: #ffa; 417 | } 418 | 419 | .line-block { 420 | display: block; 421 | margin-top: 1em; 422 | margin-bottom: 1em; 423 | } 424 | 425 | .line-block .line-block { 426 | margin-top: 0; 427 | margin-bottom: 0; 428 | margin-left: 1.5em; 429 | } 430 | 431 | .guilabel, .menuselection { 432 | font-family: sans-serif; 433 | } 434 | 435 | .accelerator { 436 | text-decoration: underline; 437 | } 438 | 439 | .classifier { 440 | font-style: oblique; 441 | } 442 | 443 | /* -- code displays --------------------------------------------------------- */ 444 | 445 | pre { 446 | overflow: auto; 447 | overflow-y: hidden; /* fixes display issues on Chrome browsers */ 448 | } 449 | 450 | td.linenos pre { 451 | padding: 5px 0px; 452 | border: 0; 453 | background-color: transparent; 454 | color: #aaa; 455 | } 456 | 457 | table.highlighttable { 458 | margin-left: 0.5em; 459 | } 460 | 461 | table.highlighttable td { 462 | padding: 0 0.5em 0 0.5em; 463 | } 464 | 465 | tt.descname { 466 | background-color: transparent; 467 | font-weight: bold; 468 | font-size: 1.2em; 469 | } 470 | 471 | tt.descclassname { 472 | background-color: transparent; 473 | } 474 | 475 | tt.xref, a tt { 476 | background-color: transparent; 477 | font-weight: bold; 478 | } 479 | 480 | h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt { 481 | background-color: transparent; 482 | } 483 | 484 | .viewcode-link { 485 | float: right; 486 | } 487 | 488 | .viewcode-back { 489 | float: right; 490 | font-family: sans-serif; 491 | } 492 | 493 | div.viewcode-block:target { 494 | margin: -1px -10px; 495 | padding: 0 10px; 496 | } 497 | 498 | /* -- math display ---------------------------------------------------------- */ 499 | 500 | img.math { 501 | vertical-align: middle; 502 | } 503 | 504 | div.body div.math p { 505 | text-align: center; 506 | } 507 | 508 | span.eqno { 509 | float: right; 510 | } 511 | 512 | /* -- printout stylesheet --------------------------------------------------- */ 513 | 514 | @media print { 515 | div.document, 516 | div.documentwrapper, 517 | div.bodywrapper { 518 | margin: 0 !important; 519 | width: 100%; 520 | } 521 | 522 | div.sphinxsidebar, 523 | div.related, 524 | div.footer, 525 | #top-link { 526 | display: none; 527 | } 528 | } 529 | -------------------------------------------------------------------------------- /docs/_build/html/_static/default.css: -------------------------------------------------------------------------------- 1 | /* 2 | * default.css_t 3 | * ~~~~~~~~~~~~~ 4 | * 5 | * Sphinx stylesheet -- default theme. 6 | * 7 | * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | @import url("basic.css"); 13 | 14 | /* -- page layout ----------------------------------------------------------- */ 15 | 16 | body { 17 | font-family: sans-serif; 18 | font-size: 100%; 19 | background-color: #11303d; 20 | color: #000; 21 | margin: 0; 22 | padding: 0; 23 | } 24 | 25 | div.document { 26 | background-color: #1c4e63; 27 | } 28 | 29 | div.documentwrapper { 30 | float: left; 31 | width: 100%; 32 | } 33 | 34 | div.bodywrapper { 35 | margin: 0 0 0 230px; 36 | } 37 | 38 | div.body { 39 | background-color: #ffffff; 40 | color: #000000; 41 | padding: 0 20px 30px 20px; 42 | } 43 | 44 | div.footer { 45 | color: #ffffff; 46 | width: 100%; 47 | padding: 9px 0 9px 0; 48 | text-align: center; 49 | font-size: 75%; 50 | } 51 | 52 | div.footer a { 53 | color: #ffffff; 54 | text-decoration: underline; 55 | } 56 | 57 | div.related { 58 | background-color: #133f52; 59 | line-height: 30px; 60 | color: #ffffff; 61 | } 62 | 63 | div.related a { 64 | color: #ffffff; 65 | } 66 | 67 | div.sphinxsidebar { 68 | } 69 | 70 | div.sphinxsidebar h3 { 71 | font-family: 'Trebuchet MS', sans-serif; 72 | color: #ffffff; 73 | font-size: 1.4em; 74 | font-weight: normal; 75 | margin: 0; 76 | padding: 0; 77 | } 78 | 79 | div.sphinxsidebar h3 a { 80 | color: #ffffff; 81 | } 82 | 83 | div.sphinxsidebar h4 { 84 | font-family: 'Trebuchet MS', sans-serif; 85 | color: #ffffff; 86 | font-size: 1.3em; 87 | font-weight: normal; 88 | margin: 5px 0 0 0; 89 | padding: 0; 90 | } 91 | 92 | div.sphinxsidebar p { 93 | color: #ffffff; 94 | } 95 | 96 | div.sphinxsidebar p.topless { 97 | margin: 5px 10px 10px 10px; 98 | } 99 | 100 | div.sphinxsidebar ul { 101 | margin: 10px; 102 | padding: 0; 103 | color: #ffffff; 104 | } 105 | 106 | div.sphinxsidebar a { 107 | color: #98dbcc; 108 | } 109 | 110 | div.sphinxsidebar input { 111 | border: 1px solid #98dbcc; 112 | font-family: sans-serif; 113 | font-size: 1em; 114 | } 115 | 116 | 117 | 118 | /* -- hyperlink styles ------------------------------------------------------ */ 119 | 120 | a { 121 | color: #355f7c; 122 | text-decoration: none; 123 | } 124 | 125 | a:visited { 126 | color: #355f7c; 127 | text-decoration: none; 128 | } 129 | 130 | a:hover { 131 | text-decoration: underline; 132 | } 133 | 134 | 135 | 136 | /* -- body styles ----------------------------------------------------------- */ 137 | 138 | div.body h1, 139 | div.body h2, 140 | div.body h3, 141 | div.body h4, 142 | div.body h5, 143 | div.body h6 { 144 | font-family: 'Trebuchet MS', sans-serif; 145 | background-color: #f2f2f2; 146 | font-weight: normal; 147 | color: #20435c; 148 | border-bottom: 1px solid #ccc; 149 | margin: 20px -20px 10px -20px; 150 | padding: 3px 0 3px 10px; 151 | } 152 | 153 | div.body h1 { margin-top: 0; font-size: 200%; } 154 | div.body h2 { font-size: 160%; } 155 | div.body h3 { font-size: 140%; } 156 | div.body h4 { font-size: 120%; } 157 | div.body h5 { font-size: 110%; } 158 | div.body h6 { font-size: 100%; } 159 | 160 | a.headerlink { 161 | color: #c60f0f; 162 | font-size: 0.8em; 163 | padding: 0 4px 0 4px; 164 | text-decoration: none; 165 | } 166 | 167 | a.headerlink:hover { 168 | background-color: #c60f0f; 169 | color: white; 170 | } 171 | 172 | div.body p, div.body dd, div.body li { 173 | text-align: justify; 174 | line-height: 130%; 175 | } 176 | 177 | div.admonition p.admonition-title + p { 178 | display: inline; 179 | } 180 | 181 | div.admonition p { 182 | margin-bottom: 5px; 183 | } 184 | 185 | div.admonition pre { 186 | margin-bottom: 5px; 187 | } 188 | 189 | div.admonition ul, div.admonition ol { 190 | margin-bottom: 5px; 191 | } 192 | 193 | div.note { 194 | background-color: #eee; 195 | border: 1px solid #ccc; 196 | } 197 | 198 | div.seealso { 199 | background-color: #ffc; 200 | border: 1px solid #ff6; 201 | } 202 | 203 | div.topic { 204 | background-color: #eee; 205 | } 206 | 207 | div.warning { 208 | background-color: #ffe4e4; 209 | border: 1px solid #f66; 210 | } 211 | 212 | p.admonition-title { 213 | display: inline; 214 | } 215 | 216 | p.admonition-title:after { 217 | content: ":"; 218 | } 219 | 220 | pre { 221 | padding: 5px; 222 | background-color: #eeffcc; 223 | color: #333333; 224 | line-height: 120%; 225 | border: 1px solid #ac9; 226 | border-left: none; 227 | border-right: none; 228 | } 229 | 230 | tt { 231 | background-color: #ecf0f3; 232 | padding: 0 1px 0 1px; 233 | font-size: 0.95em; 234 | } 235 | 236 | th { 237 | background-color: #ede; 238 | } 239 | 240 | .warning tt { 241 | background: #efc2c2; 242 | } 243 | 244 | .note tt { 245 | background: #d6d6d6; 246 | } 247 | 248 | .viewcode-back { 249 | font-family: sans-serif; 250 | } 251 | 252 | div.viewcode-block:target { 253 | background-color: #f4debf; 254 | border-top: 1px solid #ac9; 255 | border-bottom: 1px solid #ac9; 256 | } -------------------------------------------------------------------------------- /docs/_build/html/_static/doctools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * doctools.js 3 | * ~~~~~~~~~~~ 4 | * 5 | * Sphinx JavaScript utilties for all documentation. 6 | * 7 | * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /** 13 | * select a different prefix for underscore 14 | */ 15 | $u = _.noConflict(); 16 | 17 | /** 18 | * make the code below compatible with browsers without 19 | * an installed firebug like debugger 20 | if (!window.console || !console.firebug) { 21 | var names = ["log", "debug", "info", "warn", "error", "assert", "dir", 22 | "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", 23 | "profile", "profileEnd"]; 24 | window.console = {}; 25 | for (var i = 0; i < names.length; ++i) 26 | window.console[names[i]] = function() {}; 27 | } 28 | */ 29 | 30 | /** 31 | * small helper function to urldecode strings 32 | */ 33 | jQuery.urldecode = function(x) { 34 | return decodeURIComponent(x).replace(/\+/g, ' '); 35 | } 36 | 37 | /** 38 | * small helper function to urlencode strings 39 | */ 40 | jQuery.urlencode = encodeURIComponent; 41 | 42 | /** 43 | * This function returns the parsed url parameters of the 44 | * current request. Multiple values per key are supported, 45 | * it will always return arrays of strings for the value parts. 46 | */ 47 | jQuery.getQueryParameters = function(s) { 48 | if (typeof s == 'undefined') 49 | s = document.location.search; 50 | var parts = s.substr(s.indexOf('?') + 1).split('&'); 51 | var result = {}; 52 | for (var i = 0; i < parts.length; i++) { 53 | var tmp = parts[i].split('=', 2); 54 | var key = jQuery.urldecode(tmp[0]); 55 | var value = jQuery.urldecode(tmp[1]); 56 | if (key in result) 57 | result[key].push(value); 58 | else 59 | result[key] = [value]; 60 | } 61 | return result; 62 | }; 63 | 64 | /** 65 | * small function to check if an array contains 66 | * a given item. 67 | */ 68 | jQuery.contains = function(arr, item) { 69 | for (var i = 0; i < arr.length; i++) { 70 | if (arr[i] == item) 71 | return true; 72 | } 73 | return false; 74 | }; 75 | 76 | /** 77 | * highlight a given string on a jquery object by wrapping it in 78 | * span elements with the given class name. 79 | */ 80 | jQuery.fn.highlightText = function(text, className) { 81 | function highlight(node) { 82 | if (node.nodeType == 3) { 83 | var val = node.nodeValue; 84 | var pos = val.toLowerCase().indexOf(text); 85 | if (pos >= 0 && !jQuery(node.parentNode).hasClass(className)) { 86 | var span = document.createElement("span"); 87 | span.className = className; 88 | span.appendChild(document.createTextNode(val.substr(pos, text.length))); 89 | node.parentNode.insertBefore(span, node.parentNode.insertBefore( 90 | document.createTextNode(val.substr(pos + text.length)), 91 | node.nextSibling)); 92 | node.nodeValue = val.substr(0, pos); 93 | } 94 | } 95 | else if (!jQuery(node).is("button, select, textarea")) { 96 | jQuery.each(node.childNodes, function() { 97 | highlight(this); 98 | }); 99 | } 100 | } 101 | return this.each(function() { 102 | highlight(this); 103 | }); 104 | }; 105 | 106 | /** 107 | * Small JavaScript module for the documentation. 108 | */ 109 | var Documentation = { 110 | 111 | init : function() { 112 | this.fixFirefoxAnchorBug(); 113 | this.highlightSearchWords(); 114 | this.initIndexTable(); 115 | }, 116 | 117 | /** 118 | * i18n support 119 | */ 120 | TRANSLATIONS : {}, 121 | PLURAL_EXPR : function(n) { return n == 1 ? 0 : 1; }, 122 | LOCALE : 'unknown', 123 | 124 | // gettext and ngettext don't access this so that the functions 125 | // can safely bound to a different name (_ = Documentation.gettext) 126 | gettext : function(string) { 127 | var translated = Documentation.TRANSLATIONS[string]; 128 | if (typeof translated == 'undefined') 129 | return string; 130 | return (typeof translated == 'string') ? translated : translated[0]; 131 | }, 132 | 133 | ngettext : function(singular, plural, n) { 134 | var translated = Documentation.TRANSLATIONS[singular]; 135 | if (typeof translated == 'undefined') 136 | return (n == 1) ? singular : plural; 137 | return translated[Documentation.PLURALEXPR(n)]; 138 | }, 139 | 140 | addTranslations : function(catalog) { 141 | for (var key in catalog.messages) 142 | this.TRANSLATIONS[key] = catalog.messages[key]; 143 | this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')'); 144 | this.LOCALE = catalog.locale; 145 | }, 146 | 147 | /** 148 | * add context elements like header anchor links 149 | */ 150 | addContextElements : function() { 151 | $('div[id] > :header:first').each(function() { 152 | $('\u00B6'). 153 | attr('href', '#' + this.id). 154 | attr('title', _('Permalink to this headline')). 155 | appendTo(this); 156 | }); 157 | $('dt[id]').each(function() { 158 | $('\u00B6'). 159 | attr('href', '#' + this.id). 160 | attr('title', _('Permalink to this definition')). 161 | appendTo(this); 162 | }); 163 | }, 164 | 165 | /** 166 | * workaround a firefox stupidity 167 | */ 168 | fixFirefoxAnchorBug : function() { 169 | if (document.location.hash && $.browser.mozilla) 170 | window.setTimeout(function() { 171 | document.location.href += ''; 172 | }, 10); 173 | }, 174 | 175 | /** 176 | * highlight the search words provided in the url in the text 177 | */ 178 | highlightSearchWords : function() { 179 | var params = $.getQueryParameters(); 180 | var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : []; 181 | if (terms.length) { 182 | var body = $('div.body'); 183 | window.setTimeout(function() { 184 | $.each(terms, function() { 185 | body.highlightText(this.toLowerCase(), 'highlighted'); 186 | }); 187 | }, 10); 188 | $('') 190 | .appendTo($('.sidebar .this-page-menu')); 191 | } 192 | }, 193 | 194 | /** 195 | * init the domain index toggle buttons 196 | */ 197 | initIndexTable : function() { 198 | var togglers = $('img.toggler').click(function() { 199 | var src = $(this).attr('src'); 200 | var idnum = $(this).attr('id').substr(7); 201 | $('tr.cg-' + idnum).toggle(); 202 | if (src.substr(-9) == 'minus.png') 203 | $(this).attr('src', src.substr(0, src.length-9) + 'plus.png'); 204 | else 205 | $(this).attr('src', src.substr(0, src.length-8) + 'minus.png'); 206 | }).css('display', ''); 207 | if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) { 208 | togglers.click(); 209 | } 210 | }, 211 | 212 | /** 213 | * helper function to hide the search marks again 214 | */ 215 | hideSearchWords : function() { 216 | $('.sidebar .this-page-menu li.highlight-link').fadeOut(300); 217 | $('span.highlighted').removeClass('highlighted'); 218 | }, 219 | 220 | /** 221 | * make the url absolute 222 | */ 223 | makeURL : function(relativeURL) { 224 | return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL; 225 | }, 226 | 227 | /** 228 | * get the current relative url 229 | */ 230 | getCurrentURL : function() { 231 | var path = document.location.pathname; 232 | var parts = path.split(/\//); 233 | $.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() { 234 | if (this == '..') 235 | parts.pop(); 236 | }); 237 | var url = parts.join('/'); 238 | return path.substring(url.lastIndexOf('/') + 1, path.length - 1); 239 | } 240 | }; 241 | 242 | // quick alias for translations 243 | _ = Documentation.gettext; 244 | 245 | $(document).ready(function() { 246 | Documentation.init(); 247 | }); 248 | -------------------------------------------------------------------------------- /docs/_build/html/_static/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunlightlabs/python-transparencydata/f843f7c54b4aa742f55f6a8ea5b4f7f12788c9f8/docs/_build/html/_static/file.png -------------------------------------------------------------------------------- /docs/_build/html/_static/minus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunlightlabs/python-transparencydata/f843f7c54b4aa742f55f6a8ea5b4f7f12788c9f8/docs/_build/html/_static/minus.png -------------------------------------------------------------------------------- /docs/_build/html/_static/plus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sunlightlabs/python-transparencydata/f843f7c54b4aa742f55f6a8ea5b4f7f12788c9f8/docs/_build/html/_static/plus.png -------------------------------------------------------------------------------- /docs/_build/html/_static/pygments.css: -------------------------------------------------------------------------------- 1 | .highlight .hll { background-color: #ffffcc } 2 | .highlight { background: #eeffcc; } 3 | .highlight .c { color: #408090; font-style: italic } /* Comment */ 4 | .highlight .err { border: 1px solid #FF0000 } /* Error */ 5 | .highlight .k { color: #007020; font-weight: bold } /* Keyword */ 6 | .highlight .o { color: #666666 } /* Operator */ 7 | .highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */ 8 | .highlight .cp { color: #007020 } /* Comment.Preproc */ 9 | .highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */ 10 | .highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */ 11 | .highlight .gd { color: #A00000 } /* Generic.Deleted */ 12 | .highlight .ge { font-style: italic } /* Generic.Emph */ 13 | .highlight .gr { color: #FF0000 } /* Generic.Error */ 14 | .highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */ 15 | .highlight .gi { color: #00A000 } /* Generic.Inserted */ 16 | .highlight .go { color: #303030 } /* Generic.Output */ 17 | .highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */ 18 | .highlight .gs { font-weight: bold } /* Generic.Strong */ 19 | .highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */ 20 | .highlight .gt { color: #0040D0 } /* Generic.Traceback */ 21 | .highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */ 22 | .highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */ 23 | .highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */ 24 | .highlight .kp { color: #007020 } /* Keyword.Pseudo */ 25 | .highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */ 26 | .highlight .kt { color: #902000 } /* Keyword.Type */ 27 | .highlight .m { color: #208050 } /* Literal.Number */ 28 | .highlight .s { color: #4070a0 } /* Literal.String */ 29 | .highlight .na { color: #4070a0 } /* Name.Attribute */ 30 | .highlight .nb { color: #007020 } /* Name.Builtin */ 31 | .highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */ 32 | .highlight .no { color: #60add5 } /* Name.Constant */ 33 | .highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */ 34 | .highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */ 35 | .highlight .ne { color: #007020 } /* Name.Exception */ 36 | .highlight .nf { color: #06287e } /* Name.Function */ 37 | .highlight .nl { color: #002070; font-weight: bold } /* Name.Label */ 38 | .highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */ 39 | .highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */ 40 | .highlight .nv { color: #bb60d5 } /* Name.Variable */ 41 | .highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */ 42 | .highlight .w { color: #bbbbbb } /* Text.Whitespace */ 43 | .highlight .mf { color: #208050 } /* Literal.Number.Float */ 44 | .highlight .mh { color: #208050 } /* Literal.Number.Hex */ 45 | .highlight .mi { color: #208050 } /* Literal.Number.Integer */ 46 | .highlight .mo { color: #208050 } /* Literal.Number.Oct */ 47 | .highlight .sb { color: #4070a0 } /* Literal.String.Backtick */ 48 | .highlight .sc { color: #4070a0 } /* Literal.String.Char */ 49 | .highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */ 50 | .highlight .s2 { color: #4070a0 } /* Literal.String.Double */ 51 | .highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */ 52 | .highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */ 53 | .highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */ 54 | .highlight .sx { color: #c65d09 } /* Literal.String.Other */ 55 | .highlight .sr { color: #235388 } /* Literal.String.Regex */ 56 | .highlight .s1 { color: #4070a0 } /* Literal.String.Single */ 57 | .highlight .ss { color: #517918 } /* Literal.String.Symbol */ 58 | .highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */ 59 | .highlight .vc { color: #bb60d5 } /* Name.Variable.Class */ 60 | .highlight .vg { color: #bb60d5 } /* Name.Variable.Global */ 61 | .highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */ 62 | .highlight .il { color: #208050 } /* Literal.Number.Integer.Long */ -------------------------------------------------------------------------------- /docs/_build/html/_static/searchtools.js: -------------------------------------------------------------------------------- 1 | /* 2 | * searchtools.js 3 | * ~~~~~~~~~~~~~~ 4 | * 5 | * Sphinx JavaScript utilties for the full-text search. 6 | * 7 | * :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. 8 | * :license: BSD, see LICENSE for details. 9 | * 10 | */ 11 | 12 | /** 13 | * helper function to return a node containing the 14 | * search summary for a given text. keywords is a list 15 | * of stemmed words, hlwords is the list of normal, unstemmed 16 | * words. the first one is used to find the occurance, the 17 | * latter for highlighting it. 18 | */ 19 | 20 | jQuery.makeSearchSummary = function(text, keywords, hlwords) { 21 | var textLower = text.toLowerCase(); 22 | var start = 0; 23 | $.each(keywords, function() { 24 | var i = textLower.indexOf(this.toLowerCase()); 25 | if (i > -1) 26 | start = i; 27 | }); 28 | start = Math.max(start - 120, 0); 29 | var excerpt = ((start > 0) ? '...' : '') + 30 | $.trim(text.substr(start, 240)) + 31 | ((start + 240 - text.length) ? '...' : ''); 32 | var rv = $('
').text(excerpt); 33 | $.each(hlwords, function() { 34 | rv = rv.highlightText(this, 'highlighted'); 35 | }); 36 | return rv; 37 | } 38 | 39 | /** 40 | * Porter Stemmer 41 | */ 42 | var PorterStemmer = function() { 43 | 44 | var step2list = { 45 | ational: 'ate', 46 | tional: 'tion', 47 | enci: 'ence', 48 | anci: 'ance', 49 | izer: 'ize', 50 | bli: 'ble', 51 | alli: 'al', 52 | entli: 'ent', 53 | eli: 'e', 54 | ousli: 'ous', 55 | ization: 'ize', 56 | ation: 'ate', 57 | ator: 'ate', 58 | alism: 'al', 59 | iveness: 'ive', 60 | fulness: 'ful', 61 | ousness: 'ous', 62 | aliti: 'al', 63 | iviti: 'ive', 64 | biliti: 'ble', 65 | logi: 'log' 66 | }; 67 | 68 | var step3list = { 69 | icate: 'ic', 70 | ative: '', 71 | alize: 'al', 72 | iciti: 'ic', 73 | ical: 'ic', 74 | ful: '', 75 | ness: '' 76 | }; 77 | 78 | var c = "[^aeiou]"; // consonant 79 | var v = "[aeiouy]"; // vowel 80 | var C = c + "[^aeiouy]*"; // consonant sequence 81 | var V = v + "[aeiou]*"; // vowel sequence 82 | 83 | var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 84 | var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 85 | var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 86 | var s_v = "^(" + C + ")?" + v; // vowel in stem 87 | 88 | this.stemWord = function (w) { 89 | var stem; 90 | var suffix; 91 | var firstch; 92 | var origword = w; 93 | 94 | if (w.length < 3) 95 | return w; 96 | 97 | var re; 98 | var re2; 99 | var re3; 100 | var re4; 101 | 102 | firstch = w.substr(0,1); 103 | if (firstch == "y") 104 | w = firstch.toUpperCase() + w.substr(1); 105 | 106 | // Step 1a 107 | re = /^(.+?)(ss|i)es$/; 108 | re2 = /^(.+?)([^s])s$/; 109 | 110 | if (re.test(w)) 111 | w = w.replace(re,"$1$2"); 112 | else if (re2.test(w)) 113 | w = w.replace(re2,"$1$2"); 114 | 115 | // Step 1b 116 | re = /^(.+?)eed$/; 117 | re2 = /^(.+?)(ed|ing)$/; 118 | if (re.test(w)) { 119 | var fp = re.exec(w); 120 | re = new RegExp(mgr0); 121 | if (re.test(fp[1])) { 122 | re = /.$/; 123 | w = w.replace(re,""); 124 | } 125 | } 126 | else if (re2.test(w)) { 127 | var fp = re2.exec(w); 128 | stem = fp[1]; 129 | re2 = new RegExp(s_v); 130 | if (re2.test(stem)) { 131 | w = stem; 132 | re2 = /(at|bl|iz)$/; 133 | re3 = new RegExp("([^aeiouylsz])\\1$"); 134 | re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 135 | if (re2.test(w)) 136 | w = w + "e"; 137 | else if (re3.test(w)) { 138 | re = /.$/; 139 | w = w.replace(re,""); 140 | } 141 | else if (re4.test(w)) 142 | w = w + "e"; 143 | } 144 | } 145 | 146 | // Step 1c 147 | re = /^(.+?)y$/; 148 | if (re.test(w)) { 149 | var fp = re.exec(w); 150 | stem = fp[1]; 151 | re = new RegExp(s_v); 152 | if (re.test(stem)) 153 | w = stem + "i"; 154 | } 155 | 156 | // Step 2 157 | re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; 158 | if (re.test(w)) { 159 | var fp = re.exec(w); 160 | stem = fp[1]; 161 | suffix = fp[2]; 162 | re = new RegExp(mgr0); 163 | if (re.test(stem)) 164 | w = stem + step2list[suffix]; 165 | } 166 | 167 | // Step 3 168 | re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; 169 | if (re.test(w)) { 170 | var fp = re.exec(w); 171 | stem = fp[1]; 172 | suffix = fp[2]; 173 | re = new RegExp(mgr0); 174 | if (re.test(stem)) 175 | w = stem + step3list[suffix]; 176 | } 177 | 178 | // Step 4 179 | re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; 180 | re2 = /^(.+?)(s|t)(ion)$/; 181 | if (re.test(w)) { 182 | var fp = re.exec(w); 183 | stem = fp[1]; 184 | re = new RegExp(mgr1); 185 | if (re.test(stem)) 186 | w = stem; 187 | } 188 | else if (re2.test(w)) { 189 | var fp = re2.exec(w); 190 | stem = fp[1] + fp[2]; 191 | re2 = new RegExp(mgr1); 192 | if (re2.test(stem)) 193 | w = stem; 194 | } 195 | 196 | // Step 5 197 | re = /^(.+?)e$/; 198 | if (re.test(w)) { 199 | var fp = re.exec(w); 200 | stem = fp[1]; 201 | re = new RegExp(mgr1); 202 | re2 = new RegExp(meq1); 203 | re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); 204 | if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) 205 | w = stem; 206 | } 207 | re = /ll$/; 208 | re2 = new RegExp(mgr1); 209 | if (re.test(w) && re2.test(w)) { 210 | re = /.$/; 211 | w = w.replace(re,""); 212 | } 213 | 214 | // and turn initial Y back to y 215 | if (firstch == "y") 216 | w = firstch.toLowerCase() + w.substr(1); 217 | return w; 218 | } 219 | } 220 | 221 | 222 | /** 223 | * Search Module 224 | */ 225 | var Search = { 226 | 227 | _index : null, 228 | _queued_query : null, 229 | _pulse_status : -1, 230 | 231 | init : function() { 232 | var params = $.getQueryParameters(); 233 | if (params.q) { 234 | var query = params.q[0]; 235 | $('input[name="q"]')[0].value = query; 236 | this.performSearch(query); 237 | } 238 | }, 239 | 240 | loadIndex : function(url) { 241 | $.ajax({type: "GET", url: url, data: null, success: null, 242 | dataType: "script", cache: true}); 243 | }, 244 | 245 | setIndex : function(index) { 246 | var q; 247 | this._index = index; 248 | if ((q = this._queued_query) !== null) { 249 | this._queued_query = null; 250 | Search.query(q); 251 | } 252 | }, 253 | 254 | hasIndex : function() { 255 | return this._index !== null; 256 | }, 257 | 258 | deferQuery : function(query) { 259 | this._queued_query = query; 260 | }, 261 | 262 | stopPulse : function() { 263 | this._pulse_status = 0; 264 | }, 265 | 266 | startPulse : function() { 267 | if (this._pulse_status >= 0) 268 | return; 269 | function pulse() { 270 | Search._pulse_status = (Search._pulse_status + 1) % 4; 271 | var dotString = ''; 272 | for (var i = 0; i < Search._pulse_status; i++) 273 | dotString += '.'; 274 | Search.dots.text(dotString); 275 | if (Search._pulse_status > -1) 276 | window.setTimeout(pulse, 500); 277 | }; 278 | pulse(); 279 | }, 280 | 281 | /** 282 | * perform a search for something 283 | */ 284 | performSearch : function(query) { 285 | // create the required interface elements 286 | this.out = $('#search-results'); 287 | this.title = $('

' + _('Searching') + '

').appendTo(this.out); 288 | this.dots = $('').appendTo(this.title); 289 | this.status = $('

').appendTo(this.out); 290 | this.output = $('