Skip to content

Commit d196228

Browse files
committed
Increase version to 0.16
1 parent 16a104e commit d196228

File tree

6 files changed

+31
-13
lines changed

6 files changed

+31
-13
lines changed

AUTHORS.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ Tom McLean <[email protected]>
1313
1414
Helmy Giacoman <[email protected]>
1515
16+
Edward Betts <[email protected]>
17+
18+
Oleg Pshenichniy <[email protected]>
19+

VERSION.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
EbookLib 0.15
1+
EbookLib 0.16

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
# built documents.
4949
#
5050
# The short X.Y version.
51-
version = '0.15'
51+
version = '0.16'
5252
# The full version, including alpha/beta/rc tags.
53-
release = '0.15'
53+
release = '0.16'
5454

5555
# The language for content autogenerated by Sphinx. Refer to documentation
5656
# for a list of supported languages.

ebooklib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
# Version of ebook library
1818

19-
VERSION = (0, 15, 0)
19+
VERSION = (0, 16, 0)
2020

2121
# LIST OF POSSIBLE ITEMS
2222
ITEM_UNKNOWN = 0

ebooklib/epub.py

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def __str__(self):
109109

110110
# Items
111111

112+
112113
class EpubItem(object):
113114
"""
114115
Base class for the items in a book.
@@ -320,7 +321,8 @@ def add_item(self, item):
320321

321322
def get_body_content(self):
322323
"""
323-
Returns content of BODY element for this HTML document. Content will be of type 'str' (Python 2) or 'bytes' (Python 3).
324+
Returns content of BODY element for this HTML document. Content will be of type 'str' (Python 2)
325+
or 'bytes' (Python 3).
324326
325327
:Returns:
326328
Returns content of this document.
@@ -350,7 +352,8 @@ def get_body_content(self):
350352

351353
def get_content(self, default=None):
352354
"""
353-
Returns content for this document as HTML string. Content will be of type 'str' (Python 2) or 'bytes' (Python 3).
355+
Returns content for this document as HTML string. Content will be of type 'str' (Python 2)
356+
or 'bytes' (Python 3).
354357
355358
:Args:
356359
- default: Default value for the content if it is not defined.
@@ -540,7 +543,9 @@ def reset(self):
540543
'cover': COVER_XML
541544
}
542545

543-
self.add_metadata('OPF', 'generator', '', {'name': 'generator', 'content': 'Ebook-lib %s' % '.'.join([str(s) for s in VERSION])})
546+
self.add_metadata('OPF', 'generator', '', {
547+
'name': 'generator', 'content': 'Ebook-lib %s' % '.'.join([str(s) for s in VERSION])
548+
})
544549

545550
# default to using a randomly-unique identifier if one is not specified manually
546551
self.set_identifier(str(uuid.uuid4()))
@@ -1033,7 +1038,9 @@ def _get_nav(self, item):
10331038

10341039
# for now this just handles css files and ignores others
10351040
for _link in item.links:
1036-
_lnk = etree.SubElement(head, 'link', {"href": _link.get('href', ''), "rel": "stylesheet", "type": "text/css"})
1041+
_lnk = etree.SubElement(head, 'link', {
1042+
"href": _link.get('href', ''), "rel": "stylesheet", "type": "text/css"
1043+
})
10371044

10381045
body = etree.SubElement(root, 'body')
10391046
nav = etree.SubElement(body, 'nav', {'{%s}type' % NAMESPACES['EPUB']: 'toc', 'id': 'id'})
@@ -1100,7 +1107,10 @@ def _create_section(itm, items):
11001107
_title = elem.get('title', '')
11011108

11021109
guide_type = elem.get('type', '')
1103-
a_item = etree.SubElement(li_item, 'a', {'{%s}type' % NAMESPACES['EPUB']: guide_to_landscape_map.get(guide_type, guide_type), 'href': os.path.relpath(_href, nav_dir_name)})
1110+
a_item = etree.SubElement(li_item, 'a', {
1111+
'{%s}type' % NAMESPACES['EPUB']: guide_to_landscape_map.get(guide_type, guide_type),
1112+
'href': os.path.relpath(_href, nav_dir_name)
1113+
})
11041114
a_item.text = _title
11051115

11061116
tree_str = etree.tostring(nav_xml, pretty_print=True, encoding='utf-8', xml_declaration=True)
@@ -1137,7 +1147,9 @@ def _create_section(itm, items, uid):
11371147
if isinstance(item, tuple) or isinstance(item, list):
11381148
section, subsection = item[0], item[1]
11391149

1140-
np = etree.SubElement(itm, 'navPoint', {'id': section.get_id() if isinstance(section, EpubHtml) else 'sep_%d' % uid})
1150+
np = etree.SubElement(itm, 'navPoint', {
1151+
'id': section.get_id() if isinstance(section, EpubHtml) else 'sep_%d' % uid
1152+
})
11411153
nl = etree.SubElement(np, 'navLabel')
11421154
nt = etree.SubElement(nl, 'text')
11431155
nt.text = section.title
@@ -1381,7 +1393,6 @@ def _load_manifest(self):
13811393
ei.media_type = media_type
13821394

13831395
ei.content = self.read_file(zip_path.join(self.opf_dir, ei.get_name()))
1384-
# r.get('properties')
13851396

13861397
self.book.add_item(ei)
13871398

@@ -1410,7 +1421,7 @@ def _get_children(elems, n, nid):
14101421
return (Section(label, href=content),
14111422
children)
14121423
else:
1413-
return (Link(content, label, nid))
1424+
return Link(content, label, nid)
14141425

14151426
self.book.toc = _get_children(nav_map, 0, '')
14161427

setup.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
setup(
55
name = 'EbookLib',
6-
version = '0.15',
6+
version = '0.16',
77
author = 'Aleksandar Erkalovic',
88
author_email = '[email protected]',
99
packages = ['ebooklib', 'ebooklib.plugins'],
@@ -18,6 +18,9 @@
1818
"Operating System :: OS Independent",
1919
"Programming Language :: Python :: 2.7",
2020
"Programming Language :: Python :: 3.3",
21+
"Programming Language :: Python :: 3.4",
22+
"Programming Language :: Python :: 3.5",
23+
"Programming Language :: Python :: 3.6",
2124
"Topic :: Software Development :: Libraries :: Python Modules"
2225
],
2326
install_requires = [

0 commit comments

Comments
 (0)