Skip to content

Commit f11b984

Browse files
authored
chore: update readme upon api update (microsoft#308)
1 parent 7b79980 commit f11b984

File tree

3 files changed

+20
-3
lines changed

3 files changed

+20
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Playwright is a Python library to automate [Chromium](https://www.chromium.org/H
66

77
| | Linux | macOS | Windows |
88
| :--- | :---: | :---: | :---: |
9-
| Chromium <!-- GEN:chromium-version -->86.0.4238.0<!-- GEN:stop --> ||||
10-
| WebKit 14.0 ||||
11-
| Firefox <!-- GEN:firefox-version -->80.0b8<!-- GEN:stop --> ||||
9+
| Chromium <!-- GEN:chromium-version -->88.0.4324.0<!-- GEN:stop --> ||||
10+
| WebKit <!-- GEN:webkit-version -->14.0<!-- GEN:stop --> ||||
11+
| Firefox <!-- GEN:firefox-version -->83.0<!-- GEN:stop --> ||||
1212

1313
Headless execution is supported for all browsers on all platforms.
1414

scripts/update_api.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/bin/bash
22

3+
python scripts/update_versions.py
4+
35
function update_api {
46
echo "Generating $1"
57
file_name="$1"

scripts/update_versions.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import re
2+
from playwright import sync_playwright
3+
4+
with sync_playwright() as p:
5+
r = open("README.md", "r")
6+
text = r.read()
7+
for browser_type in [p.chromium, p.firefox, p.webkit]:
8+
rx = re.compile(r"<!-- GEN:" + browser_type.name + r"-version -->([^<]+)<!-- GEN:stop -->")
9+
browser = browser_type.launch()
10+
text = rx.sub(f"<!-- GEN:{browser_type.name}-version -->{browser.version}<!-- GEN:stop -->", text)
11+
browser.close()
12+
13+
w = open("README.md", "w")
14+
w.write(text)
15+
w.close()

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy