Show More
@@ -12,31 +12,11 b' called nb_figure_NN.png.' | |||||
12 | #----------------------------------------------------------------------------- |
|
12 | #----------------------------------------------------------------------------- | |
13 | from __future__ import print_function |
|
13 | from __future__ import print_function | |
14 |
|
14 | |||
15 | # Stdlib |
|
|||
16 | import codecs |
|
|||
17 | import io |
|
|||
18 | import logging |
|
|||
19 | import os |
|
|||
20 | import pprint |
|
|||
21 | import re |
|
|||
22 | import subprocess |
|
|||
23 | import sys |
|
|||
24 | import json |
|
|||
25 | import copy |
|
|||
26 | from types import FunctionType |
|
|||
27 | from shutil import rmtree |
|
|||
28 | from markdown import markdown |
|
|||
29 |
|
15 | |||
30 | # From IPython |
|
16 | # From IPython | |
31 | from IPython.external import argparse |
|
17 | from IPython.external import argparse | |
32 | from IPython.nbformat import current as nbformat |
|
|||
33 | from IPython.utils.text import indent |
|
|||
34 | from IPython.nbformat.v3.nbjson import BytesEncoder |
|
|||
35 | from IPython.utils import path, py3compat |
|
|||
36 |
|
18 | |||
37 | # local |
|
19 | # local | |
38 | from lexers import IPythonLexer |
|
|||
39 |
|
||||
40 | from converters.html import ConverterHTML |
|
20 | from converters.html import ConverterHTML | |
41 | from converters.markdown import ConverterMarkdown |
|
21 | from converters.markdown import ConverterMarkdown | |
42 | from converters.bloggerhtml import ConverterBloggerHTML |
|
22 | from converters.bloggerhtml import ConverterBloggerHTML | |
@@ -60,13 +40,13 b" def main(infile, format='rst'):" | |||||
60 | converter.render() |
|
40 | converter.render() | |
61 | elif format == 'html': |
|
41 | elif format == 'html': | |
62 | converter = ConverterHTML(infile) |
|
42 | converter = ConverterHTML(infile) | |
63 |
|
|
43 | converter.render() | |
64 | elif format == 'blogger-html': |
|
44 | elif format == 'blogger-html': | |
65 | converter = ConverterBloggerHTML(infile) |
|
45 | converter = ConverterBloggerHTML(infile) | |
66 |
|
|
46 | converter.render() | |
67 | elif format == 'latex': |
|
47 | elif format == 'latex': | |
68 | converter = ConverterLaTeX(infile) |
|
48 | converter = ConverterLaTeX(infile) | |
69 |
|
|
49 | converter.render() | |
70 | elif format == 'py': |
|
50 | elif format == 'py': | |
71 | converter = ConverterPy(infile) |
|
51 | converter = ConverterPy(infile) | |
72 | converter.render() |
|
52 | converter.render() |
General Comments 0
You need to be logged in to leave comments.
Login now