From b5a304d5a03115562600d675ced61eb9b191e715 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sat, 15 Feb 2020 19:33:56 -0500 Subject: [PATCH 01/26] Added logic to update export links after renaming a notebook. Resolves #78. --- hide_code/hide_code.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/hide_code/hide_code.js b/hide_code/hide_code.js index a8ca502..a5b1ce7 100644 --- a/hide_code/hide_code.js +++ b/hide_code/hide_code.js @@ -155,7 +155,8 @@ function ($, celltoolbar, Jupyter){ } function exportLink(path){ - return window.location.origin + window.location.pathname + "/export/" + path; + // return window.location.origin + window.location.pathname + "/export/" + path; + return window.location.origin + '/notebooks/' + Jupyter.notebook.notebook_path + "/export/" + path; } var hideCodeCallback = ctb.utils.checkbox_ui_generator( 'Hide Code ', hideCodeSetter, hideCodeGetter); @@ -326,11 +327,19 @@ function ($, celltoolbar, Jupyter){ }); console.log('hide_code setup complete'); } - - // setup(); - + + $(document).on('DOMSubtreeModified', '.filename', function(){ + // var filename = $('.filename').text(); + + $('#hide_code_menu_list a').each(function(){ + var path = $(this).attr('href').split('/').pop(); + $(this).attr('href', exportLink(path)); + }); + }); + return { load_ipython_extension: load_ipython_extension } }); + From a1b921b822f655e45eb94efee5c168f11c827ab1 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 13:57:26 -0500 Subject: [PATCH 02/26] Ignoring all HTML and PDF files. --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index c393b10..d4ea907 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,5 @@ hide_code.sublime-workspace *.iml *.idea *ipynb +*.pdf +*.html \ No newline at end of file From 0492d2653c80b4c89a235c41256c87c236f61d0b Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 14:01:26 -0500 Subject: [PATCH 03/26] Updated Latex PDF exporting. Resolves #65. --- hide_code/__init__.py | 19 +++++++++-------- hide_code/hide_code.py | 27 ++++++++++++------------ hide_code/hide_code_latexpdf_exporter.py | 25 ++++++++++++++++++++++ hide_code/hide_code_pdf_exporter.py | 26 ++++++++++++++++++----- 4 files changed, 70 insertions(+), 27 deletions(-) create mode 100644 hide_code/hide_code_latexpdf_exporter.py diff --git a/hide_code/__init__.py b/hide_code/__init__.py index ab7df41..9ca25e7 100644 --- a/hide_code/__init__.py +++ b/hide_code/__init__.py @@ -1,9 +1,10 @@ -from .hide_code_html_exporter import HideCodeHTMLExporter -from .hide_code_pdf_exporter import HideCodePDFExporter -from .hide_code_preprocessor import HideCodePreprocessor -from .hide_code_latex_exporter import HideCodeLatexExporter -from .hide_code_slides_exporter import HideCodeSlidesExporter -from .hide_code import * -from .hide_code_config import HideCodeConfig -from .utils import Utils -from .hide_code import _jupyter_nbextension_paths, _jupyter_server_extension_paths \ No newline at end of file +from hide_code.hide_code_html_exporter import HideCodeHTMLExporter +from hide_code.hide_code_pdf_exporter import HideCodePDFExporter +from hide_code.hide_code_latexpdf_exporter import HideCodeLatexPDFExporter +from hide_code.hide_code_preprocessor import HideCodePreprocessor +from hide_code.hide_code_latex_exporter import HideCodeLatexExporter +from hide_code.hide_code_slides_exporter import HideCodeSlidesExporter +from hide_code.hide_code import * +from hide_code.hide_code_config import HideCodeConfig +from hide_code.utils import Utils +from hide_code.hide_code import _jupyter_nbextension_paths, _jupyter_server_extension_paths \ No newline at end of file diff --git a/hide_code/hide_code.py b/hide_code/hide_code.py index 1b46c4d..c6767f0 100644 --- a/hide_code/hide_code.py +++ b/hide_code/hide_code.py @@ -6,14 +6,15 @@ from notebook.base.handlers import IPythonHandler import nbformat from traitlets.config import Config -from .hide_code_html_exporter import HideCodeHTMLExporter -from .hide_code_pdf_exporter import HideCodePDFExporter -from .hide_code_latex_exporter import HideCodeLatexExporter -from .hide_code_slides_exporter import HideCodeSlidesExporter +from hide_code.hide_code_html_exporter import HideCodeHTMLExporter +from hide_code.hide_code_pdf_exporter import HideCodePDFExporter +from hide_code.hide_code_latexpdf_exporter import HideCodeLatexPDFExporter +from hide_code.hide_code_latex_exporter import HideCodeLatexExporter +from hide_code.hide_code_slides_exporter import HideCodeSlidesExporter import pdfkit from notebook.services.config import ConfigManager -from .hide_code_config import HideCodeConfig as hc_config -from .utils import Utils +from hide_code.hide_code_config import HideCodeConfig as hc_config +from hide_code.utils import Utils notebook_dir = [] @@ -40,13 +41,13 @@ def get(self, *args): self.log.info("hide_code: Starting PDF export for {}".format(args[-1])) with open(ipynb_file_name(args), encoding="utf-8") as f: nb = nbformat.reads(f.read(), as_version=4) - exporter = HideCodeHTMLExporter() + exporter = HideCodePDFExporter() output_html, resources = exporter.from_notebook_node(nb) - output = pdfkit.from_string(output_html, False) + # output = pdfkit.from_string(output_html, False) self.set_header('Content-Type', 'application/pdf') self.set_header('Content-Disposition', 'attachment; filename=' + notebook_name(args, 'pdf')) self.flush() - self.write(output) + self.write(output_html) self.log.info("hide_code: Finished PDF export for {}".format(args[-1])) self.finish() @@ -56,8 +57,8 @@ def get(self, *args): self.log.info("hide_code: Starting Latex PDF export for {}".format(args[-1])) with open(ipynb_file_name(args), encoding="utf-8") as f: nb = nbformat.reads(f.read(), as_version=4) - exporter = HideCodePDFExporter() - output, resources = exporter.from_notebook_node(nb, resources={"metadata": {"name": notebook_name(args)}}) + exporter = HideCodeLatexPDFExporter() + output, resources = exporter.from_notebook_node(nb, resources={"metadata": {"name": notebook_name(args, 'pdf')}}) self.set_header('Content-Disposition', 'attachment; filename=' + notebook_name(args, 'pdf')) self.flush() self.write(output) @@ -71,7 +72,7 @@ def get(self, *args): with open(ipynb_file_name(args), encoding="utf-8") as f: nb = nbformat.reads(f.read(), as_version=4) exporter = HideCodeLatexExporter() - output, resources = exporter.from_notebook_node(nb, resources={"metadata": {"name": notebook_name(args)}}) + output, resources = exporter.from_notebook_node(nb, resources={"metadata": {"name": notebook_name(args, 'tex')}}) self.set_header('Content-Disposition', 'attachment; filename=' + notebook_name(args, 'tex')) self.flush() self.write(output) @@ -85,7 +86,7 @@ def get(self, *args): with open(ipynb_file_name(args), encoding="utf-8") as f: nb = nbformat.reads(f.read(), as_version=4) exporter = HideCodeSlidesExporter() - output, resources = exporter.from_notebook_node(nb, resources={"metadata": {"name": notebook_name(args)}}) + output, resources = exporter.from_notebook_node(nb, resources={"metadata": {"name": notebook_name(args, 'html')}}) self.set_header('Content-Disposition', 'attachment; filename=' + notebook_name(args, 'html')) self.flush() self.write(output) diff --git a/hide_code/hide_code_latexpdf_exporter.py b/hide_code/hide_code_latexpdf_exporter.py new file mode 100644 index 0000000..5d39a69 --- /dev/null +++ b/hide_code/hide_code_latexpdf_exporter.py @@ -0,0 +1,25 @@ +import os +import os.path + +from traitlets.config import Config +from nbconvert.exporters.pdf import PDFExporter +from traitlets.log import get_logger + + +class HideCodeLatexPDFExporter(PDFExporter): + def __init__(self, config=None, **kw): + # self.register_preprocessor('hide_code.HideCodePreprocessor', True) + super(HideCodeLatexPDFExporter, self).__init__(config, **kw) + self.preprocessors = ['hide_code.HideCodePreprocessor'] + self._init_preprocessors() + + def _template_file_default(self): + return 'hide_code_article' + + @property + def template_path(self): + """ + We want to inherit from HTML template, and have template under + `./templates/` so append it to the search path. (see next section) + """ + return super(HideCodeLatexPDFExporter, self).template_path + [os.path.join(os.path.dirname(__file__), "Templates")] diff --git a/hide_code/hide_code_pdf_exporter.py b/hide_code/hide_code_pdf_exporter.py index cf16192..f92def7 100644 --- a/hide_code/hide_code_pdf_exporter.py +++ b/hide_code/hide_code_pdf_exporter.py @@ -1,20 +1,36 @@ import os import os.path +import pdfkit + + +# from hide_code.hide_code_html_exporter import HideCodeHTMLExporter + from traitlets.config import Config -from nbconvert.exporters.pdf import PDFExporter +from traitlets import default +# from nbconvert.exporters.pdf import PDFExporter +from nbconvert.exporters.html import HTMLExporter from traitlets.log import get_logger -class HideCodePDFExporter(PDFExporter): +class HideCodePDFExporter(HTMLExporter): def __init__(self, config=None, **kw): # self.register_preprocessor('hide_code.HideCodePreprocessor', True) super(HideCodePDFExporter, self).__init__(config, **kw) - self.preprocessors = ['hide_code.HideCodePreprocessor'] - self._init_preprocessors() + # self.preprocessors = ['hide_code.HideCodePreprocessor'] + # self._init_preprocessors() + + @default('file_extension') + def _file_extension_default(self): + return '.pdf' + + def from_notebook_node(self, nb, resources=None, **kw): + output, resources = super(HideCodePDFExporter, self).from_notebook_node(nb, resources, **kw) + output = pdfkit.from_string(output, False) + return output, resources def _template_file_default(self): - return 'hide_code_article' + return 'hide_code_full.tpl' @property def template_path(self): From 0148c3e641356e4b59b8ad9df681625ead9ea1cc Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 14:02:01 -0500 Subject: [PATCH 04/26] Added automatic nbextnesion and serverextension install. --- setup.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index c94a118..161b441 100644 --- a/setup.py +++ b/setup.py @@ -1,23 +1,38 @@ # Always prefer setuptools over distutils from setuptools import setup, find_packages -# from setuptools.command.install import install as _install +from setuptools.command.install import install # To use a consistent encoding from codecs import open from os import path import sys import os +import notebook +import notebook.serverextensions as ns # Get the long description from the relevant file with open('README.rst', encoding='utf-8') as f: long_description = f.read() +class PostInstallCommand(install): + """Post-installation for installation mode.""" + def run(self): + install.run(self) + # PUT YOUR POST-INSTALL SCRIPT HERE or CALL A FUNCTION + print('Starting hide_code installation') + # install extension + notebook.nbextensions.install_nbextension_python('hide_code', sys_prefix=True) + # enable notebook extension + notebook.nbextensions.enable_nbextension_python('hide_code', sys_prefix=True) + # enable server extension + ns.toggle_serverextension_python('hide_code', enabled=True, sys_prefix=True) + setup( name='hide_code', # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html - version='0.5.3', + version='0.5.4', description='A Jupyter notebook extension to hide code, prompts and outputs.', long_description=long_description, @@ -96,7 +111,7 @@ 'nbconvert.exporters': [ 'hide_code_html = hide_code:HideCodeHTMLExporter', 'hide_code_pdf = hide_code:HideCodePDFExporter', - # 'hide_code_latexpdf = hide_code:HideCodeLatexPDFExporter', + 'hide_code_latexpdf = hide_code:HideCodeLatexPDFExporter', 'hide_code_latex = hide_code:HideCodeLatexExporter', 'hide_code_slides = hide_code:HideCodeSlidesExporter' ], From ebddc4e63da361436204dd003d126a5bde96d865 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 14:05:52 -0500 Subject: [PATCH 05/26] Version bump. --- .gitignore | 4 +++- setup.py | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d4ea907..dd58575 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,6 @@ hide_code.sublime-workspace *.idea *ipynb *.pdf -*.html \ No newline at end of file +*.html +.vscode +.ipynb_checkpoints \ No newline at end of file diff --git a/setup.py b/setup.py index 161b441..e54da1f 100644 --- a/setup.py +++ b/setup.py @@ -32,7 +32,7 @@ def run(self): # Versions should comply with PEP440. For a discussion on single-sourcing # the version across setup.py and the project code, see # https://packaging.python.org/en/latest/single_source_version.html - version='0.5.4', + version='0.5.5', description='A Jupyter notebook extension to hide code, prompts and outputs.', long_description=long_description, From 767c67c0069ebfee5b120439ac60c3d6aac92ebb Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 14:07:05 -0500 Subject: [PATCH 06/26] Added python 3.7 and 3.8 build environments. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 9800f58..4c9b02a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,8 @@ python: - "3.4" - "3.5" - "3.6" + - "3.7" + - "3.8" # does not have headers provided, please ask https://launchpad.net/~pypy/+archive/ppa # maintainers to fix their pypy-dev package. - "pypy" From eda4a7e0f90597c8f9a84f1481ee282e85ef0fb2 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 14:16:36 -0500 Subject: [PATCH 07/26] Removed extension installation steps from post install. --- .travis.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4c9b02a..7bc4e58 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ install: - pip install pdfkit - pip install -e . # command to run tests -script: - - jupyter nbextension install --py hide_code --sys-prefix - - jupyter nbextension enable --py hide_code --sys-prefix - - jupyter serverextension enable --py hide_code --sys-prefix +# script: +# - jupyter nbextension install --py hide_code --sys-prefix +# - jupyter nbextension enable --py hide_code --sys-prefix +# - jupyter serverextension enable --py hide_code --sys-prefix From 43f38e9efd04f6bccb1bc5c03daf24509f6f83d4 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 15:03:25 -0500 Subject: [PATCH 08/26] Added nbconvert tests. --- .travis.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7bc4e58..c5352b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,9 +19,14 @@ install: - pip install six - pip install jupyter - pip install pdfkit - - pip install -e . + - pip install . # command to run tests -# script: +script: + - jupyter nbconvert hide_code/test/utf-8\ test.ipynb --to hide_code_html + - jupyter nbconvert hide_code/test/utf-8\ test.ipynb --to hide_code_pdf + - jupyter nbconvert hide_code/test/utf-8\ test.ipynb --to hide_code_latexpdf + - jupyter nbconvert hide_code/test/utf-8\ test.ipynb --to hide_code_latex + - jupyter nbconvert hide_code/test/utf-8\ test.ipynb --to hide_code_slides # - jupyter nbextension install --py hide_code --sys-prefix # - jupyter nbextension enable --py hide_code --sys-prefix # - jupyter serverextension enable --py hide_code --sys-prefix From 820b82c86ef84907b714b58dbb7830bd1bcedb2f Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 15:14:51 -0500 Subject: [PATCH 09/26] Adding test notebook. --- hide_code/test/utf-8 test.ipynb | 144 ++++++++++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 hide_code/test/utf-8 test.ipynb diff --git a/hide_code/test/utf-8 test.ipynb b/hide_code/test/utf-8 test.ipynb new file mode 100644 index 0000000..1a13f06 --- /dev/null +++ b/hide_code/test/utf-8 test.ipynb @@ -0,0 +1,144 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "opción" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "hidePrompt": true + }, + "outputs": [], + "source": [ + "a = 'opción'" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "hideCode": true + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "opción\n" + ] + } + ], + "source": [ + "print(a)" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "params = ('utf-8 test.ipynb', None, None)" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": {}, + "outputs": [], + "source": [ + "args = [param.replace('/', '') for param in params if param is not None]" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "['utf-8 test.ipynb']" + ] + }, + "execution_count": 3, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "args" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": {}, + "outputs": [], + "source": [ + "test = 'hello'" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "metadata": {}, + "outputs": [ + { + "data": { + "text/plain": [ + "'utf-8 test'" + ] + }, + "execution_count": 4, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "args[-1][:-6]" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "{{ hello }}" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "celltoolbar": "Hide code", + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} From 88a6596631f378fc9c2582a56d04ca60d8ff5899 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 15:35:26 -0500 Subject: [PATCH 10/26] Fixing test notebook path. --- .travis.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index c5352b4..769f031 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: python python: - - "2.7" # Building 3.3 fails; # ImportError: Tornado requires an up-to-date SSL module. This means Python 2.7.9+ or 3.4+ (although some distributions # have backported the necessary changes to older versions). @@ -22,11 +21,11 @@ install: - pip install . # command to run tests script: - - jupyter nbconvert hide_code/test/utf-8\ test.ipynb --to hide_code_html - - jupyter nbconvert hide_code/test/utf-8\ test.ipynb --to hide_code_pdf - - jupyter nbconvert hide_code/test/utf-8\ test.ipynb --to hide_code_latexpdf - - jupyter nbconvert hide_code/test/utf-8\ test.ipynb --to hide_code_latex - - jupyter nbconvert hide_code/test/utf-8\ test.ipynb --to hide_code_slides + - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/test/utf-8\ test.ipynb" --to hide_code_html + - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/test/utf-8\ test.ipynb" --to hide_code_pdf + - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/test/utf-8\ test.ipynb" --to hide_code_latexpdf + - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/test/utf-8\ test.ipynb" --to hide_code_latex + - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/test/utf-8\ test.ipynb" --to hide_code_slides # - jupyter nbextension install --py hide_code --sys-prefix # - jupyter nbextension enable --py hide_code --sys-prefix # - jupyter serverextension enable --py hide_code --sys-prefix From b7891f7387136bb2b0b3f663797e473c50f88d5f Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 15:43:48 -0500 Subject: [PATCH 11/26] Fixing notebook path again. --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 769f031..f274895 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,11 +21,11 @@ install: - pip install . # command to run tests script: - - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/test/utf-8\ test.ipynb" --to hide_code_html - - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/test/utf-8\ test.ipynb" --to hide_code_pdf - - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/test/utf-8\ test.ipynb" --to hide_code_latexpdf - - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/test/utf-8\ test.ipynb" --to hide_code_latex - - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/test/utf-8\ test.ipynb" --to hide_code_slides + - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_html + - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_pdf + - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_latexpdf + - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_latex + - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_slides # - jupyter nbextension install --py hide_code --sys-prefix # - jupyter nbextension enable --py hide_code --sys-prefix # - jupyter serverextension enable --py hide_code --sys-prefix From 24a3541b9c22a843867a8de5977281a13ba45974 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 15:56:11 -0500 Subject: [PATCH 12/26] More travis path testing. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f274895..960e9fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ install: - pip install . # command to run tests script: - - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_html + - jupyter nbconvert "/home/travis/virtualenv/python3.4.8/lib/python3.4/site-packages/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_html - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_pdf - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_latexpdf - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_latex From da23851d9c48f33f3377c6b47eaed14374f7dbf4 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 16:08:09 -0500 Subject: [PATCH 13/26] Travis again. --- .travis.yml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 960e9fc..b57fcc3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ install: - pip install . # command to run tests script: - - jupyter nbconvert "/home/travis/virtualenv/python3.4.8/lib/python3.4/site-packages/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_html + - jupyter nbconvert "/home/travis/virtualenv/python3.4.8/lib/python3.4/site-packages/hide_code/test/utf-8 test.ipynb" --to hide_code_html - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_pdf - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_latexpdf - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_latex diff --git a/setup.py b/setup.py index e54da1f..e050244 100644 --- a/setup.py +++ b/setup.py @@ -91,7 +91,7 @@ def run(self): # installed, specify them here. If using Python 2.6 or less, then these # have to be included in MANIFEST.in as well. package_data={ - 'hide_code': ['*.js','*.txt', os.path.join('Templates', '*'), 'hide_code_config.json', 'LICENSE'], + 'hide_code': ['*.js','*.txt', os.path.join('Templates', '*'), 'hide_code_config.json', 'LICENSE', os.path.join('test', '*')], }, # Although 'package_data' is the preferred approach, in some case you may From fb89a1a006b52d8cfc5c1880dc8f50e2e5d9934d Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 17:07:27 -0500 Subject: [PATCH 14/26] Travis changes again. --- .travis.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index b57fcc3..70076af 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,11 +21,7 @@ install: - pip install . # command to run tests script: - - jupyter nbconvert "/home/travis/virtualenv/python3.4.8/lib/python3.4/site-packages/hide_code/test/utf-8 test.ipynb" --to hide_code_html - - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_pdf - - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_latexpdf - - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_latex - - jupyter nbconvert "$(python -c 'import site; print(site.getsitepackages()[0])')/hide_code/hide_code/test/utf-8 test.ipynb" --to hide_code_slides + - jupyter nbconvert "$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/hide_code/test/utf-8 test.ipynb" --to hide_code_slides # - jupyter nbextension install --py hide_code --sys-prefix # - jupyter nbextension enable --py hide_code --sys-prefix # - jupyter serverextension enable --py hide_code --sys-prefix From 16d37b89dacb29701e8d85f0786d4cae11b204b8 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 17:19:50 -0500 Subject: [PATCH 15/26] Removed pypy environment and added tests for all hide_code nbconvert exporters. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 70076af..ea3d581 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ python: - "3.8" # does not have headers provided, please ask https://launchpad.net/~pypy/+archive/ppa # maintainers to fix their pypy-dev package. - - "pypy" + # - "pypy" # command to install dependencies install: # force six to install first as it's a dependicy of simplegeneric and simplegeneric is erroring. From 4c394c9d783f46f1a440210dfc5169530ff16295 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 17:23:59 -0500 Subject: [PATCH 16/26] Added additional tests. --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index ea3d581..5ef37a7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,10 @@ install: # command to run tests script: - jupyter nbconvert "$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/hide_code/test/utf-8 test.ipynb" --to hide_code_slides + - jupyter nbconvert "$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/hide_code/test/utf-8 test.ipynb" --to hide_code_pdf + - jupyter nbconvert "$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/hide_code/test/utf-8 test.ipynb" --to hide_code_html + - jupyter nbconvert "$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/hide_code/test/utf-8 test.ipynb" --to hide_code_latex + - jupyter nbconvert "$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/hide_code/test/utf-8 test.ipynb" --to hide_code_latexpdf # - jupyter nbextension install --py hide_code --sys-prefix # - jupyter nbextension enable --py hide_code --sys-prefix # - jupyter serverextension enable --py hide_code --sys-prefix From 00b1c563c666dbf0ce1aa92fa2ef3ea508c8f5e4 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 20:56:10 -0500 Subject: [PATCH 17/26] Testing binder config. --- demo.ipynb | 181 +++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 1 + 2 files changed, 182 insertions(+) create mode 100644 demo.ipynb create mode 100644 requirements.txt diff --git a/demo.ipynb b/demo.ipynb new file mode 100644 index 0000000..1ee5cc1 --- /dev/null +++ b/demo.ipynb @@ -0,0 +1,181 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "source": [ + "## Hide_code: Jupyter code, input and output hiding\n", + "\n", + "To get started, select \"View\" -> \"Cell Toolbar\" -> \"Hide code\"" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Goodbye prompts\n" + ] + } + ], + "source": [ + "print('Goodbye code')" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Goodbye prompts\n" + ] + } + ], + "source": [ + "print('Goodbye prompts')" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "hideCode": false, + "hideOutput": true, + "hidePrompt": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Goodbye output\n" + ] + } + ], + "source": [ + "print('Goodbye output')" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "source": [ + "Change cell toolbar to \"None\" to pretty up the notebook." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "source": [ + "Tryout the [keyboard shortcuts](https://github.com/kirbs-/hide_code/wiki/Keyboard-Shortcuts).\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Try hiding code by kitting the W key in command mode (blue bar highlight on this cell).\n" + ] + } + ], + "source": [ + "print(\"Try hiding code by kitting the W key in command mode (blue bar highlight on this cell).\")" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Unhide code with SHIFT + W.\n" + ] + } + ], + "source": [ + "print(\"Unhide code with SHIFT + W.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "source": [ + "Try selecting the above two cells (SHIFT + click) and hiding/unhiding their code with the \"W\"/SHIFT + \"W\" keys.\n", + "\n", + "Want to hide everything or need to start over? Click on the '' icon above. This toggles hidind all code and inputs at once. \n", + "\n", + "When the notebook is formatted to your liking, click on the \"Hide Code\" menu bar to export into your desired format." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "celltoolbar": "Hide code", + "hide_code_all_hidden": false, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..d010560 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +hide_code==9.5.5 \ No newline at end of file From 2508c28a065d99143e463837f7885c74e754dc1b Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Sun, 16 Feb 2020 20:58:04 -0500 Subject: [PATCH 18/26] Testing binder config. --- demo.ipynb | 181 +++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 1 + 2 files changed, 182 insertions(+) create mode 100644 demo.ipynb create mode 100644 requirements.txt diff --git a/demo.ipynb b/demo.ipynb new file mode 100644 index 0000000..1ee5cc1 --- /dev/null +++ b/demo.ipynb @@ -0,0 +1,181 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "source": [ + "## Hide_code: Jupyter code, input and output hiding\n", + "\n", + "To get started, select \"View\" -> \"Cell Toolbar\" -> \"Hide code\"" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Goodbye prompts\n" + ] + } + ], + "source": [ + "print('Goodbye code')" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Goodbye prompts\n" + ] + } + ], + "source": [ + "print('Goodbye prompts')" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "metadata": { + "hideCode": false, + "hideOutput": true, + "hidePrompt": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Goodbye output\n" + ] + } + ], + "source": [ + "print('Goodbye output')" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "source": [ + "Change cell toolbar to \"None\" to pretty up the notebook." + ] + }, + { + "cell_type": "markdown", + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "source": [ + "Tryout the [keyboard shortcuts](https://github.com/kirbs-/hide_code/wiki/Keyboard-Shortcuts).\n" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Try hiding code by kitting the W key in command mode (blue bar highlight on this cell).\n" + ] + } + ], + "source": [ + "print(\"Try hiding code by kitting the W key in command mode (blue bar highlight on this cell).\")" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Unhide code with SHIFT + W.\n" + ] + } + ], + "source": [ + "print(\"Unhide code with SHIFT + W.\")" + ] + }, + { + "cell_type": "markdown", + "metadata": { + "hideCode": false, + "hidePrompt": false + }, + "source": [ + "Try selecting the above two cells (SHIFT + click) and hiding/unhiding their code with the \"W\"/SHIFT + \"W\" keys.\n", + "\n", + "Want to hide everything or need to start over? Click on the '' icon above. This toggles hidind all code and inputs at once. \n", + "\n", + "When the notebook is formatted to your liking, click on the \"Hide Code\" menu bar to export into your desired format." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "celltoolbar": "Hide code", + "hide_code_all_hidden": false, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.7.6" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..ed88f04 --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +hide_code==0.5.5 \ No newline at end of file From 76508a7b4bc53972c6fa4cfc0fda3537fe81c2e0 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Mon, 17 Feb 2020 08:06:35 -0500 Subject: [PATCH 19/26] Adding latex and wkhtmltopdf dependencies. --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 5ef37a7..249d88c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,8 @@ install: - pip install jupyter - pip install pdfkit - pip install . + - apt install texlive-xetex xvfb libfontconfig wkhtmltopdf + # command to run tests script: - jupyter nbconvert "$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/hide_code/test/utf-8 test.ipynb" --to hide_code_slides From aa857bafc09530b0b1c318c5bfbcd13f0988e049 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Mon, 17 Feb 2020 08:55:57 -0500 Subject: [PATCH 20/26] Added sudo. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 249d88c..609a106 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,7 @@ install: - pip install jupyter - pip install pdfkit - pip install . - - apt install texlive-xetex xvfb libfontconfig wkhtmltopdf + - sudo apt install texlive-xetex xvfb libfontconfig wkhtmltopdf # command to run tests script: From ad2f4a9ef8a58d3fd4784cee655caa034553114e Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Mon, 17 Feb 2020 09:00:18 -0500 Subject: [PATCH 21/26] More fixes. --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 609a106..13cfbe8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,7 +19,8 @@ install: - pip install jupyter - pip install pdfkit - pip install . - - sudo apt install texlive-xetex xvfb libfontconfig wkhtmltopdf + - sudo apt-get update + - sudo apt-get install texlive-xetex xvfb libfontconfig wkhtmltopdf # command to run tests script: From dc5282fd67ac389d486bfc6dd8c1ba4c99df8826 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Mon, 17 Feb 2020 09:17:59 -0500 Subject: [PATCH 22/26] Disabling wkhtmltopdf pdf test and adding pandoc dependency. --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 13cfbe8..1d453b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,12 +20,13 @@ install: - pip install pdfkit - pip install . - sudo apt-get update - - sudo apt-get install texlive-xetex xvfb libfontconfig wkhtmltopdf + - sudo apt-get install texlive-xetex xvfb libfontconfig wkhtmltopdf pandoc # command to run tests script: - jupyter nbconvert "$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/hide_code/test/utf-8 test.ipynb" --to hide_code_slides - - jupyter nbconvert "$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/hide_code/test/utf-8 test.ipynb" --to hide_code_pdf + # wkhtmltopdf has a bug in Ubuntu 16.04 apt package https://unix.stackexchange.com/questions/192642/wkhtmltopdf-qxcbconnection-could-not-connect-to-display + # - jupyter nbconvert "$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/hide_code/test/utf-8 test.ipynb" --to hide_code_pdf - jupyter nbconvert "$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/hide_code/test/utf-8 test.ipynb" --to hide_code_html - jupyter nbconvert "$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/hide_code/test/utf-8 test.ipynb" --to hide_code_latex - jupyter nbconvert "$(python -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())')/hide_code/test/utf-8 test.ipynb" --to hide_code_latexpdf From 7460d6398561a7a2c08e4c7a8bf3271cf2bbcc6c Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Mon, 17 Feb 2020 09:33:46 -0500 Subject: [PATCH 23/26] Adding recommended tex packages. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1d453b0..dda4570 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ install: - pip install pdfkit - pip install . - sudo apt-get update - - sudo apt-get install texlive-xetex xvfb libfontconfig wkhtmltopdf pandoc + - sudo apt-get install texlive-xetex xvfb libfontconfig wkhtmltopdf pandoc texlive-fonts-recommended texlive-generic-recommended # command to run tests script: From 019186a3c3c5eedc2a87dc5fc2af82b1a04e9d5a Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Mon, 17 Feb 2020 09:40:35 -0500 Subject: [PATCH 24/26] Added texlive-latex-extra. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index dda4570..35693bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ install: - pip install pdfkit - pip install . - sudo apt-get update - - sudo apt-get install texlive-xetex xvfb libfontconfig wkhtmltopdf pandoc texlive-fonts-recommended texlive-generic-recommended + - sudo apt-get install texlive-xetex xvfb libfontconfig wkhtmltopdf pandoc texlive-fonts-recommended texlive-generic-recommended texlive-latex-extra # command to run tests script: From 91e9acd1c752805adfc95afcc94900daa2b66100 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Mon, 17 Feb 2020 09:42:01 -0500 Subject: [PATCH 25/26] Added texlive-generic-extra. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 35693bc..29f5c4a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ install: - pip install pdfkit - pip install . - sudo apt-get update - - sudo apt-get install texlive-xetex xvfb libfontconfig wkhtmltopdf pandoc texlive-fonts-recommended texlive-generic-recommended texlive-latex-extra + - sudo apt-get install texlive-xetex xvfb libfontconfig wkhtmltopdf pandoc texlive-fonts-recommended texlive-generic-recommended texlive-latex-extra texlive-generic-extra # command to run tests script: From 434569c0b48040c6ebb4a65efbc655c9b0fbf9d4 Mon Sep 17 00:00:00 2001 From: Chris Kirby Date: Mon, 17 Feb 2020 09:49:12 -0500 Subject: [PATCH 26/26] Adding lmodern. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 29f5c4a..01ef9f8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,7 @@ install: - pip install pdfkit - pip install . - sudo apt-get update - - sudo apt-get install texlive-xetex xvfb libfontconfig wkhtmltopdf pandoc texlive-fonts-recommended texlive-generic-recommended texlive-latex-extra texlive-generic-extra + - sudo apt-get install texlive-xetex xvfb libfontconfig wkhtmltopdf pandoc texlive-fonts-recommended texlive-generic-recommended texlive-latex-extra texlive-generic-extra lmodern # command to run tests script: