Commit 5fba87d9 authored by Matthieu Boileau's avatar Matthieu Boileau
Browse files

v0.3.2

parent 8c20b1f1
...@@ -15,4 +15,4 @@ tests/notebooks ...@@ -15,4 +15,4 @@ tests/notebooks
*.egg-info/ *.egg-info/
dist/ dist/
poetry.lock poetry.lock
.venv .venv*/
# Changelog # Changelog
## [0.3.2] - 2020-11-06
### Changed
* Handle bookbook import error
## [0.3.1] - 2020-11-06 ## [0.3.1] - 2020-11-06
### Changed ### Changed
* use flit instead of poetry * Use flit instead of poetry
## [0.3.0] - 2020-11-05 ## [0.3.0] - 2020-11-05
### Changed ### Changed
* `style_ipython.tplx` -> `style_ipython.tex.j2` in `/theme/default/templates/book.tplx`. Please update this file in your local `theme/` dir if you are using nbconvert >= 6.0 * `style_ipython.tplx` -> `style_ipython.tex.j2` in `/theme/default/templates/book.tplx`. Please update this file in your local `theme/` dir if you are using nbconvert >= 6.0
* some code enhancement * Some code enhancement
### Fixed ### Fixed
......
...@@ -6,4 +6,4 @@ import logging ...@@ -6,4 +6,4 @@ import logging
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
logging.basicConfig(level=logging.INFO) logging.basicConfig(level=logging.INFO)
__version__ = '0.3.1' __version__ = '0.3.2'
\ No newline at end of file \ No newline at end of file
import jinja2 import jinja2
from . import log from . import log
import os import os
from bookbook.latex import combine_and_convert
from pathlib import Path from pathlib import Path
...@@ -57,6 +57,15 @@ class Book: ...@@ -57,6 +57,15 @@ class Book:
with BookContext(self.bookbook_filename, bookbook_template, with BookContext(self.bookbook_filename, bookbook_template,
self.output_path): self.output_path):
# Call bookbook # Call bookbook
try:
from bookbook.latex import combine_and_convert
except ModuleNotFoundError:
msg = """\
bookbook is not installed. Due to a change in nbconvert install this forked version:
pip install git+https://github.com/boileaum/bookbook.git@master
"""
log.error(msg)
exit(msg)
combine_and_convert(Path.cwd(), combine_and_convert(Path.cwd(),
Path(self.book_title), Path(self.book_title),
pdf=True, pdf=True,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment