Skip to content

Commit

Permalink
update version
Browse files Browse the repository at this point in the history
  • Loading branch information
jack committed Feb 7, 2018
1 parent f76b104 commit 1d59419
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 7 deletions.
2 changes: 1 addition & 1 deletion imgkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

__author__ = 'jarrekk'
__contact__ = '[email protected]'
__version__ = '0.1.8'
__version__ = '1.0.0'
__homepage__ = 'https://github.com/jarrekk/imgkit'
__license__ = 'MIT'

Expand Down
43 changes: 37 additions & 6 deletions imgkit/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,13 @@
from .config import Config


def from_url(url, output_path, options=None, toc=None, cover=None, config=None, cover_first=None):
def from_url(url,
output_path,
options=None,
toc=None,
cover=None,
config=None,
cover_first=None):
"""
Convert URL/URLs to IMG file/files
Expand All @@ -17,11 +23,23 @@ def from_url(url, output_path, options=None, toc=None, cover=None, config=None,
:param cover_first: (optional) if True, cover always precedes TOC
:return: True when success
"""
rtn = IMGKit(url, 'url', options=options, toc=toc, cover=cover, config=config, cover_first=cover_first)
rtn = IMGKit(url,
'url',
options=options,
toc=toc, cover=cover,
config=config,
cover_first=cover_first)
return rtn.to_img(output_path)


def from_file(filename, output_path, options=None, toc=None, cover=None, css=None, config=None, cover_first=None):
def from_file(filename,
output_path,
options=None,
toc=None,
cover=None,
css=None,
config=None,
cover_first=None):
"""
Convert HTML file/files to IMG file/files
Expand All @@ -35,12 +53,25 @@ def from_file(filename, output_path, options=None, toc=None, cover=None, css=Non
:param cover_first: (optional) if True, cover always precedes TOC
:return: True when success
"""
rtn = IMGKit(filename, 'file', options=options, toc=toc, cover=cover, css=css,
config=config, cover_first=cover_first)
rtn = IMGKit(filename,
'file',
options=options,
toc=toc,
cover=cover,
css=css,
config=config,
cover_first=cover_first)
return rtn.to_img(output_path)


def from_string(string, output_path, options=None, toc=None, cover=None, css=None, config=None, cover_first=None):
def from_string(string,
output_path,
options=None,
toc=None,
cover=None,
css=None,
config=None,
cover_first=None):
"""
Convert given string/strings to IMG file
Expand Down

0 comments on commit 1d59419

Please sign in to comment.