Skip to content

chore: update readme upon api update #308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Playwright is a Python library to automate [Chromium](https://www.chromium.org/H

| | Linux | macOS | Windows |
| :--- | :---: | :---: | :---: |
| Chromium <!-- GEN:chromium-version -->86.0.4238.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| WebKit 14.0 | ✅ | ✅ | ✅ |
| Firefox <!-- GEN:firefox-version -->80.0b8<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Chromium <!-- GEN:chromium-version -->88.0.4324.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| WebKit <!-- GEN:webkit-version -->14.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |
| Firefox <!-- GEN:firefox-version -->83.0<!-- GEN:stop --> | ✅ | ✅ | ✅ |

Headless execution is supported for all browsers on all platforms.

Expand Down
2 changes: 2 additions & 0 deletions scripts/update_api.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

python scripts/update_versions.py

function update_api {
echo "Generating $1"
file_name="$1"
Expand Down
15 changes: 15 additions & 0 deletions scripts/update_versions.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import re
from playwright import sync_playwright

with sync_playwright() as p:
r = open("README.md", "r")
text = r.read()
for browser_type in [p.chromium, p.firefox, p.webkit]:
rx = re.compile(r"<!-- GEN:" + browser_type.name + r"-version -->([^<]+)<!-- GEN:stop -->")
browser = browser_type.launch()
text = rx.sub(f"<!-- GEN:{browser_type.name}-version -->{browser.version}<!-- GEN:stop -->", text)
browser.close()

w = open("README.md", "w")
w.write(text)
w.close()
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