sphinxcontrib-screenshot 0.1.0__tar.gz → 0.1.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sphinxcontrib-screenshot
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: A Shpinx extension to embed webpage screenshots.
5
5
  Home-page: https://github.com/tushuhei/sphinxcontrib-screenshot/
6
6
  Author: Shuhei Iitsuka
@@ -25,6 +25,7 @@ Requires-Dist: isort; extra == "dev"
25
25
  Requires-Dist: mypy; extra == "dev"
26
26
  Requires-Dist: Pillow; extra == "dev"
27
27
  Requires-Dist: pytest; extra == "dev"
28
+ Requires-Dist: sphinx[test]; extra == "dev"
28
29
  Requires-Dist: toml; extra == "dev"
29
30
  Requires-Dist: twine; extra == "dev"
30
31
  Requires-Dist: types-beautifulsoup4; extra == "dev"
@@ -37,6 +38,8 @@ Requires-Dist: yapf; extra == "dev"
37
38
 
38
39
  A Sphinx extension to embed website screenshots.
39
40
 
41
+ ![Example screenshot](https://raw.githubusercontent.com/tushuhei/sphinxcontrib-screenshot/main/example.png)
42
+
40
43
  ## Install
41
44
 
42
45
  ```bash
@@ -73,12 +76,26 @@ You can include a caption for the screenshot's `figure` directive.
73
76
  :caption: This is a screenshot for www.example.com
74
77
  ```
75
78
 
76
- You can describe the interaction that you want to have with the webpage before taking a screenshot. `page` is the [Playwright's Page instance](https://playwright.dev/docs/api/class-page).
79
+ You can describe the interaction that you want to have with the webpage before taking a screenshot in JavaScript.
77
80
 
78
81
  ```rst
79
82
  .. screenshot:: http://www.example.com
80
83
 
81
- page.get_by_role('link').click()
84
+ document.querySelector('button').click();
85
+ ```
86
+
87
+ ## Pro tips
88
+ `sphinxcontrib-screenshot` supports URLs with the HTTP and HTTPS protocols.
89
+ To take screenshots of local files and build the document while running a local server for them, you can use the NPM library [concurrently](https://www.npmjs.com/package/concurrently) in the following way:
90
+
91
+ ### Build the document
92
+ ```bash
93
+ npx --yes concurrently -k --success=first "make html" "python3 -m http.server 3000 --directory=examples"
94
+ ```
95
+
96
+ ### Watch and build the document
97
+ ```bash
98
+ npx --yes concurrently -k "make livehtml" "python3 -m http.server 3000 --directory=examples"
82
99
  ```
83
100
 
84
101
 
@@ -2,6 +2,8 @@
2
2
 
3
3
  A Sphinx extension to embed website screenshots.
4
4
 
5
+ ![Example screenshot](https://raw.githubusercontent.com/tushuhei/sphinxcontrib-screenshot/main/example.png)
6
+
5
7
  ## Install
6
8
 
7
9
  ```bash
@@ -38,12 +40,26 @@ You can include a caption for the screenshot's `figure` directive.
38
40
  :caption: This is a screenshot for www.example.com
39
41
  ```
40
42
 
41
- You can describe the interaction that you want to have with the webpage before taking a screenshot. `page` is the [Playwright's Page instance](https://playwright.dev/docs/api/class-page).
43
+ You can describe the interaction that you want to have with the webpage before taking a screenshot in JavaScript.
42
44
 
43
45
  ```rst
44
46
  .. screenshot:: http://www.example.com
45
47
 
46
- page.get_by_role('link').click()
48
+ document.querySelector('button').click();
49
+ ```
50
+
51
+ ## Pro tips
52
+ `sphinxcontrib-screenshot` supports URLs with the HTTP and HTTPS protocols.
53
+ To take screenshots of local files and build the document while running a local server for them, you can use the NPM library [concurrently](https://www.npmjs.com/package/concurrently) in the following way:
54
+
55
+ ### Build the document
56
+ ```bash
57
+ npx --yes concurrently -k --success=first "make html" "python3 -m http.server 3000 --directory=examples"
58
+ ```
59
+
60
+ ### Watch and build the document
61
+ ```bash
62
+ npx --yes concurrently -k "make livehtml" "python3 -m http.server 3000 --directory=examples"
47
63
  ```
48
64
 
49
65
 
@@ -35,6 +35,7 @@ dev =
35
35
  mypy
36
36
  Pillow
37
37
  pytest
38
+ sphinx[test]
38
39
  toml
39
40
  twine
40
41
  types-beautifulsoup4
@@ -32,7 +32,7 @@ Meta = typing.TypedDict('Meta', {
32
32
  'parallel_write_safe': bool
33
33
  })
34
34
 
35
- __version__ = '0.1.0'
35
+ __version__ = '0.1.1'
36
36
 
37
37
 
38
38
  class ScreenshotDirective(SphinxDirective):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sphinxcontrib-screenshot
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: A Shpinx extension to embed webpage screenshots.
5
5
  Home-page: https://github.com/tushuhei/sphinxcontrib-screenshot/
6
6
  Author: Shuhei Iitsuka
@@ -25,6 +25,7 @@ Requires-Dist: isort; extra == "dev"
25
25
  Requires-Dist: mypy; extra == "dev"
26
26
  Requires-Dist: Pillow; extra == "dev"
27
27
  Requires-Dist: pytest; extra == "dev"
28
+ Requires-Dist: sphinx[test]; extra == "dev"
28
29
  Requires-Dist: toml; extra == "dev"
29
30
  Requires-Dist: twine; extra == "dev"
30
31
  Requires-Dist: types-beautifulsoup4; extra == "dev"
@@ -37,6 +38,8 @@ Requires-Dist: yapf; extra == "dev"
37
38
 
38
39
  A Sphinx extension to embed website screenshots.
39
40
 
41
+ ![Example screenshot](https://raw.githubusercontent.com/tushuhei/sphinxcontrib-screenshot/main/example.png)
42
+
40
43
  ## Install
41
44
 
42
45
  ```bash
@@ -73,12 +76,26 @@ You can include a caption for the screenshot's `figure` directive.
73
76
  :caption: This is a screenshot for www.example.com
74
77
  ```
75
78
 
76
- You can describe the interaction that you want to have with the webpage before taking a screenshot. `page` is the [Playwright's Page instance](https://playwright.dev/docs/api/class-page).
79
+ You can describe the interaction that you want to have with the webpage before taking a screenshot in JavaScript.
77
80
 
78
81
  ```rst
79
82
  .. screenshot:: http://www.example.com
80
83
 
81
- page.get_by_role('link').click()
84
+ document.querySelector('button').click();
85
+ ```
86
+
87
+ ## Pro tips
88
+ `sphinxcontrib-screenshot` supports URLs with the HTTP and HTTPS protocols.
89
+ To take screenshots of local files and build the document while running a local server for them, you can use the NPM library [concurrently](https://www.npmjs.com/package/concurrently) in the following way:
90
+
91
+ ### Build the document
92
+ ```bash
93
+ npx --yes concurrently -k --success=first "make html" "python3 -m http.server 3000 --directory=examples"
94
+ ```
95
+
96
+ ### Watch and build the document
97
+ ```bash
98
+ npx --yes concurrently -k "make livehtml" "python3 -m http.server 3000 --directory=examples"
82
99
  ```
83
100
 
84
101
 
@@ -9,6 +9,7 @@ isort
9
9
  mypy
10
10
  Pillow
11
11
  pytest
12
+ sphinx[test]
12
13
  toml
13
14
  twine
14
15
  types-beautifulsoup4