Skip to content

Commit dda7fcd

Browse files
committed
Updated README; rename index.html->popup.html
1 parent 0af5440 commit dda7fcd

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
11
# pyscript-local-runtime
22

3-
This repository gives a template for running PyScript and all its runtime dependencies locally e.g. to create browser extensions using Python, or offline web apps using PyScript without internet access.
3+
This repository gives a framework for running PyScript and all its runtime dependencies locally e.g. to create browser extensions using Python, or offline web apps using PyScript without internet access.
44

5-
To download the runtime files on POSIX using wget...
5+
PyScript and its dependency Pyodide continue to evolve and this demo is frozen at Pyodide v0.21.3. You're strongly advised to check out the [latest version of PyScript](https://pyscript.net/).
6+
7+
All the files you need to run PyScript (at v0.21.3) are in the `/runtime` directory and you can also download them on POSIX using wget...
68
```shell
79
cd runtime
810
source setup.sh
911
```
1012

11-
To download the runtime files on Windows (with Python and requests):
13+
... or on Windows using the helper script supplied:
1214
```
1315
cd runtime
1416
python setup.py
@@ -21,8 +23,6 @@ This example is a simple Chrome Extension which creates a Popup box, renders the
2123

2224

2325
* The Python script is wrapped inside some simple HTML boiler-plate code in `index.html`.
24-
* On completion, `index.html` runs the JavaScript file `finished.js`.
25-
* PyScript runtime files are in `/runtime`
2626
* Icons are in `/images`
2727
* Other magic required for Chrome to recognise this as an extension are in `manifest.json`.
2828

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

manifest.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"name": "PyScript Template",
3-
"description": "Write Chrome Extensions in Python using PyScript",
2+
"name": "PyScript Demo 1",
3+
"description": "Build Chrome Extensions in Python/PyScript",
44
"version": "1.0",
55
"manifest_version": 3,
66
"icons": {
7-
"16": "images/icon-16.png",
8-
"32": "images/icon-32.png",
9-
"48": "images/icon-48.png",
10-
"128": "images/icon-128.png"
7+
"16": "icons/icon-16.png",
8+
"32": "icons/icon-32.png",
9+
"48": "icons/icon-48.png",
10+
"128": "icons/icon-128.png"
1111
},
1212
"action": {
13-
"default_popup": "index.html",
14-
"default_icon": "images/icon-128.png"
13+
"default_popup": "popup.html",
14+
"default_icon": "icons/icon-128.png"
1515
},
1616
"content_security_policy": {
1717
"extension_pages": "script-src 'self' 'wasm-unsafe-eval'; object-src 'self'"

index.html renamed to popup.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
print("This is the current date and time, as computed by Python:")
2424
now = datetime.now()
2525
now.strftime("%m/%d/%Y, %H:%M:%S")
26+
print(now)
2627
</py-script>
2728
</body>
28-
<script src="finished.js"></script>
2929
</html>
3030

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