Show More
@@ -29,7 +29,8 b' from types import FunctionType' | |||||
29 | # IPython imports |
|
29 | # IPython imports | |
30 | from IPython.nbformat import current as nbformat |
|
30 | from IPython.nbformat import current as nbformat | |
31 | from IPython.config.configurable import Configurable, SingletonConfigurable |
|
31 | from IPython.config.configurable import Configurable, SingletonConfigurable | |
32 | from IPython.utils.traitlets import List, Unicode, Type, Bool, Dict, CaselessStrEnum |
|
32 | from IPython.utils.traitlets import (List, Unicode, Type, Bool, Dict, CaselessStrEnum, | |
|
33 | Any) | |||
33 |
|
34 | |||
34 | # Our own imports |
|
35 | # Our own imports | |
35 | from .utils import remove_fake_files_url |
|
36 | from .utils import remove_fake_files_url | |
@@ -112,7 +113,7 b' class Converter(Configurable):' | |||||
112 | # Instance-level attributes that are set in the constructor for this |
|
113 | # Instance-level attributes that are set in the constructor for this | |
113 | # class. |
|
114 | # class. | |
114 | #------------------------------------------------------------------------- |
|
115 | #------------------------------------------------------------------------- | |
115 |
infile = |
|
116 | infile = Any() | |
116 |
|
117 | |||
117 | highlight_source = Bool(True, |
|
118 | highlight_source = Bool(True, | |
118 | config=True, |
|
119 | config=True, | |
@@ -121,6 +122,7 b' class Converter(Configurable):' | |||||
121 | preamble = Unicode("" , |
|
122 | preamble = Unicode( "" , | |
122 | config=True, |
|
123 | config=True, | |
123 | help="Path to a user-specified preamble file") |
|
124 | help="Path to a user-specified preamble file") | |
|
125 | ||||
124 | extract_figures = Bool( True, |
|
126 | extract_figures = Bool( True, | |
125 | config=True, |
|
127 | config=True, | |
126 | help="""extract base-64 encoded figures of the notebook into separate files, |
|
128 | help="""extract base-64 encoded figures of the notebook into separate files, | |
@@ -154,6 +156,7 b' class Converter(Configurable):' | |||||
154 | # keep in this way for readability's sake. |
|
156 | # keep in this way for readability's sake. | |
155 | self.exclude_cells = exclude |
|
157 | self.exclude_cells = exclude | |
156 | self.infile = infile |
|
158 | self.infile = infile | |
|
159 | if infile: | |||
157 | self.infile_dir, infile_root = os.path.split(infile) |
|
160 | self.infile_dir, infile_root = os.path.split(infile) | |
158 | self.infile_root = os.path.splitext(infile_root)[0] |
|
161 | self.infile_root = os.path.splitext(infile_root)[0] | |
159 | self.clean_name = clean_filename(self.infile_root) |
|
162 | self.clean_name = clean_filename(self.infile_root) |
General Comments 0
You need to be logged in to leave comments.
Login now