summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorKenneth Reitz <me@kennethreitz.com>2011-06-21 23:01:46 -0400
committerKenneth Reitz <me@kennethreitz.com>2011-06-21 23:01:46 -0400
commit9b2ab6fae944207c2422a094d257cbccd014bfe6 (patch)
tree10647ea19c1e2d12e31b80cfca4e0078eeb40d25 /docs
parent983b979fdacd7eb541609bb0ba1f8ea257d709bf (diff)
parent7a3d55daab7eb349e66dd71d9301f3b9276098e0 (diff)
downloadtablib-9b2ab6fae944207c2422a094d257cbccd014bfe6.tar.gz
Merge branch 'release/0.9.9'v0.9.9
Diffstat (limited to 'docs')
-rw-r--r--docs/_themes/kr/layout.html15
-rw-r--r--docs/conf.py2
-rw-r--r--docs/development.rst58
-rw-r--r--docs/index.rst4
-rw-r--r--docs/install.rst38
-rw-r--r--docs/intro.rst20
-rw-r--r--docs/tutorial.rst12
7 files changed, 91 insertions, 58 deletions
diff --git a/docs/_themes/kr/layout.html b/docs/_themes/kr/layout.html
index 344ec29..696413a 100644
--- a/docs/_themes/kr/layout.html
+++ b/docs/_themes/kr/layout.html
@@ -30,4 +30,19 @@
})();
</script>
+
+ <script type="text/javascript">
+ (function() {
+ var t = document.createElement('script');
+ t.type = 'text/javascript';
+ t.async = true;
+ t.id = 'gauges-tracker';
+ t.setAttribute('data-site-id',
+ '4ddc284f613f5d2f1a000001');
+ t.src = '//secure.gaug.es/track.js';
+ var s = document.getElementsByTagName('script')[0];
+ s.parentNode.insertBefore(t, s);
+ })();
+ </script>
+
{%- endblock %}
diff --git a/docs/conf.py b/docs/conf.py
index d0c7ae6..a9248fc 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -48,7 +48,7 @@ copyright = u'2011. A <a href="http://kennethreitz.com/pages/open-projects.html"
# built documents.
#
# The short X.Y version.
-version = '0.9.8'
+version = tablib.__version__
# The full version, including alpha/beta/rc tags.
release = version
diff --git a/docs/development.rst b/docs/development.rst
index 6255d5e..90bdb43 100644
--- a/docs/development.rst
+++ b/docs/development.rst
@@ -5,7 +5,8 @@ Development
Tablib is under active development, and contributors are welcome.
-If you have a feature request, suggestion, or bug report, please open a new issue on GitHub_. To submit patches, please send a pull request on GitHub_.
+If you have a feature request, suggestion, or bug report, please open a new
+issue on GitHub_. To submit patches, please send a pull request on GitHub_.
If you'd like to contribute, there's plenty to do. Here's a short todo list.
@@ -42,19 +43,18 @@ Source Control
--------------
-Tablib source is controlled with Git_, the lean, mean, distributed source control machine.
+Tablib source is controlled with Git_, the lean, mean, distributed source
+control machine.
The repository is publicly accessable.
``git clone git://github.com/kennethreitz/tablib.git``
-
-The project is hosted both on **GitHub** and **git.kennethreitz.com**.
-
-
- GitHub:
+
+The project is hosted on **GitHub**.
+
+
+ GitHub:
http://github.com/kennethreitz/tablib
- "Mirror":
- http://git.kennethreitz.com/projects/tablib
Git Branch Structure
@@ -100,27 +100,27 @@ Tablib features a micro-framework for adding format support. The easiest way to
1. Write a new format interface.
:class:`tablib.core` follows a simple pattern for automatically utilizing your format throughout Tablib. Function names are crucial.
-
+
Example **tablib/formats/_xxx.py**: ::
title = 'xxx'
-
+
def export_set(dset):
....
# returns string representation of given dataset
-
+
def export_book(dbook):
....
# returns string representation of given databook
-
+
def import_set(dset, in_stream):
...
# populates given Dataset with given datastream
-
+
def import_book(dbook, in_stream):
...
# returns Databook instance
-
+
def detect(stream):
...
# returns True if given stream is parsable as xxx
@@ -130,7 +130,7 @@ Tablib features a micro-framework for adding format support. The easiest way to
If the format excludes support for an import/export mechanism (*eg.* :class:`csv <tablib.Dataset.csv>` excludes :class:`Databook <tablib.Databook>` support), simply don't define the respective functions. Appropriate errors will be raised.
-2.
+2.
Add your new format module to the :class:`tablib.formats.avalable` tuple.
@@ -152,7 +152,7 @@ When developing a feature for Tablib, the easiest way to test your changes for p
$ ./test_tablib.py
-`Hudson CI`_, amongst other tools, supports Java's xUnit testing report format. Nose_ allows us to generate our own xUnit reports.
+`Jenkins CI`_, amongst other tools, supports Java's xUnit testing report format. Nose_ allows us to generate our own xUnit reports.
Installing nose is simple. ::
@@ -168,25 +168,25 @@ This will generate a **nosetests.xml** file, which can then be analyzed.
-.. _hudson:
+.. _jenkins:
----------------------
Continuous Integration
----------------------
-Every commit made to the **develop** branch is automatically tested and inspected upon receipt with `Hudson CI`_. If you have access to the main repository and broke the build, you will receive an email accordingly.
+Every commit made to the **develop** branch is automatically tested and inspected upon receipt with `Jenkins CI`_. If you have access to the main repository and broke the build, you will receive an email accordingly.
Anyone may view the build status and history at any time.
http://ci.kennethreitz.com/
-If you are trustworthy and plan to contribute to tablib on a regular basis, please contact `Kenneth Reitz`_ to get an account on the Hudson Server.
+If you are trustworthy and plan to contribute to tablib on a regular basis, please contact `Kenneth Reitz`_ to get an account on the Jenkins Server.
Additional reports will also be included here in the future, including :pep:`8` checks and stress reports for extremely large datasets.
-.. _`Hudson CI`: http://hudson.dev.java.net
+.. _`Jenkins CI`: http://jenkins-ci.org/
.. _`Kenneth Reitz`: http://kennethreitz.com/contact-me/
@@ -196,17 +196,17 @@ Additional reports will also be included here in the future, including :pep:`8`
Building the Docs
-----------------
-Documentation is written in the powerful, flexible, and standard Python documentation format, `reStructured Text`_.
+Documentation is written in the powerful, flexible, and standard Python documentation format, `reStructured Text`_.
Documentation builds are powered by the powerful Pocoo project, Sphinx_. The :ref:`API Documentation <api>` is mostly documented inline throughout the module.
The Docs live in ``tablib/docs``. In order to build them, you will first need to install Sphinx. ::
$ pip install sphinx
-
+
Then, to build an HTML version of the docs, simply run the following from the **docs** directory: ::
- $ make html
+ $ make html
Your ``docs/_build/html`` directory will then contain an HTML representation of the documentation, ready for publication on most web servers.
@@ -214,10 +214,10 @@ You can also generate the documentation in **ebpub**, **latex**, **json**, *&c*
.. admonition:: GitHub Pages
- To push the documentation up to `GitHub Pages`_, you will first need to run `sphinx-to-github`_ against your ``docs/_build/html`` directory.
-
+ To push the documentation up to `GitHub Pages`_, you will first need to run `sphinx-to-github`_ against your ``docs/_build/html`` directory.
+
GitHub Pages are powered by an HTML generation system called Jeckyl_, which is configured to ignore files and folders that begin with "``_``" (*ie.* **_static**).
-
+
@@ -232,8 +232,8 @@ You can also generate the documentation in **ebpub**, **latex**, **json**, *&c*
Running it against the docs is even simpler. ::
$ sphinx-to-github _build/html
-
- Move the resulting files to the **gh-pages** branch of your repository, and push it up to GitHub.
+
+ Move the resulting files to the **gh-pages** branch of your repository, and push it up to GitHub.
.. _`reStructured Text`: http://docutils.sourceforge.net/rst.html
.. _Sphinx: http://sphinx.pocoo.org
diff --git a/docs/index.rst b/docs/index.rst
index 25ceb85..e0e4166 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -43,13 +43,11 @@ Tablib is an :ref:`MIT Licensed <mit>` format-agnostic tabular dataset library,
Testimonials
------------
-`The Library of Congress <http://www.loc.gov/>`_,
`National Geographic <http://www.nationalgeographic.com/>`_,
`Digg, Inc <http://digg.com/>`_,
`Northrop Grumman <http://www.northropgrumman.com/>`_,
`Discovery Channel <http://dsc.discovery.com/>`_,
-`The Sunlight Foundation <http://sunlightfoundation.com/>`_, and
-`NetApp, Inc <http://netapp.com>`_ use Tablib internally.
+and `The Sunlight Foundation <http://sunlightfoundation.com/>`_ use Tablib internally.
diff --git a/docs/install.rst b/docs/install.rst
index b6c3f31..48c6267 100644
--- a/docs/install.rst
+++ b/docs/install.rst
@@ -11,15 +11,29 @@ This part of the documentation covers the installation of Tablib. The first step
Installing Tablib
-----------------
-To install Tablib, it only takes one simple command. ::
+Distribute & Pip
+----------------
+
+Installing Tablib is simple with `pip <http://www.pip-installer.org/>`_::
+
+ $ pip install tablib
+
+or, with `easy_install <http://pypi.python.org/pypi/setuptools>`_::
+
+ $ easy_install tablib
+
+But, you really `shouldn't do that <http://www.pip-installer.org/en/latest/index.html#pip-compared-to-easy-install>`_.
+
+
+
+Cheeseshop Mirror
+-----------------
+
+If the Cheeseshop is down, you can also install Requests from Kenneth Reitz's personal `Cheeseshop mirror <pip.kreitz.co/>`_::
- $ pip install tablib
+ $ pip install -i http://pip.kreitz.co/simple tablib
-Or, if you must: ::
- $ easy_install tablib
-
-But, you really shouldn't do that.
-------------------
@@ -49,15 +63,15 @@ Speed Extentions
.. versionadded:: 0.8.5
-Tablib is partially dependent on the **pyyaml**, **simplejson**, and **xlwt** modules. To reduce installation issues, fully integrated versions of all required libraries are included in Tablib.
+Tablib is partially dependent on the **pyyaml**, **simplejson**, and **xlwt** modules. To reduce installation issues, fully integrated versions of all required libraries are included in Tablib.
However, if performance is important to you (and it should be), you can install **pyyaml** with C extentions from PyPi. ::
- $ pip install PyYAML
+ $ pip install PyYAML
If you're using Python 2.5, you should also install the **simplejson** module (pip will do this for you). If you're using Python 2.6+, the built-in **json** module is already optimized and in use. ::
- $ pip install simplejson
+ $ pip install simplejson
@@ -65,14 +79,14 @@ If you're using Python 2.5, you should also install the **simplejson** module (p
Staying Updated
---------------
-The latest version of Tablib will always be available here:
+The latest version of Tablib will always be available here:
* PyPi: http://pypi.python.org/pypi/tablib/
* GitHub: http://github.com/kennethreitz/tablib/
-When a new version is available, upgrading is simple. ::
+When a new version is available, upgrading is simple::
- $ pip install tablib --upgrade
+ $ pip install tablib --upgrade
Now, go get a :ref:`Quick Start <quickstart>`. \ No newline at end of file
diff --git a/docs/intro.rst b/docs/intro.rst
index 971afbd..c3413f3 100644
--- a/docs/intro.rst
+++ b/docs/intro.rst
@@ -4,7 +4,10 @@ Introduction
============
This part of the documentation covers all the interfaces of Tablib.
-Tablib is a format-agnostic tabular dataset library, written in Python. It allows you to Pythonically import, export, and manipulate tabular data sets. Advanced features include, segregation, dynamic columns, tags / filtering, and seamless format import/export.
+Tablib is a format-agnostic tabular dataset library, written in Python.
+It allows you to Pythonically import, export, and manipulate tabular data sets.
+Advanced features include, segregation, dynamic columns, tags / filtering, and
+seamless format import/export.
Philosphy
@@ -21,29 +24,32 @@ Tablib was developed with a few :pep:`20` idioms in mind.
All contributions to Tablib should keep these important rules in mind.
-.. _mit:
+.. mit:
MIT License
-----------
-A large number of open source projects you find today are `GPL Licensed`_. While the GPL has its time and place, it should most certainly not be your go-to license for your next open source project.
+A large number of open source projects you find today are `GPL Licensed`_.
+While the GPL has its time and place, it should most certainly not be your
+go-to license for your next open source project.
-A project that is released as GPL cannot be used in any commercial product without the product itself also being offered as open source. The MIT, BSD, and ISC licenses are great alternatives to the GPL that allow your open-source software to be used in proprietary, closed-source software.
+A project that is released as GPL cannot be used in any commercial product
+without the product itself also being offered as open source. The MIT, BSD, and
+ISC licenses are great alternatives to the GPL that allow your open-source
+software to be used in proprietary, closed-source software.
Tablib is released under terms of `The MIT License`_.
.. _`GPL Licensed`: http://www.opensource.org/licenses/gpl-license.php
.. _`The MIT License`: http://www.opensource.org/licenses/mit-license.php
-.. note::
- Tablib will be moved to the `Apache 2 License <http://www.apache.org/licenses/LICENSE-2.0>`_ upon the release of v1.0.0.
.. _license:
Tablib License
--------------
-Copyright (c) 2011 Kenneth Reitz.
+Copyright 2011 Kenneth Reitz
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
diff --git a/docs/tutorial.rst b/docs/tutorial.rst
index 6d50db5..561b24c 100644
--- a/docs/tutorial.rst
+++ b/docs/tutorial.rst
@@ -87,7 +87,7 @@ Adding Columns
Now that we have a basic :class:`Dataset` in place, let's add a column of **ages** to it. ::
- data.append(col=[22, 20], header='Age')
+ data.append_col([22, 20], header='Age')
Let's view the data now. ::
@@ -158,7 +158,7 @@ Let's find the average age. ::
Removing Rows & Columns
-----------------------
-It's easier than you could imagine. ::
+It's easier than you could imagine::
>>> del data['Col Name']
@@ -195,7 +195,7 @@ Let's add a dynamic column to our :class:`Dataset` object. In this example, we h
"""Returns a random integer for entry."""
return (random.randint(60,100)/100.0)
- data.append(col=[random_grade], header='Grade')
+ data.append_col(random_grade, header='Grade')
Let's have a look at our data. ::
@@ -253,8 +253,8 @@ Let's tag some students. ::
students.headers = ['first', 'last']
- students.append(['Kenneth', 'Reitz'], tags=['male', 'technical'])
- students.append(['Bessie', 'Monke'], tags=['female', 'creative'])
+ students.rpush(['Kenneth', 'Reitz'], tags=['male', 'technical'])
+ students.rpush(['Bessie', 'Monke'], tags=['female', 'creative'])
Now that we have extra meta-data on our rows, we can use easily filter our :class:`Dataset`. Let's just see Male students. ::
@@ -273,7 +273,7 @@ When dealing with a large number of :class:`Datasets <Dataset>` in spreadsheet f
Let's say we have 3 different :class:`Datasets <Dataset>`. All we have to do is add then to a :class:`Databook` object... ::
- book = tablib.Databook([data1, data2, data3])
+ book = tablib.Databook((data1, data2, data3))
... and export to Excel just like :class:`Datasets <Dataset>`. ::