Skip to content

Commit a781ee4

Browse files
committed
Properly organize toctrees. Closes wireservice#339.
1 parent f4ecace commit a781ee4

19 files changed

+43
-186
lines changed

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
1.0.0
22
-----
33

4+
* Reorganize docs so TOC works better. (#339)
45
* Render docs locally with RTD theme.
56
* Fix header in "tricks" docs.
67
* Add install instructions to tutorial. (#331)

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
# Add any paths that contain custom static files (such as style sheets) here,
6969
# relative to this directory. They are copied after the builtin static files,
7070
# so a file named "default.css" will overwrite the builtin "default.css".
71-
html_static_path = ['_static']
71+
#html_static_path = ['_static']
7272

7373
# Output file base name for HTML help builder.
7474
htmlhelp_basename = 'csvkitdoc'

docs/contributing.rst

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,26 @@
22
Contributing to csvkit
33
======================
44

5-
Welcome!
6-
========
5+
Principles
6+
==========
7+
8+
csvkit is to tabular data what the standard Unix text processing suite (grep, sed, cut, sort) is to text. As such, csvkit adheres to `the Unix philosophy <http://en.wikipedia.org/wiki/Unix_philosophy>`_.
9+
10+
#. Small is beautiful.
11+
#. Make each program do one thing well.
12+
#. Build a prototype as soon as possible.
13+
#. Choose portability over efficiency.
14+
#. Store data in flat text files.
15+
#. Use software leverage to your advantage.
16+
#. Use shell scripts to increase leverage and portability.
17+
#. Avoid captive user interfaces.
18+
#. Make every program a filter.
19+
20+
As there is no formally defined CSV format, csvkit encourages well-known formatting standards:
21+
22+
* Output favors compatability with the widest range of applications. This means that quoting is done with double-quotes and only when necessary, columns are separated with commas, and lines are terminated with unix style line endings ("\\n").
723

8-
Thanks for your interest in contributing to csvkit. There is work be done by developers of all skill levels.
24+
* Data that is modified or generated will prefer consistency over brevity. Floats always include at least one decimal place, even if they are round. Dates and times are written in ISO8601 format.
925

1026
Process for contributing code
1127
=============================

docs/index.rst

Lines changed: 8 additions & 165 deletions
Original file line numberDiff line numberDiff line change
@@ -58,173 +58,16 @@ Extract data from PostgreSQL:::
5858

5959
And much more...
6060

61-
.. _installation:
62-
63-
Installation
64-
============
65-
66-
Users
67-
-----
68-
69-
csvkit is works on Python versions 2.6, 2.7, 3.3 and 3.4, as well as `PyPy <http://pypy.org/>`_. It is supported on OSX and Linux. It also works--but is tested less frequently--on Windows.
70-
71-
Installing csvkit is simple::
72-
73-
pip install csvkit
74-
75-
.. note::
76-
77-
If you are installing on Ubuntu you may need to install the Python development headers prior to install csvkit::
78-
79-
sudo apt-get install python-dev python-pip python-setuptools build-essential
80-
81-
.. note::
82-
83-
If the installation appears to be successful but running the tools fails, try updating your version of Python setuptools::
84-
85-
pip install --upgrade setuptools
86-
pip install --upgrade csvkit
87-
88-
.. note::
89-
90-
If you are using Python2 and have a recent version of pip, you may need to run pip with the additional arguments :code:`--allow-external argparse`.
91-
92-
Developers
93-
----------
94-
95-
If you are a developer that also wants to hack on csvkit, install it this way::
96-
97-
git clone git://github.com/onyxfish/csvkit.git
98-
cd csvkit
99-
mkvirtualenv csvkit
100-
101-
# If running Python 2
102-
pip install -r requirements-py2.txt
103-
104-
# If running Python 3
105-
pip install -r requirements-py3.txt
106-
107-
python setup.py develop
108-
tox
109-
110-
Be sure to read the documentation below under the header :ref:`contributing`.
111-
112-
Tutorial
113-
========
114-
115-
The csvkit tutorial walks through processing and analyzing a real dataset:
116-
117-
.. toctree::
118-
:maxdepth: 2
119-
:numbered:
120-
121-
tutorial/1_getting_started
122-
tutorial/2_examining_the_data
123-
tutorial/3_power_tools
124-
tutorial/4_going_elsewhere
125-
126-
Usage
127-
=====
128-
129-
csvkit is comprised of a number of individual command line utilities that be loosely divided into a few major categories: Input, Processing, and Output. Documentation and examples for each utility are described on the following pages.
130-
131-
*Input*
132-
133-
.. toctree::
134-
:maxdepth: 1
135-
136-
scripts/in2csv
137-
scripts/sql2csv
138-
139-
*Processing*
61+
Table of contents
62+
=================
14063

14164
.. toctree::
142-
:maxdepth: 1
143-
144-
scripts/csvclean
145-
scripts/csvcut
146-
scripts/csvgrep
147-
scripts/csvjoin
148-
scripts/csvsort
149-
scripts/csvstack
150-
151-
*Output (and Analysis)*
152-
153-
.. toctree::
154-
:maxdepth: 1
155-
156-
scripts/csvformat
157-
scripts/csvjson
158-
scripts/csvlook
159-
scripts/csvpy
160-
scripts/csvsql
161-
scripts/csvstat
162-
163-
*Appendices*
164-
165-
.. toctree::
166-
:maxdepth: 2
167-
168-
common_arguments
169-
tricks
170-
171-
Using as a library
172-
==================
173-
174-
csvkit is designed to be used a replacement for most of Python's :mod:`csv` module. Important parts of the API are documented on the following pages.
175-
176-
Don't!
177-
178-
::
179-
180-
import csv
181-
182-
Do!
183-
184-
::
185-
186-
import csvkit
187-
188-
.. toctree::
189-
:maxdepth: 1
190-
191-
api/csvkit
192-
api/csvkit.py2
193-
api/csvkit.py3
194-
api/csvkit.unicsv
195-
api/csvkit.sniffer
196-
197-
Principles
198-
==========
199-
200-
csvkit is to tabular data what the standard Unix text processing suite (grep, sed, cut, sort) is to text. As such, csvkit adheres to `the Unix philosophy <http://en.wikipedia.org/wiki/Unix_philosophy>`_.
201-
202-
#. Small is beautiful.
203-
#. Make each program do one thing well.
204-
#. Build a prototype as soon as possible.
205-
#. Choose portability over efficiency.
206-
#. Store data in flat text files.
207-
#. Use software leverage to your advantage.
208-
#. Use shell scripts to increase leverage and portability.
209-
#. Avoid captive user interfaces.
210-
#. Make every program a filter.
211-
212-
As there is no formally defined CSV format, csvkit encourages well-known formatting standards:
213-
214-
* Output favors compatability with the widest range of applications. This means that quoting is done with double-quotes and only when necessary, columns are separated with commas, and lines are terminated with unix style line endings ("\\n").
215-
216-
* Data that is modified or generated will prefer consistency over brevity. Floats always include at least one decimal place, even if they are round. Dates and times are written in ISO8601 format.
217-
218-
.. _contributing:
219-
220-
Contributing
221-
============
222-
223-
Want to hack on csvkit? Here's how:
224-
225-
.. toctree::
226-
:maxdepth: 2
227-
65+
:maxdepth: 3
66+
67+
install
68+
tutorial
69+
cli
70+
lib
22871
contributing
22972
release
23073

docs/release.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,6 @@
22
Release process
33
===============
44

5-
How to cut a csvkit release
6-
===========================
7-
85
#. Verify no `high priority issues <https://github.com/onyxfish/csvkit/issues?q=is%3Aopen+is%3Aissue+label%3A%22High+Priority%22>`_ are outstanding.
96
#. Run the full test suite with fresh environments for all versions: ``tox -r`` (Everything MUST pass.)
107
#. Ensure these files all have the correct version number:

docs/scripts/csvclean.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Cleans a CSV file of common syntax errors. Outputs [basename]_out.csv and [basen
2323
created. Information about what would have been done
2424
will be printed to STDERR.
2525

26-
Also see: :doc:`common_arguments`.
26+
See also: :doc:`../common_arguments`.
2727

2828
Examples
2929
========

docs/scripts/csvcut.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Filters and truncates CSV files. Like unix "cut" command, but for tabular data::
3030

3131
Note that csvcut does not include row filtering, for this you should pipe data to :doc:`csvgrep`.
3232

33-
Also see: :doc:`common_arguments`.
33+
See also: :doc:`../common_arguments`.
3434

3535
Examples
3636
========

docs/scripts/csvformat.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Convert a CSV file to a custom output format.::
4343
Character used to terminate lines in the output CSV
4444
file.
4545

46-
Also see: :doc:`common_arguments`.
46+
See also: :doc:`../common_arguments`.
4747

4848
Examples
4949
========

docs/scripts/csvgrep.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Filter tabular data to only those rows where certain columns contain a given val
3737
-i, --invert-match If specified, select non-matching instead of matching
3838
rows.
3939

40-
Also see: :doc:`common_arguments`.
40+
See also: :doc:`../common_arguments`.
4141

4242
NOTE: Even though '-m', '-r', and '-f' are listed as "optional" arguments, you must specify one of them.
4343

docs/scripts/csvjoin.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Merges two or more CSV tables together using a method analogous to SQL JOIN oper
4141
Note that the join operation requires reading all files into memory. Don't try
4242
this on very large files.
4343

44-
Also see: :doc:`common_arguments`.
44+
See also: :doc:`../common_arguments`.
4545

4646
Examples
4747
========

0 commit comments

Comments
 (0)