Skip to content

Commit 655c402

Browse files
committed
remove useless code
1 parent 953cf0d commit 655c402

File tree

4 files changed

+11
-38
lines changed

4 files changed

+11
-38
lines changed

.moban.d/README.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
{%block description%}
44
**pyexcel-odsr** is a dedicated ods reader using tailored ods reader from messytables.
55
You are likely to use it with `pyexcel <https://github.com/pyexcel/pyexcel>`_.
6-
`pyexcel-ods <https://github.com/pyexcel/pyexcel-ods>`_ and
7-
`pyexcel-ods3 <https://github.com/pyexcel/pyexcel-ods3>`_ are simliar libraries.
6+
Differring from `pyexcel-ods <https://github.com/pyexcel/pyexcel-ods>`_ and
7+
`pyexcel-ods3 <https://github.com/pyexcel/pyexcel-ods3>`_ in handling ods file, this
8+
library could read partial content from a huge ods file.
9+
810
{%endblock%}
911

1012
{% block write_to_file %}
@@ -55,6 +57,6 @@ You are likely to use it with `pyexcel <https://github.com/pyexcel/pyexcel>`_.
5557
Credits
5658
================================================================================
5759

58-
This library is based on the ods of messytables, Open Knowledge International.
60+
This library is based on the ods of messytables, Open Knowledge Foundation Ltd.
5961

6062
{%endblock%}

README.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ pyexcel-odsr - Let you focus on data, instead of ods format
1010

1111
**pyexcel-odsr** is a dedicated ods reader using tailored ods reader from messytables.
1212
You are likely to use it with `pyexcel <https://github.com/pyexcel/pyexcel>`_.
13-
`pyexcel-ods <https://github.com/pyexcel/pyexcel-ods>`_ and
14-
`pyexcel-ods3 <https://github.com/pyexcel/pyexcel-ods3>`_ are simliar libraries.
13+
Differring from `pyexcel-ods <https://github.com/pyexcel/pyexcel-ods>`_ and
14+
`pyexcel-ods3 <https://github.com/pyexcel/pyexcel-ods3>`_ in handling ods file, this
15+
library could read partial content from a huge ods file.
16+
1517

1618
Known constraints
1719
==================
@@ -296,7 +298,7 @@ On Windows systems, please issue this command::
296298
Credits
297299
================================================================================
298300

299-
This library is based on the ods of messytables, Open Knowledge International.
301+
This library is based on the ods of messytables, Open Knowledge Foundation Ltd.
300302

301303

302304
.. testcode::

pyexcel_odsr/converter.py

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ def date_value(value):
3535
return ret
3636

3737

38-
def ods_date_value(value):
39-
return value.strftime("%Y-%m-%d")
40-
41-
4238
def time_value(value):
4339
"""convert to time value accroding the specification"""
4440
hour = int(value[2:4])
@@ -51,10 +47,6 @@ def time_value(value):
5147
return ret
5248

5349

54-
def ods_time_value(value):
55-
return value.strftime("PT%HH%MM%SS")
56-
57-
5850
def boolean_value(value):
5951
"""get bolean value"""
6052
if value == "true":
@@ -64,22 +56,6 @@ def boolean_value(value):
6456
return ret
6557

6658

67-
def ods_bool_value(value):
68-
"""convert a boolean value to text"""
69-
if value is True:
70-
return "true"
71-
else:
72-
return "false"
73-
74-
75-
def ods_timedelta_value(cell):
76-
"""convert a cell value to time delta"""
77-
hours = cell.days * 24 + cell.seconds // 3600
78-
minutes = (cell.seconds // 60) % 60
79-
seconds = cell.seconds % 60
80-
return "PT%02dH%02dM%02dS" % (hours, minutes, seconds)
81-
82-
8359
ODS_FORMAT_CONVERSION = {
8460
"float": float,
8561
"date": datetime.date,
@@ -113,13 +89,6 @@ def ods_timedelta_value(cell):
11389
"percentage": float_value
11490
}
11591

116-
ODS_VALUE_CONVERTERS = {
117-
"date": ods_date_value,
118-
"time": ods_time_value,
119-
"boolean": ods_bool_value,
120-
"timedelta": ods_timedelta_value
121-
}
122-
12392

12493
VALUE_TOKEN = {
12594
"float": "value",

pyexcel_odsr/messyods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
Copyright 2012-2017 Open Knowledge International
2+
Copyright (c) 2012-2017 The Open Knowledge Foundation Ltd.
33
44
Permission is hereby granted, free of charge, to any person obtaining a copy of
55
this software and associated documentation files (the "Software"), to deal in

0 commit comments

Comments
 (0)