Skip to content

Commit

Permalink
Merge branch 'release/1.0.9'
Browse files Browse the repository at this point in the history
  • Loading branch information
rhigman committed Aug 2, 2023
2 parents 3d94547 + f4ac3a7 commit d0f94f4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/epublius/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ def mathjax_support(self, mathjax_cdn):

def get_book_url(self):
'''
Compose the url of the current (web) page, i.e.:
https://www.openbookpublishers.com/htmlreader/ \
978-1-78374-791-7/*
Compose the url of the current (web) page, e.g.:
https://books.openbookpublishers.com/10.11647/ \
obp.9999/*
'''
return self.args.url + '*'

def get_page_url(self):
'''
Compose the url of the current (web) page, i.e.:
https://www.openbookpublishers.com/htmlreader/ \
978-1-78374-791-7/ch1.xhtml
Compose the url of the current (web) page, e.g.:
https://books.openbookpublishers.com/10.11647/ \
obp.9999/ch1.xhtml
'''
url = urllib.parse.urljoin(self.args.url,
self.contents[self.index])
Expand Down
6 changes: 5 additions & 1 deletion src/thoth_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,11 @@ def get_html_pub_url(thoth_data):
'location URL not specified. Please, '
'add it and re-run the process.')

return url
# Add trailing slash if not present - needed for correct URL concatenation
if url.endswith('/'):
return url
else:
return url + '/'

def run():
parser = argparse.ArgumentParser(description='Thoth wrapper')
Expand Down

0 comments on commit d0f94f4

Please sign in to comment.