Skip to content

Commit e84b7d1

Browse files
author
Kenneth Reitz
committed
import from osxpython.org
1 parent 6ef05ab commit e84b7d1

File tree

22 files changed

+1821
-0
lines changed

22 files changed

+1821
-0
lines changed

docs/Makefile

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
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 <target>' where <target> 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/osxpython.qhcp"
76+
@echo "To view the help file:"
77+
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/osxpython.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/osxpython"
85+
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/osxpython"
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."

docs/_static/test

Whitespace-only changes.

docs/_templates/test

Whitespace-only changes.

docs/_themes/.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.pyc
2+
*.pyo
3+
.DS_Store

docs/_themes/LICENSE

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
Modifications:
2+
3+
Copyright (c) 2010 Kenneth Reitz.
4+
5+
6+
Original Project:
7+
8+
Copyright (c) 2010 by Armin Ronacher.
9+
10+
11+
Some rights reserved.
12+
13+
Redistribution and use in source and binary forms of the theme, with or
14+
without modification, are permitted provided that the following conditions
15+
are met:
16+
17+
* Redistributions of source code must retain the above copyright
18+
notice, this list of conditions and the following disclaimer.
19+
20+
* Redistributions in binary form must reproduce the above
21+
copyright notice, this list of conditions and the following
22+
disclaimer in the documentation and/or other materials provided
23+
with the distribution.
24+
25+
* The names of the contributors may not be used to endorse or
26+
promote products derived from this software without specific
27+
prior written permission.
28+
29+
We kindly ask you to only use these themes in an unmodified manner just
30+
for Flask and Flask-related products, not for unrelated projects. If you
31+
like the visual style and want to use it for your own projects, please
32+
consider making some larger changes to the themes (such as changing
33+
font faces, sizes, colors or margins).
34+
35+
THIS THEME IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
36+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
37+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
38+
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
39+
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
40+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
41+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
42+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
43+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
44+
ARISING IN ANY WAY OUT OF THE USE OF THIS THEME, EVEN IF ADVISED OF THE
45+
POSSIBILITY OF SUCH DAMAGE.

