@@ -3151,7 +3151,7 @@ def add_meta_tag(self, http_equiv=None, content=None):
31513151
31523152 ############
31533153
3154- def create_presentation (self , name = None , theme = "default" , show_notes = True ):
3154+ def create_presentation (self , name = None , theme = "default" ):
31553155 """ Creates a Reveal-JS presentation that you can add slides to.
31563156 @Params
31573157 name - If creating multiple presentations at the same time,
@@ -3160,8 +3160,6 @@ def create_presentation(self, name=None, theme="default", show_notes=True):
31603160 Valid themes: "serif" (default), "sky", "white", "black",
31613161 "simple", "league", "moon", "night",
31623162 "beige", "blood", and "solarized".
3163- show_notes - When set to True, the Notes feature becomes enabled,
3164- which allows presenters to see notes next to slides.
31653163 """
31663164 if not name :
31673165 name = "default"
@@ -3242,7 +3240,7 @@ def add_slide(self, content=None, image=None, code=None, iframe=None,
32423240 name = "default"
32433241 if name not in self ._presentation_slides :
32443242 # Create a presentation if it doesn't already exist
3245- self .create_presentation (name = name , show_notes = True )
3243+ self .create_presentation (name = name )
32463244 if not content :
32473245 content = ""
32483246 if not content2 :
@@ -3273,13 +3271,16 @@ def add_slide(self, content=None, image=None, code=None, iframe=None,
32733271
32743272 self ._presentation_slides [name ].append (html )
32753273
3276- def save_presentation (self , name = None , filename = None , interval = 0 ):
3274+ def save_presentation (
3275+ self , name = None , filename = None , show_notes = True , interval = 0 ):
32773276 """ Saves a Reveal-JS Presentation to a file for later use.
32783277 @Params
32793278 name - If creating multiple presentations at the same time,
32803279 use this to select the one you wish to add slides to.
32813280 filename - The name of the HTML file that you wish to
32823281 save the presentation to. (filename must end in ".html")
3282+ show_notes - When set to True, the Notes feature becomes enabled,
3283+ which allows presenters to see notes next to slides.
32833284 interval - The delay time between autoplaying slides. (in seconds)
32843285 If set to 0 (default), autoplay is disabled.
32853286 """
@@ -3300,6 +3301,10 @@ def save_presentation(self, name=None, filename=None, interval=0):
33003301 raise Exception ('The "interval" cannot be a negative number!' )
33013302 interval_ms = float (interval ) * 1000.0
33023303
3304+ show_notes_str = "false"
3305+ if show_notes :
3306+ show_notes_str = "true"
3307+
33033308 the_html = ""
33043309 for slide in self ._presentation_slides [name ]:
33053310 the_html += slide
@@ -3310,13 +3315,14 @@ def save_presentation(self, name=None, filename=None, interval=0):
33103315 '<script src="%s"></script>\n '
33113316 '<script src="%s"></script>\n '
33123317 '<script>Reveal.initialize('
3313- '{showNotes: true , slideNumber: true, '
3318+ '{showNotes: %s , slideNumber: true, '
33143319 'autoSlide: %s,});'
33153320 '</script>\n '
33163321 '</body>\n '
33173322 '</html>\n '
33183323 '' % (constants .Reveal .MIN_JS ,
33193324 constants .PrettifyJS .RUN_PRETTIFY_JS ,
3325+ show_notes_str ,
33203326 interval_ms ))
33213327
33223328 saved_presentations_folder = constants .Presentations .SAVED_FOLDER
@@ -3334,13 +3340,16 @@ def save_presentation(self, name=None, filename=None, interval=0):
33343340 print ('\n >>> [%s] was saved!\n ' % file_path )
33353341 return file_path
33363342
3337- def begin_presentation (self , name = None , filename = None , interval = 0 ):
3343+ def begin_presentation (
3344+ self , name = None , filename = None , show_notes = True , interval = 0 ):
33383345 """ Begin a Reveal-JS Presentation in the web browser.
33393346 @Params
33403347 name - If creating multiple presentations at the same time,
33413348 use this to select the one you wish to add slides to.
33423349 filename - The name of the HTML file that you wish to
33433350 save the presentation to. (filename must end in ".html")
3351+ show_notes - When set to True, the Notes feature becomes enabled,
3352+ which allows presenters to see notes next to slides.
33443353 interval - The delay time between autoplaying slides. (in seconds)
33453354 If set to 0 (default), autoplay is disabled.
33463355 """
@@ -3366,7 +3375,8 @@ def begin_presentation(self, name=None, filename=None, interval=0):
33663375 '<p class="End_Presentation_Now"> </p>\n </section>\n ' )
33673376 self ._presentation_slides [name ].append (end_slide )
33683377 file_path = self .save_presentation (
3369- name = name , filename = filename , interval = interval )
3378+ name = name , filename = filename ,
3379+ show_notes = show_notes , interval = interval )
33703380 self ._presentation_slides [name ].pop ()
33713381
33723382 self .open_html_file (file_path )
0 commit comments