start 0.2.0 code refactoring

This commit is contained in:
chfw 2016-03-04 22:13:24 +00:00
parent 6eb2eea8a9
commit bd87ccdd9b
5 changed files with 15 additions and 25 deletions

View File

@ -1,9 +1,9 @@
configuration:
- configuration_dir: "commons/config"
- template_dir:
- "commons/templates"
- ".moban.d"
- configuration: pyexcel_xls.yaml
configuration_dir: "commons/config"
template_dir:
- "commons/templates"
- ".moban.d"
configuration: pyexcel_xls.yaml
targets:
- README.rst: README.rst
- setup.py: setup.py

View File

@ -45,9 +45,9 @@ copyright = u'2015-2016 Onni Software Ltd.'
# built documents.
#
# The short X.Y version.
version = '0.1.0'
version = '0.2.0'
# The full version, including alpha/beta/rc tags.
release = '0.1.0'
release = '0.2.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -1,7 +1,7 @@
overrides: "pyexcel.yaml"
name: "pyexcel-xls"
nick_name: xls
version: 0.1.0
version: 0.2.0
file_type: xls
dependencies:
- pyexcel-io>=0.1.0

View File

@ -16,8 +16,6 @@ from pyexcel_io import (
BookReader,
SheetWriter,
BookWriter,
READERS,
WRITERS,
isstream,
get_data as read_data,
store_data as write_data
@ -224,18 +222,6 @@ class XLWriter(BookWriter):
self.wb.save(self.file)
READERS.update({
"xls": XLBook,
"xlsm": XLBook,
"xlsx": XLBook
})
WRITERS.update({
"xls": XLWriter
})
def get_data(afile, file_type=None, **keywords):
if isstream(afile) and file_type is None:
file_type = 'xls'
@ -248,4 +234,8 @@ def save_data(afile, data, file_type=None, **keywords):
write_data(afile, data, file_type=file_type, **keywords)
__VERSION__ = "0.0.8"
def extend_pyexcel(ReaderFactory, WriterFactory):
ReaderFactory.add_factory("xls", XLBook)
ReaderFactory.add_factory("xlsm", XLBook)
ReaderFactory.add_factory("xlsx", XLBook)
WriterFactory.add_factory("xls", XLWriter)

View File

@ -19,8 +19,8 @@ extras = {}
setup(
name='pyexcel-xls',
author='C. W.',
version='0.1.0',
author='C.W.',
version='0.2.0',
author_email='wangc_2011 (at) hotmail.com',
url='https://github.com/pyexcel/pyexcel-xls',
description='A wrapper library to read, manipulate and write data in xls format. It reads xlsx and xlsm format',