🔨 code refactoring on v0.6.0

This commit is contained in:
chfw 2018-11-10 22:32:18 +00:00
parent fc0e6088f3
commit 43a5a56227
6 changed files with 8 additions and 23 deletions

View File

@ -31,7 +31,7 @@ author = u'C.W.'
# The short X.Y version
version = u'0.5.9.1'
# The full version, including alpha/beta/rc tags
release = u'0.5.9.1'
release = u'0.6.0'
# -- General configuration ---------------------------------------------------

View File

@ -10,6 +10,7 @@
:Source code: http://github.com/pyexcel/pyexcel-io.git
:Issues: http://github.com/pyexcel/pyexcel-io/issues
:License: New BSD License
:Development: |release|
:Released: |version|
:Generated: |today|

View File

@ -1,8 +1,8 @@
overrides: "pyexcel.yaml"
name: "pyexcel-io"
nick_name: io
version: 0.5.9.1
current_version: 0.5.9.1
version: 0.6.0
current_version: 0.6.0
release: 0.5.9.1
dependencies:
- ordereddict;python_version<"2.7"

View File

@ -119,29 +119,13 @@ def save_data(afile, data, file_type=None, **keywords):
if no_file_type:
file_type = constants.FILE_FORMAT_CSV
store_data(
afile,
to_store,
file_type=file_type,
single_sheet_in_book=single_sheet_in_book,
**keywords
)
def store_data(afile, data, file_type=None, **keywords):
"""Non public function to store data to afile
:param filename: actual file name, a file stream or actual content
:param data: the data to be written
:param file_type: used only when filename is not a physial file name
:param keywords: any other parameters
"""
if isstream(afile):
keywords.update(dict(file_stream=afile, file_type=file_type))
else:
keywords.update(dict(file_name=afile, file_type=file_type))
keywords['single_sheet_in_book'] = single_sheet_in_book
with get_writer(**keywords) as writer:
writer.write(data)
writer.write(to_store)
def load_data(

View File

@ -1,5 +1,5 @@
.
https://github.com/chfw/lml/archive/master.zip
https://github.com/pyexcel/pyexcel/archive/master.zip
https://github.com/pyexcel/pyexcel-xls/archive/master.zip
https://github.com/pyexcel/pyexcel-xls/archive/dev.zip

View File

@ -13,7 +13,7 @@ PY26 = PY2 and sys.version_info[1] < 7
NAME = 'pyexcel-io'
AUTHOR = 'C.W.'
VERSION = '0.5.9.1'
VERSION = '0.6.0'
EMAIL = 'wangc_2011@hotmail.com'
LICENSE = 'New BSD'
DESCRIPTION = (