Skip to content

Commit 55e1b7d

Browse files
committed
Build man pages from the sphinx documentation
1 parent 6c395f1 commit 55e1b7d

File tree

4 files changed

+159
-1
lines changed

4 files changed

+159
-1
lines changed

doc/sphinx/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ help:
2222
@echo " htmlhelp to make HTML files and a HTML help project"
2323
@echo " qthelp to make HTML files and a qthelp project"
2424
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
25+
@echo " man to make manual pages"
2526
@echo " changes to make an overview of all changed/added/deprecated items"
2627
@echo " linkcheck to check all external links for integrity"
2728
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@@ -71,6 +72,11 @@ latex:
7172
@echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
7273
"run these through (pdf)latex."
7374

75+
man:
76+
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) build/man
77+
@echo
78+
@echo "Build finished; the manual pages are in build/man."
79+
7480
changes:
7581
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) build/changes
7682
@echo

doc/sphinx/source/conf.py

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
# General information about the project.
4040
project = u'bpython'
41-
copyright = u'2008-2011 Bob Farrell, Andreas Stuehrk et al.'
41+
copyright = u'2008-2012 Bob Farrell, Andreas Stuehrk et al.'
4242

4343
# The version info for the project you're documenting, acts as replacement for
4444
# |version| and |release|, also used in various other places throughout the
@@ -192,3 +192,20 @@
192192

193193
# If false, no module index is generated.
194194
#latex_use_modindex = True
195+
196+
# -- Options for manual page output --------------------------------------------
197+
198+
# One entry per manual page. List of tuples
199+
# (source start file, name, description, authors, manual section).
200+
man_pages = [
201+
('man-bpython', 'bpython',
202+
u'a fancy {curses, GTK+, urwid} interface to the Python interactive interpreter',
203+
[], 1),
204+
('man-bpython-config', 'bpython-config',
205+
u'user configuration file for bpython',
206+
[], 5)
207+
]
208+
209+
# If true, show URL addresses after external links.
210+
#man_show_urls = False
211+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
:orphan:
2+
3+
bpython-config manual page
4+
==========================
5+
6+
Synopsis
7+
--------
8+
9+
**$XDG_CONFIG_HOME/bpython/config**
10+
11+
12+
Description
13+
-----------
14+
15+
The configuration file contains various options controlling the behaviour of
16+
:program:`bpython`.
17+
18+
Author
19+
------
20+
21+
:program:`bpython` was written by Robert Anthony Farrell
22+
<robertanthonyfarrel@gmail.com> and his bunch of loyal followers.
23+
24+
This manual page was written by Jørgen Pedersen Tjernø <jorgen@devsoft.no>,
25+
for the Debian project (but may be used by others).

doc/sphinx/source/man-bpython.rst

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
:orphan:
2+
3+
bpython manual page
4+
===================
5+
6+
Synopsis
7+
--------
8+
9+
**bpython** [*options*] [*file* [*args*]]
10+
11+
**bpython-gtk** [*options*] [*file* [*args*]]
12+
13+
**bpython-urwid** [*options*] [*file* [*args*]]
14+
15+
16+
Description
17+
-----------
18+
The idea is to provide the user with all the features in-line, much like modern
19+
IDEs, but in a simple, lightweight package that can be run in a terminal window.
20+
21+
In-line syntax highlighting.
22+
Hilights commands as you type!
23+
24+
Readline-like autocomplete with suggestions displayed as you type.
25+
Press tab to complete expressions when there's only one suggestion.
26+
27+
Expected parameter list.
28+
This displays a list of parameters for any function you call. It uses the
29+
inspect module, then tries pydoc.
30+
31+
Rewind.
32+
This is a bit misleading, but it code that has been entered is remembered,
33+
and when you Rewind, it pops the last line and re\-evaluates the entire
34+
code. This is error\-prone, and mostly useful for defining classes and
35+
functions.
36+
37+
Pastebin code/write to file.
38+
This posts the current buffer to a pastebin (paste.pocoo.org) or writes it
39+
to a file.
40+
41+
Flush curses screen to stdout.
42+
Unlike other curses apps, bpython dumps the screen data to stdout when you
43+
quit, so you see what you've done in the buffer of your terminal.
44+
45+
Options
46+
-------
47+
48+
The long and short forms of options, shown here as alternatives, are equivalent.
49+
If :program:`bpython` sees an argument it does not know, execution falls back to
50+
the regular Python interpreter.
51+
52+
53+
--config=<config> Use <config> instead of default config file.
54+
-h, --help Show the help message and exit.
55+
-i, --interactive Drop to bpython shell after running file instead of exiting.
56+
The PYTHONSTARTUP file is not read.
57+
-q, --quiet Do not flush the output to stdout.
58+
-V, --version Print :program:`bpython`'s version and exit.
59+
60+
In addition to the above options, :program:`bpython-urwid` also supports the
61+
following options if Twisted is available:
62+
63+
-r <reactor>, --reactor=<reactor> Use Twisted's <reactor> instead of urwid's
64+
event loop.
65+
--help-reactors Display a list of available Twisted
66+
reactors.
67+
-p <plugin>, --plugin=<plugin> Execute a :program:`twistd` plugin. Use
68+
:program:`twistd` to get a list of available
69+
plugins. Use -- to pass options to the
70+
plugin.
71+
-s <port>, --server=<port> Run an eval server on port <port>. This
72+
options forces the use of a Twisted reactor.
73+
74+
75+
:program:`bpython-gtk` also supports the following options:
76+
77+
--socket-id=<socket-id> Embed bpython.
78+
79+
Keys
80+
----
81+
82+
:program:`bpython`'s keys are fully configurable. See
83+
http://docs.bpython-interpreter.org/configuration.html#keyboard
84+
85+
Files
86+
-----
87+
88+
**$XDG_CONFIG_HOME/bpython/config**
89+
90+
Your bpython config. See sample-config (in /usr/share/doc/bpython/examples on
91+
Debian) for various options you can use, or read :manpage:`python-config(5)`.
92+
93+
Known bugs
94+
----------
95+
96+
See http://bitbucket.org/bobf/bpython/issues/ for a list of known issues.
97+
98+
See also
99+
--------
100+
101+
:manpage:`bpython-config(5)`, :manpage:`python(1)`
102+
103+
Author
104+
------
105+
106+
:program:`bpython` was written by Robert Anthony Farrell
107+
<robertanthonyfarrel@gmail.com> and his bunch of loyal followers.
108+
109+
This manual page was written by Jørgen Pedersen Tjernø <jorgen@devsoft.no>,
110+
for the Debian project (but may be used by others).

0 commit comments

Comments
 (0)