Import upstream version 0.6.0
Kali Janitor
3 years ago
0 | 0 | Change log |
1 | 1 | ================================================================================ |
2 | 2 | |
3 | 0.6.0 - 9.10.2020 | |
4 | -------------------------------------------------------------------------------- | |
5 | ||
6 | **added** | |
7 | ||
8 | #. new style reader and writer plugins. works with pyexcel-io v0.6.2 | |
9 | ||
3 | 10 | 0.5.6 - 19.03.2019 |
4 | 11 | -------------------------------------------------------------------------------- |
5 | 12 | |
6 | added | |
7 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
13 | **added** | |
8 | 14 | |
9 | 15 | #. `#32 <https://github.com/pyexcel/pyexcel-ods/issues/32>`_, fix odfpy pinning |
10 | 16 | #. `#33 <https://github.com/pyexcel/pyexcel-ods/issues/33>`_, fix |
13 | 19 | 0.5.5 - 16.03.2019 |
14 | 20 | -------------------------------------------------------------------------------- |
15 | 21 | |
16 | added | |
17 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
22 | **added** | |
18 | 23 | |
19 | 24 | #. `#32 <https://github.com/pyexcel/pyexcel-ods/issues/32>`_, fix odfpy pinning |
20 | 25 | |
21 | 26 | 0.5.4 - 27.11.2018 |
22 | 27 | -------------------------------------------------------------------------------- |
23 | 28 | |
24 | added | |
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
29 | **added** | |
26 | 30 | |
27 | 31 | #. `#30 <https://github.com/pyexcel/pyexcel-ods/issues/30>`_, long type will not |
28 | 32 | be written in ods. please use string type. And if the integer is equal or |
32 | 36 | 0.5.3 - unreleased |
33 | 37 | -------------------------------------------------------------------------------- |
34 | 38 | |
35 | added | |
36 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
39 | **added** | |
37 | 40 | |
38 | 41 | #. `#24 <https://github.com/pyexcel/pyexcel-ods/issues/24>`_, ignore |
39 | 42 | comments(<office:comment>) in cell |
44 | 47 | 0.5.2 - 23.10.2017 |
45 | 48 | -------------------------------------------------------------------------------- |
46 | 49 | |
47 | updated | |
48 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
50 | **updated** | |
49 | 51 | |
50 | 52 | #. pyexcel `pyexcel#105 <https://github.com/pyexcel/pyexcel/issues/105>`_, |
51 | 53 | remove gease from setup_requires, introduced by 0.5.1. |
54 | 56 | 0.5.1 - 20.10.2017 |
55 | 57 | -------------------------------------------------------------------------------- |
56 | 58 | |
57 | added | |
58 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
59 | **added** | |
59 | 60 | |
60 | 61 | #. `pyexcel#103 <https://github.com/pyexcel/pyexcel/issues/103>`_, include |
61 | 62 | LICENSE file in MANIFEST.in, meaning LICENSE file will appear in the released |
64 | 65 | 0.5.0 - 30.08.2017 |
65 | 66 | -------------------------------------------------------------------------------- |
66 | 67 | |
67 | Updated | |
68 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
68 | **Updated** | |
69 | 69 | |
70 | 70 | #. put dependency on pyexcel-io 0.5.0, which uses cStringIO instead of StringIO. |
71 | 71 | Hence, there will be performance boost in handling files in memory. |
72 | 72 | |
73 | Relocated | |
74 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
73 | **Relocated** | |
75 | 74 | |
76 | 75 | #. All ods type conversion code lives in pyexcel_io.service module |
77 | 76 | |
78 | 77 | 0.4.1 - 25.08.2017 |
79 | 78 | -------------------------------------------------------------------------------- |
80 | 79 | |
81 | Updated | |
82 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
80 | **Updated** | |
83 | 81 | |
84 | 82 | #. `pyexcel#23 <https://github.com/pyexcel/pyexcel/issues/23>`_, handle |
85 | 83 | unseekable stream given by http response |
89 | 87 | 0.4.0 - 19.06.2017 |
90 | 88 | -------------------------------------------------------------------------------- |
91 | 89 | |
92 | Updated | |
93 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
90 | **Updated** | |
94 | 91 | |
95 | 92 | #. `pyexcel#14 <https://github.com/pyexcel/pyexcel/issues/14>`_, close file |
96 | 93 | handle |
100 | 97 | 0.3.3 - 07.05.2017 |
101 | 98 | -------------------------------------------------------------------------------- |
102 | 99 | |
103 | Updated | |
104 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
100 | **Updated** | |
105 | 101 | |
106 | 102 | #. issue `pyexcel#19 <https://github.com/pyexcel/pyexcel/issues/19>`_, not all |
107 | 103 | texts in a multi-node cell were extracted. |
109 | 105 | 0.3.2 - 13.04.2017 |
110 | 106 | -------------------------------------------------------------------------------- |
111 | 107 | |
112 | Updated | |
113 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
108 | **Updated** | |
114 | 109 | |
115 | 110 | #. issue `pyexcel#17 <https://github.com/pyexcel/pyexcel/issues/17>`_, empty new |
116 | 111 | line is ignored |
120 | 115 | 0.3.1 - 02.02.2017 |
121 | 116 | -------------------------------------------------------------------------------- |
122 | 117 | |
123 | Added | |
124 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
118 | **Added** | |
125 | 119 | |
126 | 120 | #. Recognize currency type |
127 | 121 | |
128 | 122 | 0.3.0 - 22.12.2016 |
129 | 123 | -------------------------------------------------------------------------------- |
130 | 124 | |
131 | Updated | |
132 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
125 | **Updated** | |
133 | 126 | |
134 | 127 | #. Code refactoring with pyexcel-io v 0.3.0 |
135 | 128 | |
136 | 129 | 0.2.2 - 24.10.2016 |
137 | 130 | -------------------------------------------------------------------------------- |
138 | 131 | |
139 | Updated | |
140 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
132 | **Updated** | |
141 | 133 | |
142 | 134 | #. issue `pyexcel#14 <https://github.com/pyexcel/pyexcel/issues/14>`_, index |
143 | 135 | error when reading a ods file that has non-uniform columns repeated property. |
145 | 137 | 0.2.1 - 31.08.2016 |
146 | 138 | -------------------------------------------------------------------------------- |
147 | 139 | |
148 | Added | |
149 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
140 | **Added** | |
150 | 141 | |
151 | 142 | #. support pagination. two pairs: start_row, row_limit and start_column, |
152 | 143 | column_limit help you deal with large files. |
155 | 146 | 0.2.0 - 01.06.2016 |
156 | 147 | -------------------------------------------------------------------------------- |
157 | 148 | |
158 | Added | |
159 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
149 | **Added** | |
160 | 150 | |
161 | 151 | #. By default, `float` will be converted to `int` where fits. `auto_detect_int`, |
162 | 152 | a flag to switch off the autoatic conversion from `float` to `int`. |
163 | 153 | #. 'library=pyexcel-ods' was added so as to inform pyexcel to use it instead of |
164 | 154 | other libraries, in the situation where multiple plugins were installed. |
165 | 155 | |
166 | Updated | |
167 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
156 | **Updated** | |
168 | 157 | |
169 | 158 | #. support the auto-import feature of pyexcel-io 0.2.0 |
170 | 159 | |
171 | 160 | 0.1.1 - 30.01.2016 |
172 | 161 | -------------------------------------------------------------------------------- |
173 | 162 | |
174 | Added | |
175 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
163 | **Added** | |
176 | 164 | |
177 | 165 | #. 'streaming' is an extra option given to get_data. Only when 'streaming' is |
178 | 166 | explicitly set to True, the data will be consisted of generators, hence will |
181 | 169 | #. support multi-line text cell #5 |
182 | 170 | #. feature migration from pyexcel-ods3 pyexcel/pyexcel-ods3#5 |
183 | 171 | |
184 | Updated | |
185 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
172 | **Updated** | |
186 | 173 | |
187 | 174 | #. compatibility with pyexcel-io 0.1.1 |
188 | 175 | |
189 | 176 | 0.0.12 - 10.10.2015 |
190 | 177 | -------------------------------------------------------------------------------- |
191 | 178 | |
192 | Updated | |
193 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
179 | **Updated** | |
194 | 180 | |
195 | 181 | #. Bug fix: excessive trailing columns with empty values |
196 | 182 | |
197 | 183 | 0.0.11 - 26.09.2015 |
198 | 184 | -------------------------------------------------------------------------------- |
199 | 185 | |
200 | Updated | |
201 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
186 | **Updated** | |
202 | 187 | |
203 | 188 | #. Complete fix for libreoffice datetime field |
204 | 189 | |
205 | 190 | 0.0.10 - 15.09.2015 |
206 | 191 | -------------------------------------------------------------------------------- |
207 | 192 | |
208 | Updated | |
209 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
193 | **Updated** | |
210 | 194 | |
211 | 195 | #. Bug fix: date field could have datetime from libreoffice |
212 | 196 | |
213 | 197 | 0.0.9 - 21.08.2015 |
214 | 198 | -------------------------------------------------------------------------------- |
215 | 199 | |
216 | Updated | |
217 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
200 | **Updated** | |
218 | 201 | |
219 | 202 | #. Bug fix: utf-8 string throw unicode exceptions |
220 | 203 | |
221 | 204 | 0.0.8 - 28.06.2015 |
222 | 205 | -------------------------------------------------------------------------------- |
223 | 206 | |
224 | Updated | |
225 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
207 | **Updated** | |
226 | 208 | |
227 | 209 | #. Pin dependency odfpy 0.9.6 to avoid buggy odfpy 1.3.0 |
228 | 210 | |
229 | 211 | 0.0.7 - 28.05.2015 |
230 | 212 | -------------------------------------------------------------------------------- |
231 | 213 | |
232 | Updated | |
233 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
214 | **Updated** | |
234 | 215 | |
235 | 216 | #. Bug fix: "number-columns-repeated" is now respected |
236 | 217 | |
237 | 218 | 0.0.6 - 21.05.2015 |
238 | 219 | -------------------------------------------------------------------------------- |
239 | 220 | |
240 | Updated | |
241 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
221 | **Updated** | |
242 | 222 | |
243 | 223 | #. get_data and save_data are seen across pyexcel-* extensions. remember them |
244 | 224 | once and use them across all extensions. |
246 | 226 | 0.0.5 - 22.02.2015 |
247 | 227 | -------------------------------------------------------------------------------- |
248 | 228 | |
249 | Added | |
250 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
229 | **Added** | |
251 | 230 | |
252 | 231 | #. Loads only one sheet from a multiple sheet book |
253 | 232 | #. Use New BSD License |
255 | 234 | 0.0.4 - 14.12.2014 |
256 | 235 | -------------------------------------------------------------------------------- |
257 | 236 | |
258 | Updated | |
259 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
237 | **Updated** | |
260 | 238 | |
261 | 239 | #. IO interface update as pyexcel-io introduced keywords. |
262 | 240 | #. initial release |
264 | 242 | 0.0.3 - 08.12.2014 |
265 | 243 | -------------------------------------------------------------------------------- |
266 | 244 | |
267 | Updated | |
268 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
245 | **Updated** | |
269 | 246 | |
270 | 247 | #. IO interface update as pyexcel-io introduced keywords. |
271 | 248 | #. initial release |
0 | ||
1 | ||
2 | 3 contributors | |
3 | ================================================================================ | |
4 | ||
5 | In alphabetical order: | |
6 | ||
7 | * `Azamat H. Hackimov <https://github.com/winterheart>`_ | |
8 | * `John Vandenberg <https://github.com/jayvdb>`_ | |
9 | * `Mateusz Konieczny <https://github.com/matkoniecz>`_ |
0 | Copyright (c) 2015-2019 by Onni Software Ltd. and its contributors | |
0 | Copyright (c) 2015-2020 by Onni Software Ltd. and its contributors | |
1 | 1 | All rights reserved. |
2 | 2 | |
3 | 3 | Redistribution and use in source and binary forms of the software as well |
12 | 12 | and/or other materials provided with the distribution. |
13 | 13 | |
14 | 14 | * Neither the name of 'pyexcel-ods' nor the names of the contributors |
15 | may be used to endorse or promote products derived from this software | |
15 | may not be used to endorse or promote products derived from this software | |
16 | 16 | without specific prior written permission. |
17 | 17 | |
18 | 18 | THIS SOFTWARE AND DOCUMENTATION IS PROVIDED BY THE COPYRIGHT HOLDERS AND |
0 | 0 | include README.rst |
1 | 1 | include LICENSE |
2 | 2 | include CHANGELOG.rst |
3 | include CONTRIBUTORS.rst | |
3 | 4 | recursive-include tests * |
4 | 5 | recursive-include docs * |
0 | Metadata-Version: 1.1 | |
0 | Metadata-Version: 1.2 | |
1 | 1 | Name: pyexcel-ods |
2 | Version: 0.5.6 | |
2 | Version: 0.6.0 | |
3 | 3 | Summary: A wrapper library to read, manipulate and write data in ods format |
4 | 4 | Home-page: https://github.com/pyexcel/pyexcel-ods |
5 | Author: C.W. | |
6 | Author-email: [email protected] | |
5 | Author: chfw | |
6 | Author-email: [email protected] | |
7 | 7 | License: New BSD |
8 | Download-URL: https://github.com/pyexcel/pyexcel-ods/archive/0.5.6.tar.gz | |
8 | Download-URL: https://github.com/pyexcel/pyexcel-ods/archive/0.6.0.tar.gz | |
9 | 9 | Description: ================================================================================ |
10 | 10 | pyexcel-ods - Let you focus on data, instead of ods format |
11 | 11 | ================================================================================ |
12 | 12 | |
13 | 13 | .. image:: https://raw.githubusercontent.com/pyexcel/pyexcel.github.io/master/images/patreon.png |
14 | :target: https://www.patreon.com/pyexcel | |
15 | ||
16 | .. image:: https://api.bountysource.com/badge/team?team_id=288537 | |
17 | :target: https://salt.bountysource.com/teams/chfw-pyexcel | |
14 | :target: https://www.patreon.com/chfw | |
15 | ||
16 | .. image:: https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg | |
17 | :target: https://awesome-python.com/#specific-formats-processing | |
18 | 18 | |
19 | 19 | .. image:: https://travis-ci.org/pyexcel/pyexcel-ods.svg?branch=master |
20 | 20 | :target: http://travis-ci.org/pyexcel/pyexcel-ods |
22 | 22 | .. image:: https://codecov.io/gh/pyexcel/pyexcel-ods/branch/master/graph/badge.svg |
23 | 23 | :target: https://codecov.io/gh/pyexcel/pyexcel-ods |
24 | 24 | |
25 | .. image:: https://badge.fury.io/py/pyexcel-ods.svg | |
26 | :target: https://pypi.org/project/pyexcel-ods | |
27 | ||
28 | ||
29 | .. image:: https://pepy.tech/badge/pyexcel-ods/month | |
30 | :target: https://pepy.tech/project/pyexcel-ods/month | |
31 | ||
32 | ||
25 | 33 | .. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg |
26 | 34 | :target: https://gitter.im/pyexcel/Lobby |
27 | 35 | |
36 | .. image:: https://img.shields.io/static/v1?label=continuous%20templating&message=%E6%A8%A1%E7%89%88%E6%9B%B4%E6%96%B0&color=blue&style=flat-square | |
37 | :target: https://moban.readthedocs.io/en/latest/#at-scale-continous-templating-for-open-source-projects | |
38 | ||
39 | .. image:: https://img.shields.io/static/v1?label=coding%20style&message=black&color=black&style=flat-square | |
40 | :target: https://github.com/psf/black | |
28 | 41 | |
29 | 42 | **pyexcel-ods** is a tiny wrapper library to read, manipulate and write data in |
30 | 43 | ods format using python 2.6 and python 2.7. You are likely to use it with |
33 | 46 | depends on ezodf and lxml. `pyexcel-odsr <https://github.com/pyexcel/pyexcel-odsr>`_ |
34 | 47 | is the other sister library that has no external dependency but do ods reading only |
35 | 48 | |
49 | Support the project | |
50 | ================================================================================ | |
51 | ||
52 | If your company has embedded pyexcel and its components into a revenue generating | |
53 | product, please support me on github, `patreon <https://www.patreon.com/bePatron?u=5537627>`_ | |
54 | or `bounty source <https://salt.bountysource.com/teams/chfw-pyexcel>`_ to maintain | |
55 | the project and develop it further. | |
56 | ||
57 | If you are an individual, you are welcome to support me too and for however long | |
58 | you feel like. As my backer, you will receive | |
59 | `early access to pyexcel related contents <https://www.patreon.com/pyexcel/posts>`_. | |
60 | ||
61 | And your issues will get prioritized if you would like to become my patreon as `pyexcel pro user`. | |
62 | ||
63 | With your financial support, I will be able to invest | |
64 | a little bit more time in coding, documentation and writing interesting posts. | |
65 | ||
66 | ||
36 | 67 | Known constraints |
37 | 68 | ================== |
38 | 69 | |
56 | 87 | $ git clone https://github.com/pyexcel/pyexcel-ods.git |
57 | 88 | $ cd pyexcel-ods |
58 | 89 | $ python setup.py install |
59 | ||
60 | Support the project | |
61 | ================================================================================ | |
62 | ||
63 | If your company has embedded pyexcel and its components into a revenue generating | |
64 | product, please support me on `patreon <https://www.patreon.com/bePatron?u=5537627>`_ | |
65 | or `bounty source <https://salt.bountysource.com/teams/chfw-pyexcel>`_ to maintain | |
66 | the project and develop it further. | |
67 | ||
68 | If you are an individual, you are welcome to support me too and for however long | |
69 | you feel like. As my backer, you will receive | |
70 | `early access to pyexcel related contents <https://www.patreon.com/pyexcel/posts>`_. | |
71 | ||
72 | And your issues will get prioritized if you would like to become my patreon as `pyexcel pro user`. | |
73 | ||
74 | With your financial support, I will be able to invest | |
75 | a little bit more time in coding, documentation and writing interesting posts. | |
76 | ||
77 | 90 | |
78 | 91 | Usage |
79 | 92 | ================================================================================ |
334 | 347 | |
335 | 348 | > test.bat |
336 | 349 | |
337 | How to update test environment and update documentation | |
338 | --------------------------------------------------------- | |
339 | ||
340 | Additional steps are required: | |
341 | ||
342 | #. pip install moban | |
343 | #. git clone https://github.com/moremoban/setupmobans.git # generic setup | |
344 | #. git clone https://github.com/pyexcel/pyexcel-commons.git commons | |
345 | #. make your changes in `.moban.d` directory, then issue command `moban` | |
346 | ||
347 | What is pyexcel-commons | |
348 | --------------------------------- | |
349 | ||
350 | Many information that are shared across pyexcel projects, such as: this developer guide, license info, etc. are stored in `pyexcel-commons` project. | |
351 | ||
352 | What is .moban.d | |
353 | --------------------------------- | |
354 | ||
355 | `.moban.d` stores the specific meta data for the library. | |
356 | ||
357 | Acceptance criteria | |
358 | ------------------- | |
359 | ||
360 | #. Has Test cases written | |
361 | #. Has all code lines tested | |
362 | #. Passes all Travis CI builds | |
363 | #. Has fair amount of documentation if your change is complex | |
364 | #. run 'make format' so as to confirm the pyexcel organisation's coding style | |
365 | #. Please update CHANGELOG.rst | |
366 | #. Please add yourself to CONTRIBUTORS.rst | |
367 | #. Agree on NEW BSD License for your contribution | |
350 | ||
351 | Before you commit | |
352 | ------------------------------ | |
353 | ||
354 | Please run:: | |
355 | ||
356 | $ make format | |
357 | ||
358 | so as to beautify your code otherwise travis-ci may fail your unit test. | |
359 | ||
368 | 360 | |
369 | 361 | Credits |
370 | 362 | ================================================================================ |
375 | 367 | Change log |
376 | 368 | ================================================================================ |
377 | 369 | |
370 | 0.6.0 - 9.10.2020 | |
371 | -------------------------------------------------------------------------------- | |
372 | ||
373 | **added** | |
374 | ||
375 | #. new style reader and writer plugins. works with pyexcel-io v0.6.2 | |
376 | ||
378 | 377 | 0.5.6 - 19.03.2019 |
379 | 378 | -------------------------------------------------------------------------------- |
380 | 379 | |
381 | added | |
382 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
380 | **added** | |
383 | 381 | |
384 | 382 | #. `#32 <https://github.com/pyexcel/pyexcel-ods/issues/32>`_, fix odfpy pinning |
385 | 383 | #. `#33 <https://github.com/pyexcel/pyexcel-ods/issues/33>`_, fix |
388 | 386 | 0.5.5 - 16.03.2019 |
389 | 387 | -------------------------------------------------------------------------------- |
390 | 388 | |
391 | added | |
392 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
389 | **added** | |
393 | 390 | |
394 | 391 | #. `#32 <https://github.com/pyexcel/pyexcel-ods/issues/32>`_, fix odfpy pinning |
395 | 392 | |
396 | 393 | 0.5.4 - 27.11.2018 |
397 | 394 | -------------------------------------------------------------------------------- |
398 | 395 | |
399 | added | |
400 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
396 | **added** | |
401 | 397 | |
402 | 398 | #. `#30 <https://github.com/pyexcel/pyexcel-ods/issues/30>`_, long type will not |
403 | 399 | be written in ods. please use string type. And if the integer is equal or |
407 | 403 | 0.5.3 - unreleased |
408 | 404 | -------------------------------------------------------------------------------- |
409 | 405 | |
410 | added | |
411 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
406 | **added** | |
412 | 407 | |
413 | 408 | #. `#24 <https://github.com/pyexcel/pyexcel-ods/issues/24>`_, ignore |
414 | 409 | comments(<office:comment>) in cell |
419 | 414 | 0.5.2 - 23.10.2017 |
420 | 415 | -------------------------------------------------------------------------------- |
421 | 416 | |
422 | updated | |
423 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
417 | **updated** | |
424 | 418 | |
425 | 419 | #. pyexcel `pyexcel#105 <https://github.com/pyexcel/pyexcel/issues/105>`_, |
426 | 420 | remove gease from setup_requires, introduced by 0.5.1. |
429 | 423 | 0.5.1 - 20.10.2017 |
430 | 424 | -------------------------------------------------------------------------------- |
431 | 425 | |
432 | added | |
433 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
426 | **added** | |
434 | 427 | |
435 | 428 | #. `pyexcel#103 <https://github.com/pyexcel/pyexcel/issues/103>`_, include |
436 | 429 | LICENSE file in MANIFEST.in, meaning LICENSE file will appear in the released |
439 | 432 | 0.5.0 - 30.08.2017 |
440 | 433 | -------------------------------------------------------------------------------- |
441 | 434 | |
442 | Updated | |
443 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
435 | **Updated** | |
444 | 436 | |
445 | 437 | #. put dependency on pyexcel-io 0.5.0, which uses cStringIO instead of StringIO. |
446 | 438 | Hence, there will be performance boost in handling files in memory. |
447 | 439 | |
448 | Relocated | |
449 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
440 | **Relocated** | |
450 | 441 | |
451 | 442 | #. All ods type conversion code lives in pyexcel_io.service module |
452 | 443 | |
453 | 444 | 0.4.1 - 25.08.2017 |
454 | 445 | -------------------------------------------------------------------------------- |
455 | 446 | |
456 | Updated | |
457 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
447 | **Updated** | |
458 | 448 | |
459 | 449 | #. `pyexcel#23 <https://github.com/pyexcel/pyexcel/issues/23>`_, handle |
460 | 450 | unseekable stream given by http response |
464 | 454 | 0.4.0 - 19.06.2017 |
465 | 455 | -------------------------------------------------------------------------------- |
466 | 456 | |
467 | Updated | |
468 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
457 | **Updated** | |
469 | 458 | |
470 | 459 | #. `pyexcel#14 <https://github.com/pyexcel/pyexcel/issues/14>`_, close file |
471 | 460 | handle |
475 | 464 | 0.3.3 - 07.05.2017 |
476 | 465 | -------------------------------------------------------------------------------- |
477 | 466 | |
478 | Updated | |
479 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
467 | **Updated** | |
480 | 468 | |
481 | 469 | #. issue `pyexcel#19 <https://github.com/pyexcel/pyexcel/issues/19>`_, not all |
482 | 470 | texts in a multi-node cell were extracted. |
484 | 472 | 0.3.2 - 13.04.2017 |
485 | 473 | -------------------------------------------------------------------------------- |
486 | 474 | |
487 | Updated | |
488 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
475 | **Updated** | |
489 | 476 | |
490 | 477 | #. issue `pyexcel#17 <https://github.com/pyexcel/pyexcel/issues/17>`_, empty new |
491 | 478 | line is ignored |
495 | 482 | 0.3.1 - 02.02.2017 |
496 | 483 | -------------------------------------------------------------------------------- |
497 | 484 | |
498 | Added | |
499 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
485 | **Added** | |
500 | 486 | |
501 | 487 | #. Recognize currency type |
502 | 488 | |
503 | 489 | 0.3.0 - 22.12.2016 |
504 | 490 | -------------------------------------------------------------------------------- |
505 | 491 | |
506 | Updated | |
507 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
492 | **Updated** | |
508 | 493 | |
509 | 494 | #. Code refactoring with pyexcel-io v 0.3.0 |
510 | 495 | |
511 | 496 | 0.2.2 - 24.10.2016 |
512 | 497 | -------------------------------------------------------------------------------- |
513 | 498 | |
514 | Updated | |
515 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
499 | **Updated** | |
516 | 500 | |
517 | 501 | #. issue `pyexcel#14 <https://github.com/pyexcel/pyexcel/issues/14>`_, index |
518 | 502 | error when reading a ods file that has non-uniform columns repeated property. |
520 | 504 | 0.2.1 - 31.08.2016 |
521 | 505 | -------------------------------------------------------------------------------- |
522 | 506 | |
523 | Added | |
524 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
507 | **Added** | |
525 | 508 | |
526 | 509 | #. support pagination. two pairs: start_row, row_limit and start_column, |
527 | 510 | column_limit help you deal with large files. |
530 | 513 | 0.2.0 - 01.06.2016 |
531 | 514 | -------------------------------------------------------------------------------- |
532 | 515 | |
533 | Added | |
534 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
516 | **Added** | |
535 | 517 | |
536 | 518 | #. By default, `float` will be converted to `int` where fits. `auto_detect_int`, |
537 | 519 | a flag to switch off the autoatic conversion from `float` to `int`. |
538 | 520 | #. 'library=pyexcel-ods' was added so as to inform pyexcel to use it instead of |
539 | 521 | other libraries, in the situation where multiple plugins were installed. |
540 | 522 | |
541 | Updated | |
542 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
523 | **Updated** | |
543 | 524 | |
544 | 525 | #. support the auto-import feature of pyexcel-io 0.2.0 |
545 | 526 | |
546 | 527 | 0.1.1 - 30.01.2016 |
547 | 528 | -------------------------------------------------------------------------------- |
548 | 529 | |
549 | Added | |
550 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
530 | **Added** | |
551 | 531 | |
552 | 532 | #. 'streaming' is an extra option given to get_data. Only when 'streaming' is |
553 | 533 | explicitly set to True, the data will be consisted of generators, hence will |
556 | 536 | #. support multi-line text cell #5 |
557 | 537 | #. feature migration from pyexcel-ods3 pyexcel/pyexcel-ods3#5 |
558 | 538 | |
559 | Updated | |
560 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
539 | **Updated** | |
561 | 540 | |
562 | 541 | #. compatibility with pyexcel-io 0.1.1 |
563 | 542 | |
564 | 543 | 0.0.12 - 10.10.2015 |
565 | 544 | -------------------------------------------------------------------------------- |
566 | 545 | |
567 | Updated | |
568 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
546 | **Updated** | |
569 | 547 | |
570 | 548 | #. Bug fix: excessive trailing columns with empty values |
571 | 549 | |
572 | 550 | 0.0.11 - 26.09.2015 |
573 | 551 | -------------------------------------------------------------------------------- |
574 | 552 | |
575 | Updated | |
576 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
553 | **Updated** | |
577 | 554 | |
578 | 555 | #. Complete fix for libreoffice datetime field |
579 | 556 | |
580 | 557 | 0.0.10 - 15.09.2015 |
581 | 558 | -------------------------------------------------------------------------------- |
582 | 559 | |
583 | Updated | |
584 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
560 | **Updated** | |
585 | 561 | |
586 | 562 | #. Bug fix: date field could have datetime from libreoffice |
587 | 563 | |
588 | 564 | 0.0.9 - 21.08.2015 |
589 | 565 | -------------------------------------------------------------------------------- |
590 | 566 | |
591 | Updated | |
592 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
567 | **Updated** | |
593 | 568 | |
594 | 569 | #. Bug fix: utf-8 string throw unicode exceptions |
595 | 570 | |
596 | 571 | 0.0.8 - 28.06.2015 |
597 | 572 | -------------------------------------------------------------------------------- |
598 | 573 | |
599 | Updated | |
600 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
574 | **Updated** | |
601 | 575 | |
602 | 576 | #. Pin dependency odfpy 0.9.6 to avoid buggy odfpy 1.3.0 |
603 | 577 | |
604 | 578 | 0.0.7 - 28.05.2015 |
605 | 579 | -------------------------------------------------------------------------------- |
606 | 580 | |
607 | Updated | |
608 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
581 | **Updated** | |
609 | 582 | |
610 | 583 | #. Bug fix: "number-columns-repeated" is now respected |
611 | 584 | |
612 | 585 | 0.0.6 - 21.05.2015 |
613 | 586 | -------------------------------------------------------------------------------- |
614 | 587 | |
615 | Updated | |
616 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
588 | **Updated** | |
617 | 589 | |
618 | 590 | #. get_data and save_data are seen across pyexcel-* extensions. remember them |
619 | 591 | once and use them across all extensions. |
621 | 593 | 0.0.5 - 22.02.2015 |
622 | 594 | -------------------------------------------------------------------------------- |
623 | 595 | |
624 | Added | |
625 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
596 | **Added** | |
626 | 597 | |
627 | 598 | #. Loads only one sheet from a multiple sheet book |
628 | 599 | #. Use New BSD License |
630 | 601 | 0.0.4 - 14.12.2014 |
631 | 602 | -------------------------------------------------------------------------------- |
632 | 603 | |
633 | Updated | |
634 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
604 | **Updated** | |
635 | 605 | |
636 | 606 | #. IO interface update as pyexcel-io introduced keywords. |
637 | 607 | #. initial release |
639 | 609 | 0.0.3 - 08.12.2014 |
640 | 610 | -------------------------------------------------------------------------------- |
641 | 611 | |
642 | Updated | |
643 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
612 | **Updated** | |
644 | 613 | |
645 | 614 | #. IO interface update as pyexcel-io introduced keywords. |
646 | 615 | #. initial release |
651 | 620 | Classifier: Topic :: Software Development :: Libraries |
652 | 621 | Classifier: Programming Language :: Python |
653 | 622 | Classifier: Intended Audience :: Developers |
654 | Classifier: Programming Language :: Python :: 2.6 | |
655 | Classifier: Programming Language :: Python :: 2.7 | |
656 | Classifier: Programming Language :: Python :: 3.3 | |
657 | Classifier: Programming Language :: Python :: 3.4 | |
658 | Classifier: Programming Language :: Python :: 3.5 | |
623 | Classifier: Programming Language :: Python :: 3 :: Only | |
659 | 624 | Classifier: Programming Language :: Python :: 3.6 |
625 | Classifier: Programming Language :: Python :: 3.7 | |
626 | Classifier: Programming Language :: Python :: 3.8 | |
627 | Requires-Python: >=3.6 |
2 | 2 | ================================================================================ |
3 | 3 | |
4 | 4 | .. image:: https://raw.githubusercontent.com/pyexcel/pyexcel.github.io/master/images/patreon.png |
5 | :target: https://www.patreon.com/pyexcel | |
6 | ||
7 | .. image:: https://api.bountysource.com/badge/team?team_id=288537 | |
8 | :target: https://salt.bountysource.com/teams/chfw-pyexcel | |
5 | :target: https://www.patreon.com/chfw | |
6 | ||
7 | .. image:: https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg | |
8 | :target: https://awesome-python.com/#specific-formats-processing | |
9 | 9 | |
10 | 10 | .. image:: https://travis-ci.org/pyexcel/pyexcel-ods.svg?branch=master |
11 | 11 | :target: http://travis-ci.org/pyexcel/pyexcel-ods |
13 | 13 | .. image:: https://codecov.io/gh/pyexcel/pyexcel-ods/branch/master/graph/badge.svg |
14 | 14 | :target: https://codecov.io/gh/pyexcel/pyexcel-ods |
15 | 15 | |
16 | .. image:: https://badge.fury.io/py/pyexcel-ods.svg | |
17 | :target: https://pypi.org/project/pyexcel-ods | |
18 | ||
19 | ||
20 | .. image:: https://pepy.tech/badge/pyexcel-ods/month | |
21 | :target: https://pepy.tech/project/pyexcel-ods/month | |
22 | ||
23 | ||
16 | 24 | .. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg |
17 | 25 | :target: https://gitter.im/pyexcel/Lobby |
18 | 26 | |
27 | .. image:: https://img.shields.io/static/v1?label=continuous%20templating&message=%E6%A8%A1%E7%89%88%E6%9B%B4%E6%96%B0&color=blue&style=flat-square | |
28 | :target: https://moban.readthedocs.io/en/latest/#at-scale-continous-templating-for-open-source-projects | |
29 | ||
30 | .. image:: https://img.shields.io/static/v1?label=coding%20style&message=black&color=black&style=flat-square | |
31 | :target: https://github.com/psf/black | |
19 | 32 | |
20 | 33 | **pyexcel-ods** is a tiny wrapper library to read, manipulate and write data in |
21 | 34 | ods format using python 2.6 and python 2.7. You are likely to use it with |
24 | 37 | depends on ezodf and lxml. `pyexcel-odsr <https://github.com/pyexcel/pyexcel-odsr>`_ |
25 | 38 | is the other sister library that has no external dependency but do ods reading only |
26 | 39 | |
40 | Support the project | |
41 | ================================================================================ | |
42 | ||
43 | If your company has embedded pyexcel and its components into a revenue generating | |
44 | product, please support me on github, `patreon <https://www.patreon.com/bePatron?u=5537627>`_ | |
45 | or `bounty source <https://salt.bountysource.com/teams/chfw-pyexcel>`_ to maintain | |
46 | the project and develop it further. | |
47 | ||
48 | If you are an individual, you are welcome to support me too and for however long | |
49 | you feel like. As my backer, you will receive | |
50 | `early access to pyexcel related contents <https://www.patreon.com/pyexcel/posts>`_. | |
51 | ||
52 | And your issues will get prioritized if you would like to become my patreon as `pyexcel pro user`. | |
53 | ||
54 | With your financial support, I will be able to invest | |
55 | a little bit more time in coding, documentation and writing interesting posts. | |
56 | ||
57 | ||
27 | 58 | Known constraints |
28 | 59 | ================== |
29 | 60 | |
47 | 78 | $ git clone https://github.com/pyexcel/pyexcel-ods.git |
48 | 79 | $ cd pyexcel-ods |
49 | 80 | $ python setup.py install |
50 | ||
51 | Support the project | |
52 | ================================================================================ | |
53 | ||
54 | If your company has embedded pyexcel and its components into a revenue generating | |
55 | product, please support me on `patreon <https://www.patreon.com/bePatron?u=5537627>`_ | |
56 | or `bounty source <https://salt.bountysource.com/teams/chfw-pyexcel>`_ to maintain | |
57 | the project and develop it further. | |
58 | ||
59 | If you are an individual, you are welcome to support me too and for however long | |
60 | you feel like. As my backer, you will receive | |
61 | `early access to pyexcel related contents <https://www.patreon.com/pyexcel/posts>`_. | |
62 | ||
63 | And your issues will get prioritized if you would like to become my patreon as `pyexcel pro user`. | |
64 | ||
65 | With your financial support, I will be able to invest | |
66 | a little bit more time in coding, documentation and writing interesting posts. | |
67 | ||
68 | 81 | |
69 | 82 | Usage |
70 | 83 | ================================================================================ |
347 | 360 | |
348 | 361 | > test.bat |
349 | 362 | |
350 | How to update test environment and update documentation | |
351 | --------------------------------------------------------- | |
352 | ||
353 | Additional steps are required: | |
354 | ||
355 | #. pip install moban | |
356 | #. git clone https://github.com/moremoban/setupmobans.git # generic setup | |
357 | #. git clone https://github.com/pyexcel/pyexcel-commons.git commons | |
358 | #. make your changes in `.moban.d` directory, then issue command `moban` | |
359 | ||
360 | What is pyexcel-commons | |
361 | --------------------------------- | |
362 | ||
363 | Many information that are shared across pyexcel projects, such as: this developer guide, license info, etc. are stored in `pyexcel-commons` project. | |
364 | ||
365 | What is .moban.d | |
366 | --------------------------------- | |
367 | ||
368 | `.moban.d` stores the specific meta data for the library. | |
369 | ||
370 | Acceptance criteria | |
371 | ------------------- | |
372 | ||
373 | #. Has Test cases written | |
374 | #. Has all code lines tested | |
375 | #. Passes all Travis CI builds | |
376 | #. Has fair amount of documentation if your change is complex | |
377 | #. run 'make format' so as to confirm the pyexcel organisation's coding style | |
378 | #. Please update CHANGELOG.rst | |
379 | #. Please add yourself to CONTRIBUTORS.rst | |
380 | #. Agree on NEW BSD License for your contribution | |
363 | ||
364 | Before you commit | |
365 | ------------------------------ | |
366 | ||
367 | Please run:: | |
368 | ||
369 | $ make format | |
370 | ||
371 | so as to beautify your code otherwise travis-ci may fail your unit test. | |
372 | ||
381 | 373 | |
382 | 374 | Credits |
383 | 375 | ================================================================================ |
6 | 6 | # |
7 | 7 | # This file only contains a selection of the most common options. For a full |
8 | 8 | # list see the documentation: |
9 | # http://www.sphinx-doc.org/en/master/config | |
9 | # https://www.sphinx-doc.org/en/master/usage/configuration.html | |
10 | 10 | |
11 | 11 | # -- Path setup -------------------------------------------------------------- |
12 | 12 | |
20 | 20 | |
21 | 21 | # -- Project information ----------------------------------------------------- |
22 | 22 | |
23 | project = 'pyexcel' | |
24 | copyright = 'copyright 2015-2019 Onni Software Ltd.' | |
25 | author = 'Onni Software Ltd.' | |
23 | project = 'pyexcel-ods' | |
24 | copyright = '2015-2020 Onni Software Ltd.' | |
25 | author = 'chfw' | |
26 | 26 | # The short X.Y version |
27 | version = '0.5.6' | |
27 | version = '0.6.0' | |
28 | 28 | # The full version, including alpha/beta/rc tags |
29 | release = '0.5.6' | |
29 | release = '0.6.0' | |
30 | 30 | |
31 | 31 | # -- General configuration --------------------------------------------------- |
32 | 32 | |
67 | 67 | # -- Options for intersphinx extension --------------------------------------- |
68 | 68 | |
69 | 69 | # Example configuration for intersphinx: refer to the Python standard library. |
70 | intersphinx_mapping = {'https://docs.python.org/': None} | |
70 | intersphinx_mapping = {'https://docs.python.org/3/': None} | |
71 | 71 | # TODO: html_theme not configurable upstream |
72 | 72 | html_theme = 'default' |
73 | 73 | |
82 | 82 | intersphinx_mapping.update({ |
83 | 83 | 'pyexcel': ('http://pyexcel.readthedocs.io/en/latest/', None), |
84 | 84 | }) |
85 | master_doc = "index" |
1 | 1 | pyexcel_ods |
2 | 2 | ~~~~~~~~~~~~~~~~~~~ |
3 | 3 | The lower level ods file format handler using odfpy |
4 | :copyright: (c) 2015-2017 by Onni Software Ltd & its contributors | |
4 | :copyright: (c) 2015-2020 by Onni Software Ltd & its contributors | |
5 | 5 | :license: New BSD License |
6 | 6 | """ |
7 | 7 | |
12 | 12 | |
13 | 13 | # this line has to be place above all else |
14 | 14 | # because of dynamic import |
15 | from pyexcel_io.plugins import IOPluginInfoChain | |
15 | from pyexcel_io.plugins import IOPluginInfoChain, IOPluginInfoChainV2 | |
16 | 16 | |
17 | 17 | __FILE_TYPE__ = "ods" |
18 | IOPluginInfoChain(__name__).add_a_reader( | |
18 | IOPluginInfoChain(__name__) | |
19 | IOPluginInfoChainV2(__name__).add_a_reader( | |
19 | 20 | relative_plugin_class_path="odsr.ODSBook", |
21 | locations=["file", "memory"], | |
22 | file_types=[__FILE_TYPE__], | |
23 | stream_type="binary", | |
24 | ).add_a_reader( | |
25 | relative_plugin_class_path="odsr.ODSBookInContent", | |
26 | locations=["content"], | |
20 | 27 | file_types=[__FILE_TYPE__], |
21 | 28 | stream_type="binary", |
22 | 29 | ).add_a_writer( |
23 | 30 | relative_plugin_class_path="odsw.ODSWriter", |
31 | locations=["file", "memory"], | |
24 | 32 | file_types=[__FILE_TYPE__], |
25 | 33 | stream_type="binary", |
26 | 34 | ) |
3 | 3 | |
4 | 4 | ods reader |
5 | 5 | |
6 | :copyright: (c) 2014-2017 by Onni Software Ltd. | |
6 | :copyright: (c) 2014-2020 by Onni Software Ltd. | |
7 | 7 | :license: New BSD License, see LICENSE for more details |
8 | 8 | """ |
9 | 9 | # Copyright 2011 Marco Conti |
19 | 19 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
20 | 20 | # See the License for the specific language governing permissions and |
21 | 21 | # limitations under the License. |
22 | from io import BytesIO | |
22 | 23 | |
23 | 24 | import pyexcel_io.service as service |
24 | from pyexcel_io._compact import OrderedDict | |
25 | from pyexcel_io.book import BookReader | |
26 | from pyexcel_io.sheet import SheetReader | |
27 | ||
28 | from odf.namespaces import OFFICENS | |
29 | from odf.opendocument import load | |
30 | from odf.table import Table, TableCell, TableRow | |
25 | from odf.text import P | |
26 | from odf.table import Table, TableRow, TableCell | |
31 | 27 | |
32 | 28 | # Thanks to grt for the fixes |
33 | 29 | from odf.teletype import extractText |
34 | from odf.text import P | |
30 | from odf.namespaces import OFFICENS | |
31 | from odf.opendocument import load | |
32 | from pyexcel_io.plugin_api import ISheet, IReader, NamedContent | |
35 | 33 | |
36 | 34 | |
37 | class ODSSheet(SheetReader): | |
35 | class ODSSheet(ISheet): | |
38 | 36 | """native ods sheet""" |
39 | 37 | |
40 | 38 | def __init__(self, sheet, auto_detect_int=True, **keywords): |
41 | SheetReader.__init__(self, sheet, **keywords) | |
39 | self._native_sheet = sheet | |
40 | self._keywords = keywords | |
42 | 41 | self.__auto_detect_int = auto_detect_int |
43 | 42 | |
44 | 43 | @property |
99 | 98 | return "\n".join(text_content) |
100 | 99 | |
101 | 100 | |
102 | class ODSBook(BookReader): | |
101 | class ODSBook(IReader): | |
103 | 102 | """read ods book""" |
104 | 103 | |
105 | def open(self, file_name, **keywords): | |
106 | """open ods file""" | |
107 | BookReader.open(self, file_name, **keywords) | |
108 | self._load_from_file() | |
104 | def __init__(self, file_alike_object, _, **keywords): | |
105 | self._native_book = load(file_alike_object) | |
106 | self._keywords = keywords | |
107 | self.content_array = [ | |
108 | NamedContent(table.getAttribute("name"), table) | |
109 | for table in self._native_book.spreadsheet.getElementsByType(Table) | |
110 | ] | |
109 | 111 | |
110 | def open_stream(self, file_stream, **keywords): | |
111 | """open ods file stream""" | |
112 | BookReader.open_stream(self, file_stream, **keywords) | |
113 | self._load_from_memory() | |
114 | ||
115 | def read_sheet_by_name(self, sheet_name): | |
116 | """read a named sheet""" | |
117 | tables = self._native_book.spreadsheet.getElementsByType(Table) | |
118 | rets = [ | |
119 | table | |
120 | for table in tables | |
121 | if table.getAttribute("name") == sheet_name | |
122 | ] | |
123 | if len(rets) == 0: | |
124 | raise ValueError("%s cannot be found" % sheet_name) | |
125 | else: | |
126 | return self.read_sheet(rets[0]) | |
127 | ||
128 | def read_sheet_by_index(self, sheet_index): | |
112 | def read_sheet(self, sheet_index): | |
129 | 113 | """read a sheet at a specified index""" |
130 | tables = self._native_book.spreadsheet.getElementsByType(Table) | |
131 | length = len(tables) | |
132 | if sheet_index < length: | |
133 | return self.read_sheet(tables[sheet_index]) | |
134 | else: | |
135 | raise IndexError( | |
136 | "Index %d of out bound %d" % (sheet_index, length) | |
137 | ) | |
138 | ||
139 | def read_all(self): | |
140 | """read all sheets""" | |
141 | result = OrderedDict() | |
142 | for sheet in self._native_book.spreadsheet.getElementsByType(Table): | |
143 | ods_sheet = ODSSheet(sheet, **self._keywords) | |
144 | result[ods_sheet.name] = ods_sheet.to_array() | |
145 | ||
146 | return result | |
147 | ||
148 | def read_sheet(self, native_sheet): | |
149 | """read one native sheet""" | |
150 | sheet = ODSSheet(native_sheet, **self._keywords) | |
151 | return {sheet.name: sheet.to_array()} | |
114 | table = self.content_array[sheet_index].payload | |
115 | sheet = ODSSheet(table, **self._keywords) | |
116 | return sheet | |
152 | 117 | |
153 | 118 | def close(self): |
154 | 119 | self._native_book = None |
155 | 120 | |
156 | def _load_from_memory(self): | |
157 | self._native_book = load(self._file_stream) | |
158 | 121 | |
159 | def _load_from_file(self): | |
160 | self._native_book = load(self._file_name) | |
122 | class ODSBookInContent(ODSBook): | |
123 | """ | |
124 | Open xlsx as read only mode | |
125 | """ | |
126 | ||
127 | def __init__(self, file_content, file_type, **keywords): | |
128 | io = BytesIO(file_content) | |
129 | super().__init__(io, file_type, **keywords) |
3 | 3 | |
4 | 4 | ods writer |
5 | 5 | |
6 | :copyright: (c) 2014-2017 by Onni Software Ltd. | |
6 | :copyright: (c) 2014-2020 by Onni Software Ltd. | |
7 | 7 | :license: New BSD License, see LICENSE for more details |
8 | 8 | """ |
9 | import sys | |
10 | ||
11 | 9 | import pyexcel_io.service as converter |
12 | from pyexcel_io.book import BookWriter | |
13 | from pyexcel_io.sheet import SheetWriter | |
14 | ||
10 | from odf.text import P | |
11 | from odf.table import Table, TableRow, TableCell | |
15 | 12 | from odf.namespaces import OFFICENS |
16 | 13 | from odf.opendocument import OpenDocumentSpreadsheet |
17 | from odf.table import Table, TableCell, TableRow | |
18 | from odf.text import P | |
19 | ||
20 | PY2 = sys.version_info[0] == 2 | |
21 | ||
22 | PY27_BELOW = PY2 and sys.version_info[1] < 7 | |
14 | from pyexcel_io.plugin_api import IWriter, ISheetWriter | |
23 | 15 | |
24 | 16 | |
25 | class ODSSheetWriter(SheetWriter): | |
17 | class ODSSheetWriter(ISheetWriter): | |
26 | 18 | """ |
27 | 19 | ODS sheet writer |
28 | 20 | """ |
29 | 21 | |
30 | def set_sheet_name(self, name): | |
31 | """initialize the native table""" | |
32 | self._native_sheet = Table(name=name) | |
33 | ||
34 | def set_size(self, size): | |
35 | """not used in this class but used in ods3""" | |
36 | pass | |
22 | def __init__(self, ods_book, sheet_name): | |
23 | self._native_book = ods_book | |
24 | self._native_sheet = Table(name=sheet_name) | |
37 | 25 | |
38 | 26 | def write_cell(self, row, cell): |
39 | 27 | """write a native cell""" |
77 | 65 | self._native_book.spreadsheet.addElement(self._native_sheet) |
78 | 66 | |
79 | 67 | |
80 | class ODSWriter(BookWriter): | |
68 | class ODSWriter(IWriter): | |
81 | 69 | """ |
82 | 70 | open document spreadsheet writer |
83 | 71 | |
84 | 72 | """ |
85 | 73 | |
86 | def __init__(self): | |
87 | BookWriter.__init__(self) | |
74 | def __init__(self, file_alike_object, file_type, **_): | |
75 | self.file_alike_object = file_alike_object | |
88 | 76 | self._native_book = OpenDocumentSpreadsheet() |
89 | 77 | |
90 | 78 | def create_sheet(self, name): |
91 | 79 | """ |
92 | 80 | write a row into the file |
93 | 81 | """ |
94 | return ODSSheetWriter(self._native_book, None, name) | |
82 | return ODSSheetWriter(self._native_book, name) | |
95 | 83 | |
96 | 84 | def close(self): |
97 | 85 | """ |
98 | 86 | This call writes file |
99 | 87 | |
100 | 88 | """ |
101 | self._native_book.write(self._file_alike_object) | |
89 | self._native_book.write(self.file_alike_object) | |
102 | 90 | self._native_book = None |
0 | Metadata-Version: 1.1 | |
0 | Metadata-Version: 1.2 | |
1 | 1 | Name: pyexcel-ods |
2 | Version: 0.5.6 | |
2 | Version: 0.6.0 | |
3 | 3 | Summary: A wrapper library to read, manipulate and write data in ods format |
4 | 4 | Home-page: https://github.com/pyexcel/pyexcel-ods |
5 | Author: C.W. | |
6 | Author-email: [email protected] | |
5 | Author: chfw | |
6 | Author-email: [email protected] | |
7 | 7 | License: New BSD |
8 | Download-URL: https://github.com/pyexcel/pyexcel-ods/archive/0.5.6.tar.gz | |
8 | Download-URL: https://github.com/pyexcel/pyexcel-ods/archive/0.6.0.tar.gz | |
9 | 9 | Description: ================================================================================ |
10 | 10 | pyexcel-ods - Let you focus on data, instead of ods format |
11 | 11 | ================================================================================ |
12 | 12 | |
13 | 13 | .. image:: https://raw.githubusercontent.com/pyexcel/pyexcel.github.io/master/images/patreon.png |
14 | :target: https://www.patreon.com/pyexcel | |
15 | ||
16 | .. image:: https://api.bountysource.com/badge/team?team_id=288537 | |
17 | :target: https://salt.bountysource.com/teams/chfw-pyexcel | |
14 | :target: https://www.patreon.com/chfw | |
15 | ||
16 | .. image:: https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg | |
17 | :target: https://awesome-python.com/#specific-formats-processing | |
18 | 18 | |
19 | 19 | .. image:: https://travis-ci.org/pyexcel/pyexcel-ods.svg?branch=master |
20 | 20 | :target: http://travis-ci.org/pyexcel/pyexcel-ods |
22 | 22 | .. image:: https://codecov.io/gh/pyexcel/pyexcel-ods/branch/master/graph/badge.svg |
23 | 23 | :target: https://codecov.io/gh/pyexcel/pyexcel-ods |
24 | 24 | |
25 | .. image:: https://badge.fury.io/py/pyexcel-ods.svg | |
26 | :target: https://pypi.org/project/pyexcel-ods | |
27 | ||
28 | ||
29 | .. image:: https://pepy.tech/badge/pyexcel-ods/month | |
30 | :target: https://pepy.tech/project/pyexcel-ods/month | |
31 | ||
32 | ||
25 | 33 | .. image:: https://img.shields.io/gitter/room/gitterHQ/gitter.svg |
26 | 34 | :target: https://gitter.im/pyexcel/Lobby |
27 | 35 | |
36 | .. image:: https://img.shields.io/static/v1?label=continuous%20templating&message=%E6%A8%A1%E7%89%88%E6%9B%B4%E6%96%B0&color=blue&style=flat-square | |
37 | :target: https://moban.readthedocs.io/en/latest/#at-scale-continous-templating-for-open-source-projects | |
38 | ||
39 | .. image:: https://img.shields.io/static/v1?label=coding%20style&message=black&color=black&style=flat-square | |
40 | :target: https://github.com/psf/black | |
28 | 41 | |
29 | 42 | **pyexcel-ods** is a tiny wrapper library to read, manipulate and write data in |
30 | 43 | ods format using python 2.6 and python 2.7. You are likely to use it with |
33 | 46 | depends on ezodf and lxml. `pyexcel-odsr <https://github.com/pyexcel/pyexcel-odsr>`_ |
34 | 47 | is the other sister library that has no external dependency but do ods reading only |
35 | 48 | |
49 | Support the project | |
50 | ================================================================================ | |
51 | ||
52 | If your company has embedded pyexcel and its components into a revenue generating | |
53 | product, please support me on github, `patreon <https://www.patreon.com/bePatron?u=5537627>`_ | |
54 | or `bounty source <https://salt.bountysource.com/teams/chfw-pyexcel>`_ to maintain | |
55 | the project and develop it further. | |
56 | ||
57 | If you are an individual, you are welcome to support me too and for however long | |
58 | you feel like. As my backer, you will receive | |
59 | `early access to pyexcel related contents <https://www.patreon.com/pyexcel/posts>`_. | |
60 | ||
61 | And your issues will get prioritized if you would like to become my patreon as `pyexcel pro user`. | |
62 | ||
63 | With your financial support, I will be able to invest | |
64 | a little bit more time in coding, documentation and writing interesting posts. | |
65 | ||
66 | ||
36 | 67 | Known constraints |
37 | 68 | ================== |
38 | 69 | |
56 | 87 | $ git clone https://github.com/pyexcel/pyexcel-ods.git |
57 | 88 | $ cd pyexcel-ods |
58 | 89 | $ python setup.py install |
59 | ||
60 | Support the project | |
61 | ================================================================================ | |
62 | ||
63 | If your company has embedded pyexcel and its components into a revenue generating | |
64 | product, please support me on `patreon <https://www.patreon.com/bePatron?u=5537627>`_ | |
65 | or `bounty source <https://salt.bountysource.com/teams/chfw-pyexcel>`_ to maintain | |
66 | the project and develop it further. | |
67 | ||
68 | If you are an individual, you are welcome to support me too and for however long | |
69 | you feel like. As my backer, you will receive | |
70 | `early access to pyexcel related contents <https://www.patreon.com/pyexcel/posts>`_. | |
71 | ||
72 | And your issues will get prioritized if you would like to become my patreon as `pyexcel pro user`. | |
73 | ||
74 | With your financial support, I will be able to invest | |
75 | a little bit more time in coding, documentation and writing interesting posts. | |
76 | ||
77 | 90 | |
78 | 91 | Usage |
79 | 92 | ================================================================================ |
334 | 347 | |
335 | 348 | > test.bat |
336 | 349 | |
337 | How to update test environment and update documentation | |
338 | --------------------------------------------------------- | |
339 | ||
340 | Additional steps are required: | |
341 | ||
342 | #. pip install moban | |
343 | #. git clone https://github.com/moremoban/setupmobans.git # generic setup | |
344 | #. git clone https://github.com/pyexcel/pyexcel-commons.git commons | |
345 | #. make your changes in `.moban.d` directory, then issue command `moban` | |
346 | ||
347 | What is pyexcel-commons | |
348 | --------------------------------- | |
349 | ||
350 | Many information that are shared across pyexcel projects, such as: this developer guide, license info, etc. are stored in `pyexcel-commons` project. | |
351 | ||
352 | What is .moban.d | |
353 | --------------------------------- | |
354 | ||
355 | `.moban.d` stores the specific meta data for the library. | |
356 | ||
357 | Acceptance criteria | |
358 | ------------------- | |
359 | ||
360 | #. Has Test cases written | |
361 | #. Has all code lines tested | |
362 | #. Passes all Travis CI builds | |
363 | #. Has fair amount of documentation if your change is complex | |
364 | #. run 'make format' so as to confirm the pyexcel organisation's coding style | |
365 | #. Please update CHANGELOG.rst | |
366 | #. Please add yourself to CONTRIBUTORS.rst | |
367 | #. Agree on NEW BSD License for your contribution | |
350 | ||
351 | Before you commit | |
352 | ------------------------------ | |
353 | ||
354 | Please run:: | |
355 | ||
356 | $ make format | |
357 | ||
358 | so as to beautify your code otherwise travis-ci may fail your unit test. | |
359 | ||
368 | 360 | |
369 | 361 | Credits |
370 | 362 | ================================================================================ |
375 | 367 | Change log |
376 | 368 | ================================================================================ |
377 | 369 | |
370 | 0.6.0 - 9.10.2020 | |
371 | -------------------------------------------------------------------------------- | |
372 | ||
373 | **added** | |
374 | ||
375 | #. new style reader and writer plugins. works with pyexcel-io v0.6.2 | |
376 | ||
378 | 377 | 0.5.6 - 19.03.2019 |
379 | 378 | -------------------------------------------------------------------------------- |
380 | 379 | |
381 | added | |
382 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
380 | **added** | |
383 | 381 | |
384 | 382 | #. `#32 <https://github.com/pyexcel/pyexcel-ods/issues/32>`_, fix odfpy pinning |
385 | 383 | #. `#33 <https://github.com/pyexcel/pyexcel-ods/issues/33>`_, fix |
388 | 386 | 0.5.5 - 16.03.2019 |
389 | 387 | -------------------------------------------------------------------------------- |
390 | 388 | |
391 | added | |
392 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
389 | **added** | |
393 | 390 | |
394 | 391 | #. `#32 <https://github.com/pyexcel/pyexcel-ods/issues/32>`_, fix odfpy pinning |
395 | 392 | |
396 | 393 | 0.5.4 - 27.11.2018 |
397 | 394 | -------------------------------------------------------------------------------- |
398 | 395 | |
399 | added | |
400 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
396 | **added** | |
401 | 397 | |
402 | 398 | #. `#30 <https://github.com/pyexcel/pyexcel-ods/issues/30>`_, long type will not |
403 | 399 | be written in ods. please use string type. And if the integer is equal or |
407 | 403 | 0.5.3 - unreleased |
408 | 404 | -------------------------------------------------------------------------------- |
409 | 405 | |
410 | added | |
411 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
406 | **added** | |
412 | 407 | |
413 | 408 | #. `#24 <https://github.com/pyexcel/pyexcel-ods/issues/24>`_, ignore |
414 | 409 | comments(<office:comment>) in cell |
419 | 414 | 0.5.2 - 23.10.2017 |
420 | 415 | -------------------------------------------------------------------------------- |
421 | 416 | |
422 | updated | |
423 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
417 | **updated** | |
424 | 418 | |
425 | 419 | #. pyexcel `pyexcel#105 <https://github.com/pyexcel/pyexcel/issues/105>`_, |
426 | 420 | remove gease from setup_requires, introduced by 0.5.1. |
429 | 423 | 0.5.1 - 20.10.2017 |
430 | 424 | -------------------------------------------------------------------------------- |
431 | 425 | |
432 | added | |
433 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
426 | **added** | |
434 | 427 | |
435 | 428 | #. `pyexcel#103 <https://github.com/pyexcel/pyexcel/issues/103>`_, include |
436 | 429 | LICENSE file in MANIFEST.in, meaning LICENSE file will appear in the released |
439 | 432 | 0.5.0 - 30.08.2017 |
440 | 433 | -------------------------------------------------------------------------------- |
441 | 434 | |
442 | Updated | |
443 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
435 | **Updated** | |
444 | 436 | |
445 | 437 | #. put dependency on pyexcel-io 0.5.0, which uses cStringIO instead of StringIO. |
446 | 438 | Hence, there will be performance boost in handling files in memory. |
447 | 439 | |
448 | Relocated | |
449 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
440 | **Relocated** | |
450 | 441 | |
451 | 442 | #. All ods type conversion code lives in pyexcel_io.service module |
452 | 443 | |
453 | 444 | 0.4.1 - 25.08.2017 |
454 | 445 | -------------------------------------------------------------------------------- |
455 | 446 | |
456 | Updated | |
457 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
447 | **Updated** | |
458 | 448 | |
459 | 449 | #. `pyexcel#23 <https://github.com/pyexcel/pyexcel/issues/23>`_, handle |
460 | 450 | unseekable stream given by http response |
464 | 454 | 0.4.0 - 19.06.2017 |
465 | 455 | -------------------------------------------------------------------------------- |
466 | 456 | |
467 | Updated | |
468 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
457 | **Updated** | |
469 | 458 | |
470 | 459 | #. `pyexcel#14 <https://github.com/pyexcel/pyexcel/issues/14>`_, close file |
471 | 460 | handle |
475 | 464 | 0.3.3 - 07.05.2017 |
476 | 465 | -------------------------------------------------------------------------------- |
477 | 466 | |
478 | Updated | |
479 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
467 | **Updated** | |
480 | 468 | |
481 | 469 | #. issue `pyexcel#19 <https://github.com/pyexcel/pyexcel/issues/19>`_, not all |
482 | 470 | texts in a multi-node cell were extracted. |
484 | 472 | 0.3.2 - 13.04.2017 |
485 | 473 | -------------------------------------------------------------------------------- |
486 | 474 | |
487 | Updated | |
488 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
475 | **Updated** | |
489 | 476 | |
490 | 477 | #. issue `pyexcel#17 <https://github.com/pyexcel/pyexcel/issues/17>`_, empty new |
491 | 478 | line is ignored |
495 | 482 | 0.3.1 - 02.02.2017 |
496 | 483 | -------------------------------------------------------------------------------- |
497 | 484 | |
498 | Added | |
499 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
485 | **Added** | |
500 | 486 | |
501 | 487 | #. Recognize currency type |
502 | 488 | |
503 | 489 | 0.3.0 - 22.12.2016 |
504 | 490 | -------------------------------------------------------------------------------- |
505 | 491 | |
506 | Updated | |
507 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
492 | **Updated** | |
508 | 493 | |
509 | 494 | #. Code refactoring with pyexcel-io v 0.3.0 |
510 | 495 | |
511 | 496 | 0.2.2 - 24.10.2016 |
512 | 497 | -------------------------------------------------------------------------------- |
513 | 498 | |
514 | Updated | |
515 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
499 | **Updated** | |
516 | 500 | |
517 | 501 | #. issue `pyexcel#14 <https://github.com/pyexcel/pyexcel/issues/14>`_, index |
518 | 502 | error when reading a ods file that has non-uniform columns repeated property. |
520 | 504 | 0.2.1 - 31.08.2016 |
521 | 505 | -------------------------------------------------------------------------------- |
522 | 506 | |
523 | Added | |
524 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
507 | **Added** | |
525 | 508 | |
526 | 509 | #. support pagination. two pairs: start_row, row_limit and start_column, |
527 | 510 | column_limit help you deal with large files. |
530 | 513 | 0.2.0 - 01.06.2016 |
531 | 514 | -------------------------------------------------------------------------------- |
532 | 515 | |
533 | Added | |
534 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
516 | **Added** | |
535 | 517 | |
536 | 518 | #. By default, `float` will be converted to `int` where fits. `auto_detect_int`, |
537 | 519 | a flag to switch off the autoatic conversion from `float` to `int`. |
538 | 520 | #. 'library=pyexcel-ods' was added so as to inform pyexcel to use it instead of |
539 | 521 | other libraries, in the situation where multiple plugins were installed. |
540 | 522 | |
541 | Updated | |
542 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
523 | **Updated** | |
543 | 524 | |
544 | 525 | #. support the auto-import feature of pyexcel-io 0.2.0 |
545 | 526 | |
546 | 527 | 0.1.1 - 30.01.2016 |
547 | 528 | -------------------------------------------------------------------------------- |
548 | 529 | |
549 | Added | |
550 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
530 | **Added** | |
551 | 531 | |
552 | 532 | #. 'streaming' is an extra option given to get_data. Only when 'streaming' is |
553 | 533 | explicitly set to True, the data will be consisted of generators, hence will |
556 | 536 | #. support multi-line text cell #5 |
557 | 537 | #. feature migration from pyexcel-ods3 pyexcel/pyexcel-ods3#5 |
558 | 538 | |
559 | Updated | |
560 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
539 | **Updated** | |
561 | 540 | |
562 | 541 | #. compatibility with pyexcel-io 0.1.1 |
563 | 542 | |
564 | 543 | 0.0.12 - 10.10.2015 |
565 | 544 | -------------------------------------------------------------------------------- |
566 | 545 | |
567 | Updated | |
568 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
546 | **Updated** | |
569 | 547 | |
570 | 548 | #. Bug fix: excessive trailing columns with empty values |
571 | 549 | |
572 | 550 | 0.0.11 - 26.09.2015 |
573 | 551 | -------------------------------------------------------------------------------- |
574 | 552 | |
575 | Updated | |
576 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
553 | **Updated** | |
577 | 554 | |
578 | 555 | #. Complete fix for libreoffice datetime field |
579 | 556 | |
580 | 557 | 0.0.10 - 15.09.2015 |
581 | 558 | -------------------------------------------------------------------------------- |
582 | 559 | |
583 | Updated | |
584 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
560 | **Updated** | |
585 | 561 | |
586 | 562 | #. Bug fix: date field could have datetime from libreoffice |
587 | 563 | |
588 | 564 | 0.0.9 - 21.08.2015 |
589 | 565 | -------------------------------------------------------------------------------- |
590 | 566 | |
591 | Updated | |
592 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
567 | **Updated** | |
593 | 568 | |
594 | 569 | #. Bug fix: utf-8 string throw unicode exceptions |
595 | 570 | |
596 | 571 | 0.0.8 - 28.06.2015 |
597 | 572 | -------------------------------------------------------------------------------- |
598 | 573 | |
599 | Updated | |
600 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
574 | **Updated** | |
601 | 575 | |
602 | 576 | #. Pin dependency odfpy 0.9.6 to avoid buggy odfpy 1.3.0 |
603 | 577 | |
604 | 578 | 0.0.7 - 28.05.2015 |
605 | 579 | -------------------------------------------------------------------------------- |
606 | 580 | |
607 | Updated | |
608 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
581 | **Updated** | |
609 | 582 | |
610 | 583 | #. Bug fix: "number-columns-repeated" is now respected |
611 | 584 | |
612 | 585 | 0.0.6 - 21.05.2015 |
613 | 586 | -------------------------------------------------------------------------------- |
614 | 587 | |
615 | Updated | |
616 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
588 | **Updated** | |
617 | 589 | |
618 | 590 | #. get_data and save_data are seen across pyexcel-* extensions. remember them |
619 | 591 | once and use them across all extensions. |
621 | 593 | 0.0.5 - 22.02.2015 |
622 | 594 | -------------------------------------------------------------------------------- |
623 | 595 | |
624 | Added | |
625 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
596 | **Added** | |
626 | 597 | |
627 | 598 | #. Loads only one sheet from a multiple sheet book |
628 | 599 | #. Use New BSD License |
630 | 601 | 0.0.4 - 14.12.2014 |
631 | 602 | -------------------------------------------------------------------------------- |
632 | 603 | |
633 | Updated | |
634 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
604 | **Updated** | |
635 | 605 | |
636 | 606 | #. IO interface update as pyexcel-io introduced keywords. |
637 | 607 | #. initial release |
639 | 609 | 0.0.3 - 08.12.2014 |
640 | 610 | -------------------------------------------------------------------------------- |
641 | 611 | |
642 | Updated | |
643 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
612 | **Updated** | |
644 | 613 | |
645 | 614 | #. IO interface update as pyexcel-io introduced keywords. |
646 | 615 | #. initial release |
651 | 620 | Classifier: Topic :: Software Development :: Libraries |
652 | 621 | Classifier: Programming Language :: Python |
653 | 622 | Classifier: Intended Audience :: Developers |
654 | Classifier: Programming Language :: Python :: 2.6 | |
655 | Classifier: Programming Language :: Python :: 2.7 | |
656 | Classifier: Programming Language :: Python :: 3.3 | |
657 | Classifier: Programming Language :: Python :: 3.4 | |
658 | Classifier: Programming Language :: Python :: 3.5 | |
623 | Classifier: Programming Language :: Python :: 3 :: Only | |
659 | 624 | Classifier: Programming Language :: Python :: 3.6 |
625 | Classifier: Programming Language :: Python :: 3.7 | |
626 | Classifier: Programming Language :: Python :: 3.8 | |
627 | Requires-Python: >=3.6 |
0 | 0 | #!/usr/bin/env python3 |
1 | 1 | |
2 | """ | |
3 | Template by pypi-mobans | |
4 | """ | |
5 | ||
6 | import os | |
7 | import sys | |
2 | 8 | import codecs |
3 | 9 | import locale |
4 | # Template by pypi-mobans | |
5 | import os | |
6 | 10 | import platform |
7 | import sys | |
8 | 11 | from shutil import rmtree |
9 | 12 | |
10 | from setuptools import Command, find_packages, setup | |
13 | from setuptools import Command, setup, find_packages | |
14 | ||
11 | 15 | |
12 | 16 | # Work around mbcs bug in distutils. |
13 | 17 | # http://bugs.python.org/issue10945 |
17 | 21 | try: |
18 | 22 | lc = locale.getlocale() |
19 | 23 | pf = platform.system() |
20 | if pf != 'Windows' and lc == (None, None): | |
21 | locale.setlocale(locale.LC_ALL, 'C.UTF-8') | |
24 | if pf != "Windows" and lc == (None, None): | |
25 | locale.setlocale(locale.LC_ALL, "C.UTF-8") | |
22 | 26 | except (ValueError, UnicodeError, locale.Error): |
23 | locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') | |
24 | ||
25 | NAME = 'pyexcel-ods' | |
26 | AUTHOR = 'C.W.' | |
27 | VERSION = '0.5.6' | |
28 | EMAIL = '[email protected]' | |
29 | LICENSE = 'New BSD' | |
27 | locale.setlocale(locale.LC_ALL, "en_US.UTF-8") | |
28 | ||
29 | NAME = "pyexcel-ods" | |
30 | AUTHOR = "chfw" | |
31 | VERSION = "0.6.0" | |
32 | EMAIL = "[email protected]" | |
33 | LICENSE = "New BSD" | |
30 | 34 | DESCRIPTION = ( |
31 | 'A wrapper library to read, manipulate and write data in ods format' | |
35 | "A wrapper library to read, manipulate and write data in ods format" | |
32 | 36 | ) |
33 | URL = 'https://github.com/pyexcel/pyexcel-ods' | |
34 | DOWNLOAD_URL = '%s/archive/0.5.6.tar.gz' % URL | |
35 | FILES = ['README.rst', 'CHANGELOG.rst'] | |
37 | URL = "https://github.com/pyexcel/pyexcel-ods" | |
38 | DOWNLOAD_URL = "%s/archive/0.6.0.tar.gz" % URL | |
39 | FILES = ["README.rst", "CHANGELOG.rst"] | |
36 | 40 | KEYWORDS = [ |
37 | 'python', | |
41 | "python", | |
38 | 42 | ] |
39 | 43 | |
40 | 44 | CLASSIFIERS = [ |
41 | 'Topic :: Software Development :: Libraries', | |
42 | 'Programming Language :: Python', | |
43 | 'Intended Audience :: Developers', | |
44 | 'Programming Language :: Python :: 2.6', | |
45 | 'Programming Language :: Python :: 2.7', | |
46 | 'Programming Language :: Python :: 3.3', | |
47 | 'Programming Language :: Python :: 3.4', | |
48 | 'Programming Language :: Python :: 3.5', | |
49 | 'Programming Language :: Python :: 3.6', | |
45 | "Topic :: Software Development :: Libraries", | |
46 | "Programming Language :: Python", | |
47 | "Intended Audience :: Developers", | |
48 | ||
49 | "Programming Language :: Python :: 3 :: Only", | |
50 | ||
51 | ||
52 | ||
53 | "Programming Language :: Python :: 3.6", | |
54 | "Programming Language :: Python :: 3.7", | |
55 | "Programming Language :: Python :: 3.8", | |
56 | ||
50 | 57 | ] |
51 | 58 | |
59 | PYTHON_REQUIRES = ">=3.6" | |
60 | ||
52 | 61 | INSTALL_REQUIRES = [ |
53 | 'pyexcel-io>=0.5.16', | |
54 | 'odfpy>=1.3.5', | |
62 | "pyexcel-io>=0.6.2", | |
63 | "odfpy>=1.3.5", | |
55 | 64 | ] |
56 | 65 | SETUP_COMMANDS = {} |
57 | 66 | |
58 | ||
59 | PACKAGES = find_packages(exclude=['ez_setup', 'examples', 'tests']) | |
67 | PACKAGES = find_packages(exclude=["ez_setup", "examples", "tests", "tests.*"]) | |
60 | 68 | EXTRAS_REQUIRE = { |
61 | 69 | } |
62 | 70 | # You do not need to read beyond this line |
63 | PUBLISH_COMMAND = '{0} setup.py sdist bdist_wheel upload -r pypi'.format( | |
64 | sys.executable) | |
65 | GS_COMMAND = ('gs pyexcel-ods v0.5.6 ' + | |
66 | "Find 0.5.6 in changelog for more details") | |
67 | NO_GS_MESSAGE = ('Automatic github release is disabled. ' + | |
68 | 'Please install gease to enable it.') | |
71 | PUBLISH_COMMAND = "{0} setup.py sdist bdist_wheel upload -r pypi".format(sys.executable) | |
72 | GS_COMMAND = ("gs pyexcel-ods v0.6.0 " + | |
73 | "Find 0.6.0 in changelog for more details") | |
74 | NO_GS_MESSAGE = ("Automatic github release is disabled. " + | |
75 | "Please install gease to enable it.") | |
69 | 76 | UPLOAD_FAILED_MSG = ( |
70 | 77 | 'Upload failed. please run "%s" yourself.' % PUBLISH_COMMAND) |
71 | 78 | HERE = os.path.abspath(os.path.dirname(__file__)) |
74 | 81 | class PublishCommand(Command): |
75 | 82 | """Support setup.py upload.""" |
76 | 83 | |
77 | description = 'Build and publish the package on github and pypi' | |
84 | description = "Build and publish the package on github and pypi" | |
78 | 85 | user_options = [] |
79 | 86 | |
80 | 87 | @staticmethod |
81 | 88 | def status(s): |
82 | 89 | """Prints things in bold.""" |
83 | print('\033[1m{0}\033[0m'.format(s)) | |
90 | print("\033[1m{0}\033[0m".format(s)) | |
84 | 91 | |
85 | 92 | def initialize_options(self): |
86 | 93 | pass |
90 | 97 | |
91 | 98 | def run(self): |
92 | 99 | try: |
93 | self.status('Removing previous builds...') | |
94 | rmtree(os.path.join(HERE, 'dist')) | |
95 | rmtree(os.path.join(HERE, 'build')) | |
96 | rmtree(os.path.join(HERE, 'pyexcel_ods.egg-info')) | |
100 | self.status("Removing previous builds...") | |
101 | rmtree(os.path.join(HERE, "dist")) | |
102 | rmtree(os.path.join(HERE, "build")) | |
103 | rmtree(os.path.join(HERE, "pyexcel_ods.egg-info")) | |
97 | 104 | except OSError: |
98 | 105 | pass |
99 | 106 | |
100 | self.status('Building Source and Wheel (universal) distribution...') | |
107 | self.status("Building Source and Wheel (universal) distribution...") | |
101 | 108 | run_status = True |
102 | 109 | if has_gease(): |
103 | 110 | run_status = os.system(GS_COMMAND) == 0 |
105 | 112 | self.status(NO_GS_MESSAGE) |
106 | 113 | if run_status: |
107 | 114 | if os.system(PUBLISH_COMMAND) != 0: |
108 | self.status(UPLOAD_FAILED_MSG % PUBLISH_COMMAND) | |
115 | self.status(UPLOAD_FAILED_MSG) | |
109 | 116 | |
110 | 117 | sys.exit() |
111 | 118 | |
112 | 119 | |
113 | 120 | SETUP_COMMANDS.update({ |
114 | 'publish': PublishCommand | |
121 | "publish": PublishCommand | |
115 | 122 | }) |
116 | 123 | |
117 | 124 | |
140 | 147 | def read(afile): |
141 | 148 | """Read a file into setup""" |
142 | 149 | the_relative_file = os.path.join(HERE, afile) |
143 | with codecs.open(the_relative_file, 'r', 'utf-8') as opened_file: | |
150 | with codecs.open(the_relative_file, "r", "utf-8") as opened_file: | |
144 | 151 | content = filter_out_test_code(opened_file) |
145 | 152 | content = "".join(list(content)) |
146 | 153 | return content |
149 | 156 | def filter_out_test_code(file_handle): |
150 | 157 | found_test_code = False |
151 | 158 | for line in file_handle.readlines(): |
152 | if line.startswith('.. testcode:'): | |
159 | if line.startswith(".. testcode:"): | |
153 | 160 | found_test_code = True |
154 | 161 | continue |
155 | 162 | if found_test_code is True: |
156 | if line.startswith(' '): | |
163 | if line.startswith(" "): | |
157 | 164 | continue |
158 | 165 | else: |
159 | 166 | empty_line = line.strip() |
163 | 170 | found_test_code = False |
164 | 171 | yield line |
165 | 172 | else: |
166 | for keyword in ['|version|', '|today|']: | |
173 | for keyword in ["|version|", "|today|"]: | |
167 | 174 | if keyword in line: |
168 | 175 | break |
169 | 176 | else: |
170 | 177 | yield line |
171 | 178 | |
172 | 179 | |
173 | if __name__ == '__main__': | |
180 | if __name__ == "__main__": | |
174 | 181 | setup( |
175 | 182 | test_suite="tests", |
176 | 183 | name=NAME, |
183 | 190 | long_description=read_files(*FILES), |
184 | 191 | license=LICENSE, |
185 | 192 | keywords=KEYWORDS, |
193 | python_requires=PYTHON_REQUIRES, | |
186 | 194 | extras_require=EXTRAS_REQUIRE, |
187 | tests_require=['nose'], | |
195 | tests_require=["nose"], | |
188 | 196 | install_requires=INSTALL_REQUIRES, |
189 | 197 | packages=PACKAGES, |
190 | 198 | include_package_data=True, |
0 | import os # noqa | |
0 | 1 | import datetime # noqa |
1 | import os # noqa | |
2 | 2 | |
3 | 3 | import pyexcel |
4 | ||
4 | 5 | from nose.tools import eq_, raises # noqa |
5 | 6 | |
6 | 7 |
2 | 2 | codecov |
3 | 3 | coverage |
4 | 4 | flake8 |
5 | black | |
6 | isort | |
7 | collective.checkdocs | |
8 | pygments | |
5 | 9 | moban |
6 | black;python_version>="3.6" | |
7 | isort;python_version>="3.6" | |
10 | moban_jinja2_github | |
11 | pyexcel | |
8 | 12 | psutil |
9 | pyexcel | |
10 | 13 | pyexcel-xls |
3 | 3 | |
4 | 4 | import psutil |
5 | 5 | import pyexcel as pe |
6 | from pyexcel_ods import get_data, save_data | |
7 | from pyexcel_io.exceptions import IntegerAccuracyLossError | |
8 | ||
6 | 9 | from nose import SkipTest |
7 | 10 | from nose.tools import eq_, raises |
8 | from pyexcel_io.exceptions import IntegerAccuracyLossError | |
9 | ||
10 | from pyexcel_ods import get_data, save_data | |
11 | 11 | |
12 | 12 | IN_TRAVIS = "TRAVIS" in os.environ |
13 | 13 |
0 | 0 | import os |
1 | 1 | |
2 | from pyexcel_io import get_data, save_data | |
3 | ||
2 | 4 | from nose.tools import eq_ |
3 | from pyexcel_io import get_data, save_data | |
4 | 5 | |
5 | 6 | |
6 | 7 | class TestFilter: |
1 | 1 | import sys |
2 | 2 | |
3 | 3 | import pyexcel |
4 | from base import PyexcelMultipleSheetBase | |
5 | ||
4 | 6 | from nose.tools import raises |
5 | ||
6 | from base import PyexcelMultipleSheetBase | |
7 | 7 | |
8 | 8 | if sys.version_info[0] == 2 and sys.version_info[1] < 7: |
9 | 9 | from ordereddict import OrderedDict |
2 | 2 | from base import ODSCellTypes |
3 | 3 | from pyexcel_ods.odsr import ODSBook |
4 | 4 | from pyexcel_ods.odsw import ODSWriter |
5 | from pyexcel_io.reader import Reader | |
5 | 6 | |
6 | 7 | |
7 | 8 | class TestODSReader(ODSCellTypes): |
8 | 9 | def setUp(self): |
9 | r = ODSBook() | |
10 | r = Reader("ods") | |
11 | r.reader_class = ODSBook | |
10 | 12 | r.open(os.path.join("tests", "fixtures", "ods_formats.ods")) |
11 | 13 | self.data = r.read_all() |
12 | 14 | for key in self.data.keys(): |
16 | 18 | |
17 | 19 | class TestODSWriter(ODSCellTypes): |
18 | 20 | def setUp(self): |
19 | r = ODSBook() | |
21 | r = Reader("ods") | |
22 | r.reader_class = ODSBook | |
20 | 23 | r.open(os.path.join("tests", "fixtures", "ods_formats.ods")) |
24 | r.close() | |
21 | 25 | self.data1 = r.read_all() |
22 | 26 | self.testfile = "odswriter.ods" |
23 | w = ODSWriter() | |
24 | w.open(self.testfile) | |
27 | w = ODSWriter(self.testfile, "ods") | |
25 | 28 | w.write(self.data1) |
26 | 29 | w.close() |
27 | r2 = ODSBook() | |
28 | r2.open(self.testfile) | |
29 | self.data = r2.read_all() | |
30 | r.open(self.testfile) | |
31 | self.data = r.read_all() | |
30 | 32 | for key in self.data.keys(): |
31 | 33 | self.data[key] = list(self.data[key]) |
32 | 34 |
0 | 0 | import os |
1 | 1 | |
2 | 2 | import pyexcel |
3 | from base import create_sample_file1 | |
4 | ||
3 | 5 | from nose.tools import eq_ |
4 | ||
5 | from base import create_sample_file1 | |
6 | 6 | |
7 | 7 | |
8 | 8 | class TestStringIO: |
0 | 0 | import os |
1 | 1 | |
2 | from base import PyexcelHatWriterBase, PyexcelWriterBase | |
3 | from pyexcel_ods.odsr import ODSBook as Reader | |
2 | from base import PyexcelWriterBase, PyexcelHatWriterBase | |
3 | from pyexcel_io import get_data | |
4 | 4 | from pyexcel_ods.odsw import ODSWriter as Writer |
5 | 5 | |
6 | 6 | |
12 | 12 | "Sheet3": [[u"X", u"Y", u"Z"], [1, 4, 7], [2, 5, 8], [3, 6, 9]], |
13 | 13 | } |
14 | 14 | self.testfile = "writer.ods" |
15 | writer = Writer() | |
16 | writer.open(self.testfile) | |
15 | writer = Writer(self.testfile, "ods") | |
17 | 16 | writer.write(self.content) |
18 | 17 | writer.close() |
19 | reader = Reader() | |
20 | reader.open(self.testfile) | |
21 | content = reader.read_all() | |
22 | for key in content.keys(): | |
23 | content[key] = list(content[key]) | |
18 | content = get_data(self.testfile, library="pyexcel-ods") | |
24 | 19 | assert content == self.content |
25 | reader.close() | |
26 | 20 | |
27 | 21 | def tearDown(self): |
28 | 22 | if os.path.exists(self.testfile): |