@@ -21,7 +21,7 @@ pytest my_presentation.py
21
21
### Creating a new presentation:
22
22
23
23
``` python
24
- self .create_presentation(name = None , theme = " serif" , show_notes = True )
24
+ self .create_presentation(name = None , theme = " serif" )
25
25
""" Creates a Reveal-JS presentation that you can add slides to.
26
26
@Params
27
27
name - If creating multiple presentations at the same time,
@@ -45,22 +45,25 @@ self.add_slide(content=None, image=None, code=None, iframe=None,
45
45
content2 = None , notes = None , name = None )
46
46
""" Allows the user to add slides to a presentation.
47
47
@Params
48
+ content - The HTML content to display on the presentation slide.
49
+ image - Attach an image (from a URL link) to the slide.
50
+ code - Attach code of any programming language to the slide.
51
+ Language-detection will be used to add syntax formatting.
52
+ iframe - Attach an iFrame (from a URL link) to the slide.
53
+ content2 - HTML content to display after adding an image or code.
54
+ notes - Additional notes to include with the slide.
55
+ ONLY SEEN if show_notes is set for the presentation.
48
56
name - If creating multiple presentations at the same time,
49
- use this to select the one you wish to add slides to.
50
- filename - The name of the HTML file that you wish to
51
- save the presentation to. (filename must end in ".html")
52
- show_notes - When set to True, the Notes feature becomes enabled,
53
- which allows presenters to see notes next to slides.
54
- interval - The delay time between autoplaying slides. (in seconds)
55
- If set to 0 (default), autoplay is disabled.
57
+ use this to select the presentation to add slides to.
56
58
"""
57
59
```
58
60
59
61
60
62
### Running a presentation:
61
63
62
64
``` python
63
- self .begin_presentation(filename = " my_presentation.html" , interval = 0 )
65
+ self .begin_presentation(
66
+ filename = " my_presentation.html" , show_notes = True , interval = 0 )
64
67
""" Begin a Reveal-JS Presentation in the web browser.
65
68
@Params
66
69
name - If creating multiple presentations at the same time,
@@ -159,7 +162,7 @@ class MyPresenterClass(BaseCase):
159
162
' from seleniumbase import BaseCase\n\n '
160
163
' class MyPresenterClass(BaseCase):\n\n '
161
164
' def test_presenter(self):\n '
162
- ' self.create_presentation()\n '
165
+ ' self.create_presentation(theme="serif" )\n '
163
166
' self.add_slide("Welcome to Presenter!")\n '
164
167
' self.add_slide(\n '
165
168
' "Add code to slides:",\n '
@@ -168,7 +171,8 @@ class MyPresenterClass(BaseCase):
168
171
' "class MyPresenterClass(BaseCase):\\ n\\ n"\n '
169
172
' " def test_presenter(self):\\ n"\n '
170
173
' " self.create_presentation()\\ n"))\n '
171
- ' self.begin_presentation(filename="demo.html")' ))
174
+ ' self.begin_presentation(\n '
175
+ ' filename="demo.html", show_notes=True)' ))
172
176
self .add_slide(
173
177
' <h3>Include <b>notes</b> with slides:</h3><br />' ,
174
178
code = (' self.add_slide("[Your HTML goes here]",\n '
@@ -193,7 +197,8 @@ class MyPresenterClass(BaseCase):
193
197
self .add_slide(
194
198
' <h2><b>The End</b></h2>' ,
195
199
image = " https://seleniumbase.io/img/sb_logo_10.png" )
196
- self .begin_presentation(filename = " presenter.html" , interval = 0 )
200
+ self .begin_presentation(
201
+ filename = " presenter.html" , show_notes = True , interval = 0 )
197
202
```
198
203
199
204
#### This example is from [ my_presentation.py] ( https://github.com/seleniumbase/SeleniumBase/blob/master/examples/presenter/my_presentation.py ) , which you can run from the `` examples/presenter `` folder with the following command:
@@ -207,10 +212,10 @@ pytest my_presentation.py
207
212
If you want to save the presentation you created as an HTML file, use:
208
213
209
214
``` python
210
- self .save_presentation(filename = " my_presentation.html" )
215
+ self .save_presentation(filename = " my_presentation.html" , show_notes = True )
211
216
```
212
217
213
218
Presentations automatically get saved when calling:
214
219
``` python
215
- self .begin_presentation()
220
+ self .begin_presentation(show_notes = True )
216
221
```
0 commit comments