Skip to content

Commit

Permalink
prepare for release v0.2.0, fix #22
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Apr 23, 2016
1 parent a706a89 commit b32b220
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 23 deletions.
42 changes: 31 additions & 11 deletions .moban.d/README.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
================================================================================
{{name}} - Let you focus on data, instead of {{file_type}} format
{{name}} - Let you focus on data, instead of {{file_type}} formats
================================================================================

.. image:: https://api.travis-ci.org/pyexcel/{{name}}.png
Expand Down Expand Up @@ -28,37 +28,45 @@ its capbility to present and write data in text fromats mainly through `tabulate
Usage
======

Here is the example usage:
Simple
------------

.. code-block:: python
>>> import pyexcel as pe
>>> import pyexcel.ext.text as text
>>> content = [
... ["Column 1", "Column 2", "Column 3"],
... [1, 2, 3],
... [4, 5, 6],
... [7, 8, 9]
... ]
>>> sheet = pe.Sheet(content)
>>> sheet
>>> print(sheet.simple)
Sheet Name: pyexcel
-------- -------- --------
Column 1 Column 2 Column 3
1 2 3
4 5 6
7 8 9
-------- -------- --------
<BLANKLINE>
>>> sheet.name_columns_by_row(0)
>>> sheet
>>> print(sheet.simple)
Sheet Name: pyexcel
Column 1 Column 2 Column 3
---------- ---------- ----------
1 2 3
4 5 6
7 8 9
>>> text.TABLEFMT = "grid"
>>> sheet
<BLANKLINE>
Grid
-------

.. code-block:: python
>>> print(sheet.grid)
Sheet Name: pyexcel
+------------+------------+------------+
| Column 1 | Column 2 | Column 3 |
Expand All @@ -69,6 +77,13 @@ Here is the example usage:
+------------+------------+------------+
| 7 | 8 | 9 |
+------------+------------+------------+
<BLANKLINE>
Mediawiki
-------------

.. code-block:: python
>>> multiple_sheets = {
... 'Sheet 1':
... [
Expand All @@ -90,7 +105,6 @@ Here is the example usage:
... ]
... }
>>> book = pe.Book(multiple_sheets)
>>> text.TABLEFMT = "mediawiki"
>>> book.save_as("myfile.mediawiki")
>>> myfile = open("myfile.mediawiki")
>>> print(myfile.read())
Expand Down Expand Up @@ -126,10 +140,16 @@ Here is the example usage:
|}
<BLANKLINE>
>>> myfile.close()
Html
----------

.. code-block:: python
>>> book.save_as("myfile.html")
>>> myfile = open("myfile.html")
>>> print(myfile.read())
<html><header><title>myfile.html</title><body>Sheet Name: Sheet 1
Sheet Name: Sheet 1
<table>
<tr><td style="text-align: right;">1</td><td style="text-align: right;">2</td><td style="text-align: right;">3</td></tr>
<tr><td style="text-align: right;">4</td><td style="text-align: right;">5</td><td style="text-align: right;">6</td></tr>
Expand All @@ -147,8 +167,7 @@ Here is the example usage:
<tr><td>3.0</td><td>2.0</td><td>1.0</td></tr>
<tr><td>4.0</td><td>3.0</td><td>2.0</td></tr>
</table>
</body></html>
<BLANKLINE>
.. testcode::
:hide:
Expand All @@ -157,6 +176,7 @@ Here is the example usage:
>>> import os
>>> os.unlink("myfile.mediawiki")
>>> os.unlink("myfile.html")

{%endblock%}

{%block extras %}
Expand Down
6 changes: 1 addition & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
sudo: false
language: python

notifications:
email: false

python:
- 2.7
- 2.6
Expand All @@ -12,12 +10,10 @@ python:
- 3.3
- 3.4
- 3.5
before_script:
before_install:
- pip install https://github.com/pyexcel/pyexcel/archive/v0.2.1.zip
- pip install -r tests/requirements.txt

script:
make test

after_success:
codecov
11 changes: 7 additions & 4 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,28 +1,31 @@
Change log
================================================================================

Unreleased
Planned
--------------------------------------------------------------------------------

#. compactibility with pyexcel-io 0.2.0 and pyexcel 0.2.1


0.1.2 - 03.04.2016
0.2.0 - 23.04.2016
--------------------------------------------------------------------------------

It is a complete re-write of the whole extension.

Added
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#. html support
#. support pyexcel 0.2.0's generator output
#. pypy and pypy3 in test targets
#. support file stream and dot notation, e.g. pyexcel.Sheet.rst will return rst text representation of it.

Updated
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

#. `#8 <https://github.com/pyexcel/pyexcel-text/issues/8>`_,
write_header as an option(False) to disable header writing
#. `#8 <https://github.com/pyexcel/pyexcel-text/issues/8>`_, write_header as an option(False) to disable header writing
#. the json output of multiple sheet book will be sorted by its sheet names.
#. No longer, pyexcel-text is pyexcel-io plugin but pyexcel.sources plugin.

0.1.1 - 30.01.2016
--------------------------------------------------------------------------------
Expand Down
1 change: 1 addition & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ Html
>>> os.unlink("myfile.mediawiki")
>>> os.unlink("myfile.html")


Dependencies
============

Expand Down
2 changes: 1 addition & 1 deletion pyexcel_text.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
overrides: "pyexcel.yaml"
name: "pyexcel-text"
nick_name: text
version: 0.1.2
version: 0.2.0
file_type: text
dependencies:
- pyexcel>=0.2.0
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
setup(
name='pyexcel-text',
author='C.W.',
version='0.1.2',
version='0.2.0',
author_email='wangc_2011 (at) hotmail.com',
url='https://github.com/pyexcel/pyexcel-text',
description='A plugin to pyexcel and provides the capbility to present and write data in text fromats',
Expand Down
1 change: 0 additions & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
nose
rednose
nose-cov
codecov
coverage
Expand Down

0 comments on commit b32b220

Please sign in to comment.