Skip to content

Commit

Permalink
0.8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
pmp-p committed Sep 26, 2023
1 parent 9f11486 commit 6fef0c9
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,39 +64,38 @@ Command help:
Example :

```
user@pp /data/git/pygbag $ python3 -m pygbag --help your.app.folder
*pygbag 0.7.3*
user@pp /data/git/pygbag $ py -m pygbag --help test/main.py
*pygbag 0.8.2*
115: cache 0.7.2 mismatch, want 0.8.2, cleaning ...
Serving python files from [/data/git/pygbag/your.app.folder/build/web]
Serving python files from [/data/git/pygbag/test/build/web]
with no security/performance in mind, i'm just a test tool : don't rely on me
usage: __main__.py [-h] [--bind ADDRESS] [--PYBUILD PYBUILD] [--app_name APP_NAME] [--ume_block UME_BLOCK] [--can_close CAN_CLOSE]
[--cache CACHE] [--package PACKAGE] [--title TITLE] [--version VERSION] [--build] [--html] [--no_opt]
[--archive] [--icon ICON] [--cdn CDN] [--template TEMPLATE] [--ssl SSL] [--port [PORT]]
usage: __main__.py [-h] [--bind ADDRESS] [--PYBUILD PYBUILD] [--app_name APP_NAME] [--ume_block UME_BLOCK] [--can_close CAN_CLOSE] [--cache CACHE] [--package PACKAGE] [--title TITLE] [--version VERSION] [--build] [--html] [--no_opt] [--archive] [--icon ICON] [--cdn CDN] [--template TEMPLATE] [--ssl SSL]
[--port [PORT]]
options:
-h, --help show this help message and exit
--bind ADDRESS Specify alternate bind address [default: localhost]
--PYBUILD PYBUILD Specify python version [default:3.11]
--app_name APP_NAME Specify user facing name of application [default:your.app.folder]
--app_name APP_NAME Specify user facing name of application [default:test]
--ume_block UME_BLOCK
Specify wait for user media engagement before running [default:1]
--can_close CAN_CLOSE
Specify if window will ask confirmation for closing [default:0]
--cache CACHE md5 based url cache directory
--package PACKAGE package name, better make it unique
--title TITLE App nice looking name
--version VERSION override prebuilt version path [default:0.7.3]
--version VERSION override prebuilt version path [default:0.8.2]
--build build only, do not run test server
--html build as html with embedded assets (pygame-script)
--no_opt turn off assets optimizer
--archive make build/web.zip archive for itch.io
--icon ICON icon png file 32x32 min should be favicon.png
--cdn CDN web site to cache locally [default:https://pygame-web.github.io/pygbag/0.0/]
--cdn CDN web site to cache locally [default:https://pygame-web.github.io/archives/0.8/]
--template TEMPLATE index.html template [default:default.tmpl]
--ssl SSL enable ssl with server.pem and key.pem
--port [PORT] Specify alternate port [default: 8000]
```

unlisted developper options:
Expand Down
2 changes: 1 addition & 1 deletion pygbag/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from pathlib import Path

__version__ = "0.8.1"
__version__ = "0.8.2"

# hack to test git cdn build without upgrading pygbag
# beware can have side effects when file packager behaviour must change !
Expand Down
2 changes: 2 additions & 0 deletions pygbag/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,8 @@ def no_op(cls, *argv, **kw):

set_ps1 = no_op

set_ps2 = no_op

prompt = no_op

is_browser = False
Expand Down
6 changes: 3 additions & 3 deletions pygbag/testserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def send_head(self):

file_size = fs[6]

if self.path.endswith(".py"):
if path.endswith(".py"):
if VERB:
print(" --> do_GET(%s)" % path)
if fstring_decode:
Expand All @@ -221,13 +221,13 @@ def send_head(self):
file_size = len(content)
f = io.BytesIO(content)

elif self.path.endswith(".json"):
elif path.endswith(".json"):
if VERB:
print()
print(self.path)
print()

elif self.path.endswith(".html"):
elif path.endswith(".html"):
if VERB:
print("REPLACING", path, CDN, PROXY)
content = f.read()
Expand Down
2 changes: 1 addition & 1 deletion static/default.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
print("""
Loading {{cookiecutter.title}} from {{cookiecutter.archive}}.apk
Pygbag Version : {{cookiecutter.version}}
Template Version : 0.7.3
Template Version : 0.8.2
Python : {{cookiecutter.PYBUILD}}
CDN URL : {{cookiecutter.cdn}}
Screen : {{cookiecutter.width}}x{{cookiecutter.height}}
Expand Down
2 changes: 1 addition & 1 deletion static/noctx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
print("""
Loading {{cookiecutter.title}} from {{cookiecutter.archive}}.apk
Pygbag Version : {{cookiecutter.version}}
Template Version : 0.7.2
Template Version : 0.8.2
Python : {{cookiecutter.PYBUILD}}
CDN URL : {{cookiecutter.cdn}}
Screen : {{cookiecutter.width}}x{{cookiecutter.height}}
Expand Down

0 comments on commit 6fef0c9

Please sign in to comment.