Skip to content

Commit d22899f

Browse files
committed
Update the SeleniumBase Presenter ReadMe
1 parent dbf38d1 commit d22899f

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

examples/presenter/ReadMe.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ pytest my_presentation.py
2121
### Creating a new presentation:
2222

2323
```python
24-
self.create_presentation(name=None, theme="serif", show_notes=True)
24+
self.create_presentation(name=None, theme="serif")
2525
""" Creates a Reveal-JS presentation that you can add slides to.
2626
@Params
2727
name - If creating multiple presentations at the same time,
@@ -45,22 +45,25 @@ self.add_slide(content=None, image=None, code=None, iframe=None,
4545
content2=None, notes=None, name=None)
4646
""" Allows the user to add slides to a presentation.
4747
@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.
4856
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.
5658
"""
5759
```
5860

5961

6062
### Running a presentation:
6163

6264
```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)
6467
""" Begin a Reveal-JS Presentation in the web browser.
6568
@Params
6669
name - If creating multiple presentations at the same time,
@@ -159,7 +162,7 @@ class MyPresenterClass(BaseCase):
159162
'from seleniumbase import BaseCase\n\n'
160163
'class MyPresenterClass(BaseCase):\n\n'
161164
' def test_presenter(self):\n'
162-
' self.create_presentation()\n'
165+
' self.create_presentation(theme="serif")\n'
163166
' self.add_slide("Welcome to Presenter!")\n'
164167
' self.add_slide(\n'
165168
' "Add code to slides:",\n'
@@ -168,7 +171,8 @@ class MyPresenterClass(BaseCase):
168171
' "class MyPresenterClass(BaseCase):\\n\\n"\n'
169172
' " def test_presenter(self):\\n"\n'
170173
' " self.create_presentation()\\n"))\n'
171-
' self.begin_presentation(filename="demo.html")'))
174+
' self.begin_presentation(\n'
175+
' filename="demo.html", show_notes=True)'))
172176
self.add_slide(
173177
'<h3>Include <b>notes</b> with slides:</h3><br />',
174178
code=('self.add_slide("[Your HTML goes here]",\n'
@@ -193,7 +197,8 @@ class MyPresenterClass(BaseCase):
193197
self.add_slide(
194198
'<h2><b>The End</b></h2>',
195199
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)
197202
```
198203

199204
#### 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
207212
If you want to save the presentation you created as an HTML file, use:
208213

209214
```python
210-
self.save_presentation(filename="my_presentation.html")
215+
self.save_presentation(filename="my_presentation.html", show_notes=True)
211216
```
212217

213218
Presentations automatically get saved when calling:
214219
```python
215-
self.begin_presentation()
220+
self.begin_presentation(show_notes=True)
216221
```

0 commit comments

Comments
 (0)