You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/_scripts/generate_screenshots/README.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,17 +5,24 @@ and videos from pre-recorded interactions with napari. It uses `pyautogui` and
5
5
`pynput` to record the screen and mouse interactions, exports the results to a
6
6
json file, and then generates screenshots and videos based on this data.
7
7
8
+
NOTE: Make sure the Qt version on your system is compatible with the PyQt version
9
+
you are using.
10
+
8
11
## Usage
9
12
10
13
To use these scripts, follow these steps:
11
14
1.**Install Dependencies**: Ensure you have the required Python packages installed. You can do this by running:
12
15
```bash
13
16
pip install pyautogui pynput
14
17
```
15
-
2.**Launch napari**: Start napari in a separate terminal or environment. Ensure it is running and ready to accept interactions.
16
-
3.**Record Interactions**: Use the `record.py` script to record your interactions with napari. This will create a JSON file containing the recorded mouse and keyboard events.
17
-
4.**Convert to Screenshots**: Use the `convert.py` script to convert the recorded interactions into screenshots. This will generate a series of PNG files in the `screenshots` directory.
18
-
5. The conversion will be saved as `play.py`. Run python play.py to play back the actions
18
+
2.**Install napari**: You probably want to have a [development installation of napari](hhttps://napari.org/stable/developers/contributing/dev_install.html).
19
+
3.**Record Interactions**: Use the `record_interactions.py` script to record your interactions with napari. This will
20
+
a. Open a napari window,
21
+
b. Record mouse and keyboard actions,
22
+
c. Save the recorded actions to a JSON file named `recording.json`,
23
+
d. Convert the recorded actions into a Python script named `play.py`.
24
+
You can use `python record_interactions.py --help` to see the available options for naming output files.
0 commit comments