summaryrefslogtreecommitdiff
path: root/docs/source/list_commands.rst
diff options
context:
space:
mode:
authorDoug Hellmann <doug.hellmann@dreamhost.com>2012-05-06 21:22:14 -0400
committerDoug Hellmann <doug.hellmann@dreamhost.com>2012-05-06 21:22:14 -0400
commit03a954b867b668c6e03312319c071ab446e706e2 (patch)
tree7f18a33ab8dbe206b3d85a30902d6f1eb125ece0 /docs/source/list_commands.rst
parent88c5454768f1b9e442a9aa618687d226cd19f965 (diff)
downloadcliff-tablib-03a954b867b668c6e03312319c071ab446e706e2.tar.gz
update formatter documentation
Diffstat (limited to 'docs/source/list_commands.rst')
-rw-r--r--docs/source/list_commands.rst55
1 files changed, 27 insertions, 28 deletions
diff --git a/docs/source/list_commands.rst b/docs/source/list_commands.rst
index fbca699..d4e697c 100644
--- a/docs/source/list_commands.rst
+++ b/docs/source/list_commands.rst
@@ -43,6 +43,31 @@ further manipulation.
"Makefile",5569
"source",408
+html
+----
+
+The ``html`` formatter uses tablib_ to produce HTML output as a table.
+
+::
+
+ (.venv)$ cliffdemo files -f html
+ <table>
+ <thead>
+ <tr><th>Name</th>
+ <th>Size</th></tr>
+ </thead>
+ <tr><td>build</td>
+ <td>136</td></tr>
+ <tr><td>cliffdemo.log</td>
+ <td>3252</td></tr>
+ <tr><td>Makefile</td>
+ <td>5569</td></tr>
+ <tr><td>requirements.txt</td>
+ <td>33</td></tr>
+ <tr><td>source</td>
+ <td>782</td></tr>
+ </table>
+
json
----
@@ -90,34 +115,6 @@ sequence of mappings.
- {Name: requirements.txt, Size: 33}
- {Name: source, Size: 816}
-.. _tablib: https://github.com/kennethreitz/tablib
-
-
-html
-----
-
-The ``html`` formatter uses tablib_ to produce HTML output as a
-sequence of mappings.
-
-::
-
- (.venv)$ cliffdemo files -f html
- <table>
- <thead>
- <tr><th>Name</th>
- <th>Size</th></tr>
- </thead>
- <tr><td>build</td>
- <td>136</td></tr>
- <tr><td>cliffdemo.log</td>
- <td>3252</td></tr>
- <tr><td>Makefile</td>
- <td>5569</td></tr>
- <tr><td>requirements.txt</td>
- <td>33</td></tr>
- <tr><td>source</td>
- <td>782</td></tr>
- </table>
Creating Your Own Formatter
---------------------------
@@ -127,3 +124,5 @@ another formatter with your program by subclassing from
:class:`cliff.formatters.base.ListFormatter` and registering the
plugin in the ``cliff.formatter.list`` namespace.
+
+.. _tablib: https://github.com/kennethreitz/tablib