docs/_themes/README.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
krTheme Sphinx Style
2+
====================
3+
4+
This repository contains sphinx styles Kenneth Reitz uses in most of
5+
his projects. It is a drivative of Mitsuhiko's themes for Flask and Flask related
6+
projects. To use this style in your Sphinx documentation, follow
7+
this guide:
8+
9+
1. put this folder as _themes into your docs folder. Alternatively
10+
you can also use git submodules to check out the contents there.
11+
12+
2. add this to your conf.py: ::
13+
14+
sys.path.append(os.path.abspath('_themes'))
15+
html_theme_path = ['_themes']
16+
html_theme = 'flask'
17+
18+
The following themes exist:
19+
20+
**kr**
21+
the standard flask documentation theme for large projects
22+
23+
**kr_small**
24+
small one-page theme. Intended to be used by very small addon libraries.
25+
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# flasky extensions. flasky pygments style based on tango style
2+
from pygments.style import Style
3+
from pygments.token import Keyword, Name, Comment, String, Error, \
4+
Number, Operator, Generic, Whitespace, Punctuation, Other, Literal
5+
6+
7+
class FlaskyStyle(Style):
8+
background_color = "#f8f8f8"
9+
default_style = ""
10+
11+
styles = {
12+
# No corresponding class for the following:
13+
#Text: "", # class: ''
14+
Whitespace: "underline #f8f8f8", # class: 'w'
15+
Error: "#a40000 border:#ef2929", # class: 'err'
16+
Other: "#000000", # class 'x'
17+
18+
Comment: "italic #8f5902", # class: 'c'
19+
Comment.Preproc: "noitalic", # class: 'cp'
20+
21+
Keyword: "bold #004461", # class: 'k'
22+
Keyword.Constant: "bold #004461", # class: 'kc'
23+
Keyword.Declaration: "bold #004461", # class: 'kd'
24+
Keyword.Namespace: "bold #004461", # class: 'kn'
25+
Keyword.Pseudo: "bold #004461", # class: 'kp'
26+
Keyword.Reserved: "bold #004461", # class: 'kr'
27+
Keyword.Type: "bold #004461", # class: 'kt'
28+
29+
Operator: "#582800", # class: 'o'
30+
Operator.Word: "bold #004461", # class: 'ow' - like keywords
31+
32+
Punctuation: "bold #000000", # class: 'p'
33+
34+
# because special names such as Name.Class, Name.Function, etc.
35+
# are not recognized as such later in the parsing, we choose them
36+
# to look the same as ordinary variables.
37+
Name: "#000000", # class: 'n'
38+
Name.Attribute: "#c4a000", # class: 'na' - to be revised
39+
Name.Builtin: "#004461", # class: 'nb'
40+
Name.Builtin.Pseudo: "#3465a4", # class: 'bp'
41+
Name.Class: "#000000", # class: 'nc' - to be revised
42+
Name.Constant: "#000000", # class: 'no' - to be revised
43+
Name.Decorator: "#888", # class: 'nd' - to be revised
44+
Name.Entity: "#ce5c00", # class: 'ni'
45+
Name.Exception: "bold #cc0000", # class: 'ne'
46+
Name.Function: "#000000", # class: 'nf'
47+
Name.Property: "#000000", # class: 'py'
48+
Name.Label: "#f57900", # class: 'nl'
49+
Name.Namespace: "#000000", # class: 'nn' - to be revised
50+
Name.Other: "#000000", # class: 'nx'
51+
Name.Tag: "bold #004461", # class: 'nt' - like a keyword
52+
Name.Variable: "#000000", # class: 'nv' - to be revised
53+
Name.Variable.Class: "#000000", # class: 'vc' - to be revised
54+
Name.Variable.Global: "#000000", # class: 'vg' - to be revised
55+
Name.Variable.Instance: "#000000", # class: 'vi' - to be revised
56+
57+
Number: "#990000", # class: 'm'
58+
59+
Literal: "#000000", # class: 'l'
60+
Literal.Date: "#000000", # class: 'ld'
61+
62+
String: "#4e9a06", # class: 's'
63+
String.Backtick: "#4e9a06", # class: 'sb'
64+
String.Char: "#4e9a06", # class: 'sc'
65+
String.Doc: "italic #8f5902", # class: 'sd' - like a comment
66+
String.Double: "#4e9a06", # class: 's2'
67+
String.Escape: "#4e9a06", # class: 'se'
68+
String.Heredoc: "#4e9a06", # class: 'sh'
69+
String.Interpol: "#4e9a06", # class: 'si'
70+
String.Other: "#4e9a06", # class: 'sx'
71+
String.Regex: "#4e9a06", # class: 'sr'
72+
String.Single: "#4e9a06", # class: 's1'
73+
String.Symbol: "#4e9a06", # class: 'ss'
74+
75+
Generic: "#000000", # class: 'g'
76+
Generic.Deleted: "#a40000", # class: 'gd'
77+
Generic.Emph: "italic #000000", # class: 'ge'
78+
Generic.Error: "#ef2929", # class: 'gr'
79+
Generic.Heading: "bold #000080", # class: 'gh'
80+
Generic.Inserted: "#00A000", # class: 'gi'
81+
Generic.Output: "#888", # class: 'go'
82+
Generic.Prompt: "#745334", # class: 'gp'
83+
Generic.Strong: "bold #000000", # class: 'gs'
84+
Generic.Subheading: "bold #800080", # class: 'gu'
85+
Generic.Traceback: "bold #a40000", # class: 'gt'
86+
}

docs/_themes/kr/layout.html

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{%- extends "basic/layout.html" %}
2+
{%- block extrahead %}
3+
{{ super() }}
4+
{% if theme_touch_icon %}
5+
<link rel="apple-touch-icon" href="{{ pathto('_static/' ~ theme_touch_icon, 1) }}" />
6+
{% endif %}
7+
<link media="only screen and (max-device-width: 480px)" href="{{
8+
pathto('_static/small_flask.css', 1) }}" type= "text/css" rel="stylesheet" />
9+
{% endblock %}
10+
{%- block relbar2 %}{% endblock %}
11+
{%- block footer %}
12+
<div class="footer">
13+
&copy; Copyright {{ copyright }}.
14+
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a>.
15+
</div>
16+
{%- endblock %}

docs/_themes/kr/relations.html

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<h3>Related Topics</h3>
2+
<ul>
3+
<li><a href="{{ pathto(master_doc) }}">Documentation overview</a><ul>
4+
{%- for parent in parents %}
5+
<li><a href="{{ parent.link|e }}">{{ parent.title }}</a><ul>
6+
{%- endfor %}
7+
{%- if prev %}
8+
<li>Previous: <a href="{{ prev.link|e }}" title="{{ _('previous chapter')
9+
}}">{{ prev.title }}</a></li>
10+
{%- endif %}
11+
{%- if next %}
12+
<li>Next: <a href="{{ next.link|e }}" title="{{ _('next chapter')
13+
}}">{{ next.title }}</a></li>
14+
{%- endif %}
15+
{%- for parent in parents %}
16+
</ul></li>
17+
{%- endfor %}
18+
</ul></li>
19+
</ul>

0 commit comments

Comments
 (0)