Show More
@@ -34,7 +34,7 b' class SphinxTransformer(ActivatableTransformer):' | |||||
34 | interactive = Bool(True, config=True, help=""" |
|
34 | interactive = Bool(True, config=True, help=""" | |
35 | Allows you to define whether or not the Sphinx exporter will prompt |
|
35 | Allows you to define whether or not the Sphinx exporter will prompt | |
36 | you for input during the conversion process. If this is set to false, |
|
36 | you for input during the conversion process. If this is set to false, | |
37 | the author, version, release, date, and chapterstyle traits should |
|
37 | the author, version, release, date, and chapter_style traits should | |
38 | be set. |
|
38 | be set. | |
39 | """) |
|
39 | """) | |
40 |
|
40 | |||
@@ -50,13 +50,13 b' class SphinxTransformer(ActivatableTransformer):' | |||||
50 | Example: "Rough Draft" |
|
50 | Example: "Rough Draft" | |
51 | """) |
|
51 | """) | |
52 |
|
52 | |||
53 | publishdate = Unicode("", config=True, help="""Publish date |
|
53 | publish_date = Unicode("", config=True, help="""Publish date | |
54 | This is the date to render on the document as the publish date. |
|
54 | This is the date to render on the document as the publish date. | |
55 | Leave this blank to default to todays date. |
|
55 | Leave this blank to default to todays date. | |
56 | Example: "June 12, 1990" |
|
56 | Example: "June 12, 1990" | |
57 | """) |
|
57 | """) | |
58 |
|
58 | |||
59 | chapterstyle = Unicode("Bjarne", config=True, help="""Sphinx chapter style |
|
59 | chapter_style = Unicode("Bjarne", config=True, help="""Sphinx chapter style | |
60 | This is the style to use for the chapter headers in the document. |
|
60 | This is the style to use for the chapter headers in the document. | |
61 | You may choose one of the following: |
|
61 | You may choose one of the following: | |
62 | "Bjarne" (default) |
|
62 | "Bjarne" (default) | |
@@ -67,7 +67,6 b' class SphinxTransformer(ActivatableTransformer):' | |||||
67 | "Sonny" (used for international documents) |
|
67 | "Sonny" (used for international documents) | |
68 | """) |
|
68 | """) | |
69 |
|
69 | |||
70 |
|
||||
71 | def __call__(self, nb, other): |
|
70 | def __call__(self, nb, other): | |
72 | """ |
|
71 | """ | |
73 | Entry |
|
72 | Entry | |
@@ -108,12 +107,12 b' class SphinxTransformer(ActivatableTransformer):' | |||||
108 | nb.metadata._draft["version"] = self.version |
|
107 | nb.metadata._draft["version"] = self.version | |
109 | nb.metadata._draft["release"] = self.release |
|
108 | nb.metadata._draft["release"] = self.release | |
110 |
|
109 | |||
111 | if len(self.publishdate.strip()) == 0: |
|
110 | if len(self.publish_date.strip()) == 0: | |
112 | nb.metadata._draft["date"] = date.today().strftime("%B %-d, %Y") |
|
111 | nb.metadata._draft["date"] = date.today().strftime("%B %-d, %Y") | |
113 | else: |
|
112 | else: | |
114 | nb.metadata._draft["date"] = self.publishdate |
|
113 | nb.metadata._draft["date"] = self.publish_date | |
115 |
|
114 | |||
116 | other["sphinx_chapterstyle"] = self.chapterstyle |
|
115 | other["sphinx_chapterstyle"] = self.chapter_style | |
117 |
|
116 | |||
118 | # Find and pass in the path to the Sphinx dependencies. |
|
117 | # Find and pass in the path to the Sphinx dependencies. | |
119 | other["sphinx_texinputs"] = os.path.abspath(sphinx.__file__ + "/../texinputs") |
|
118 | other["sphinx_texinputs"] = os.path.abspath(sphinx.__file__ + "/../texinputs") |
General Comments 0
You need to be logged in to leave comments.
Login now