glideshow 0.1.2__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.
- glideshow-0.1.2/.github/workflows/checks.yml +16 -0
- glideshow-0.1.2/.github/workflows/release.yml +56 -0
- glideshow-0.1.2/.github/workflows/staging.yml +33 -0
- glideshow-0.1.2/.github/workflows/tests.yml +62 -0
- glideshow-0.1.2/.gitignore +24 -0
- glideshow-0.1.2/LICENSE +662 -0
- glideshow-0.1.2/PKG-INFO +69 -0
- glideshow-0.1.2/README.md +56 -0
- glideshow-0.1.2/bin/glideshow +3 -0
- glideshow-0.1.2/cloud/auth.js +239 -0
- glideshow-0.1.2/cloud/clean.js +193 -0
- glideshow-0.1.2/cloud/env.d.ts +9 -0
- glideshow-0.1.2/cloud/github-app.py +75 -0
- glideshow-0.1.2/cloud/library.js +130 -0
- glideshow-0.1.2/cloud/pages.js +82 -0
- glideshow-0.1.2/cloud/setup.sh +27 -0
- glideshow-0.1.2/cloud/share.js +252 -0
- glideshow-0.1.2/cloud/store-drive.js +180 -0
- glideshow-0.1.2/cloud/store-github.js +108 -0
- glideshow-0.1.2/cloud/tsconfig.json +5 -0
- glideshow-0.1.2/cloud/worker.js +351 -0
- glideshow-0.1.2/cloud/wrangler.toml +89 -0
- glideshow-0.1.2/docs/agents.md +223 -0
- glideshow-0.1.2/docs/deck-format.md +125 -0
- glideshow-0.1.2/docs/self-hosting.md +56 -0
- glideshow-0.1.2/docs/shortcuts.md +76 -0
- glideshow-0.1.2/editor/.assetsignore +5 -0
- glideshow-0.1.2/editor/apple-touch-icon.png +0 -0
- glideshow-0.1.2/editor/data/font-metrics.json +1 -0
- glideshow-0.1.2/editor/data/fonts.json +1 -0
- glideshow-0.1.2/editor/data/icons.json +1 -0
- glideshow-0.1.2/editor/data/symbols.js +42 -0
- glideshow-0.1.2/editor/data/themes.js +15 -0
- glideshow-0.1.2/editor/deck/base.css +92 -0
- glideshow-0.1.2/editor/deck/present.js +222 -0
- glideshow-0.1.2/editor/deck/shapes.js +377 -0
- glideshow-0.1.2/editor/deck/template.html +37 -0
- glideshow-0.1.2/editor/editor.css +657 -0
- glideshow-0.1.2/editor/glideshow-1024.png +0 -0
- glideshow-0.1.2/editor/glideshow.svg +10 -0
- glideshow-0.1.2/editor/globals.d.ts +21 -0
- glideshow-0.1.2/editor/home.html +358 -0
- glideshow-0.1.2/editor/index.html +386 -0
- glideshow-0.1.2/editor/js/arrange.js +122 -0
- glideshow-0.1.2/editor/js/boot.js +66 -0
- glideshow-0.1.2/editor/js/boxes.js +25 -0
- glideshow-0.1.2/editor/js/comments.js +85 -0
- glideshow-0.1.2/editor/js/context-menus.js +93 -0
- glideshow-0.1.2/editor/js/dialogs.js +168 -0
- glideshow-0.1.2/editor/js/dock.js +22 -0
- glideshow-0.1.2/editor/js/draw.js +107 -0
- glideshow-0.1.2/editor/js/file.js +318 -0
- glideshow-0.1.2/editor/js/find.js +72 -0
- glideshow-0.1.2/editor/js/format-panel.js +101 -0
- glideshow-0.1.2/editor/js/geometry.js +153 -0
- glideshow-0.1.2/editor/js/guides.js +37 -0
- glideshow-0.1.2/editor/js/insert.js +73 -0
- glideshow-0.1.2/editor/js/keyboard.js +256 -0
- glideshow-0.1.2/editor/js/live.js +48 -0
- glideshow-0.1.2/editor/js/menubar.js +290 -0
- glideshow-0.1.2/editor/js/menus.js +93 -0
- glideshow-0.1.2/editor/js/motion.js +148 -0
- glideshow-0.1.2/editor/js/notes.js +63 -0
- glideshow-0.1.2/editor/js/objects.js +202 -0
- glideshow-0.1.2/editor/js/people.js +73 -0
- glideshow-0.1.2/editor/js/phone-comments.js +43 -0
- glideshow-0.1.2/editor/js/phone-edit.js +253 -0
- glideshow-0.1.2/editor/js/phone-home.js +51 -0
- glideshow-0.1.2/editor/js/phone-mode.js +73 -0
- glideshow-0.1.2/editor/js/phone-sheets.js +153 -0
- glideshow-0.1.2/editor/js/phone-touch.js +145 -0
- glideshow-0.1.2/editor/js/phone-view.js +150 -0
- glideshow-0.1.2/editor/js/pointer.js +407 -0
- glideshow-0.1.2/editor/js/render.js +353 -0
- glideshow-0.1.2/editor/js/shortcuts.js +67 -0
- glideshow-0.1.2/editor/js/slides.js +120 -0
- glideshow-0.1.2/editor/js/spacing.js +23 -0
- glideshow-0.1.2/editor/js/state.js +58 -0
- glideshow-0.1.2/editor/js/storage.js +250 -0
- glideshow-0.1.2/editor/js/text.js +366 -0
- glideshow-0.1.2/editor/js/theme-toggle.js +41 -0
- glideshow-0.1.2/editor/js/theme.js +173 -0
- glideshow-0.1.2/editor/js/toolbar-groups.js +109 -0
- glideshow-0.1.2/editor/js/toolbar.js +372 -0
- glideshow-0.1.2/editor/lib/browser-db.js +47 -0
- glideshow-0.1.2/editor/lib/library.js +612 -0
- glideshow-0.1.2/editor/lib/merge.js +174 -0
- glideshow-0.1.2/editor/lib/move-local.js +51 -0
- glideshow-0.1.2/editor/lib/onefile.js +108 -0
- glideshow-0.1.2/editor/lib/store-browser.js +75 -0
- glideshow-0.1.2/editor/lib/store-folder.js +109 -0
- glideshow-0.1.2/editor/local/sw.js +66 -0
- glideshow-0.1.2/editor/local/tsconfig.json +5 -0
- glideshow-0.1.2/editor/looks/glider.svg +9 -0
- glideshow-0.1.2/editor/looks/thermal-phone.css +144 -0
- glideshow-0.1.2/editor/looks/thermal.css +268 -0
- glideshow-0.1.2/editor/manifest.json +23 -0
- glideshow-0.1.2/editor/phone.css +345 -0
- glideshow-0.1.2/editor/share/share.css +124 -0
- glideshow-0.1.2/editor/share/share.js +256 -0
- glideshow-0.1.2/editor/share/speaker.html +88 -0
- glideshow-0.1.2/editor/tsconfig.json +6 -0
- glideshow-0.1.2/glideshow/__init__.py +15 -0
- glideshow-0.1.2/glideshow/__main__.py +3 -0
- glideshow-0.1.2/glideshow/agent.py +681 -0
- glideshow-0.1.2/glideshow/build.py +54 -0
- glideshow-0.1.2/glideshow/cli.py +320 -0
- glideshow-0.1.2/glideshow/comments.py +35 -0
- glideshow-0.1.2/glideshow/decks.py +230 -0
- glideshow-0.1.2/glideshow/figure.py +33 -0
- glideshow-0.1.2/glideshow/fonts.py +63 -0
- glideshow-0.1.2/glideshow/gslides.py +1065 -0
- glideshow-0.1.2/glideshow/history.py +210 -0
- glideshow-0.1.2/glideshow/merge.py +210 -0
- glideshow-0.1.2/glideshow/osutil.py +44 -0
- glideshow-0.1.2/glideshow/pptx_export.py +207 -0
- glideshow-0.1.2/glideshow/pptx_import.py +115 -0
- glideshow-0.1.2/glideshow/publish.py +106 -0
- glideshow-0.1.2/glideshow/render.py +288 -0
- glideshow-0.1.2/glideshow/server.py +549 -0
- glideshow-0.1.2/glideshow/service.py +65 -0
- glideshow-0.1.2/pyproject.toml +55 -0
- glideshow-0.1.2/skills/glideshow/SKILL.md +85 -0
- glideshow-0.1.2/test/agent.py +449 -0
- glideshow-0.1.2/test/cloud.py +684 -0
- glideshow-0.1.2/test/coedit.py +163 -0
- glideshow-0.1.2/test/fake_drive.py +139 -0
- glideshow-0.1.2/test/fixtures/agent-deck.html +112 -0
- glideshow-0.1.2/test/fixtures/gslides-api.json +1229 -0
- glideshow-0.1.2/test/fixtures/stack-deck.html +630 -0
- glideshow-0.1.2/test/keys.py +264 -0
- glideshow-0.1.2/test/media.py +164 -0
- glideshow-0.1.2/test/share.py +181 -0
- glideshow-0.1.2/test/smoke.py +2084 -0
- glideshow-0.1.2/test/snap.py +12 -0
- glideshow-0.1.2/tools/check.sh +11 -0
- glideshow-0.1.2/tools/font_metrics.py +56 -0
- glideshow-0.1.2/tools/gslides2deck.py +1091 -0
- glideshow-0.1.2/tools/make-app.sh +84 -0
- glideshow-0.1.2/uv.lock +423 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Every push: the type and lint checks (about a minute; no build step, they read the plain JS and Python).
|
|
2
|
+
# Locally: tools/check.sh. The browser tests are tests.yml.
|
|
3
|
+
name: checks
|
|
4
|
+
on: [push, pull_request]
|
|
5
|
+
permissions:
|
|
6
|
+
contents: read
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
lint:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
steps:
|
|
12
|
+
- uses: actions/checkout@v4
|
|
13
|
+
- uses: astral-sh/setup-uv@v5
|
|
14
|
+
- uses: actions/setup-node@v4
|
|
15
|
+
with: { node-version: 22 }
|
|
16
|
+
- run: tools/check.sh
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# A version tag (v0.2.0) on main: the quick checks (the browser tests are run locally before tagging, and nightly), glideshow.org runs it, and a GitHub Release with notes from the commits
|
|
2
|
+
# since the last one, and the package on PyPI. The tag must match pyproject.toml's version. Staging is staging.yml.
|
|
3
|
+
name: release
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
tags: ['v*.*.*']
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write # the GitHub Release
|
|
9
|
+
concurrency: { group: production, cancel-in-progress: false }
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
checks:
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
with: { fetch-depth: 0 }
|
|
17
|
+
- name: The tag is pyproject.toml's version, on main
|
|
18
|
+
run: |
|
|
19
|
+
v=$(sed -n 's/^version = "\(.*\)"/\1/p' pyproject.toml)
|
|
20
|
+
[ "v$v" = "$GITHUB_REF_NAME" ] || { echo "tag $GITHUB_REF_NAME but pyproject.toml says $v"; exit 1; }
|
|
21
|
+
git merge-base --is-ancestor "$GITHUB_SHA" origin/main || { echo "$GITHUB_REF_NAME isn't on main"; exit 1; }
|
|
22
|
+
- uses: astral-sh/setup-uv@v5
|
|
23
|
+
- uses: actions/setup-node@v4
|
|
24
|
+
with: { node-version: 22 }
|
|
25
|
+
- run: tools/check.sh
|
|
26
|
+
deploy:
|
|
27
|
+
needs: checks
|
|
28
|
+
runs-on: ubuntu-latest
|
|
29
|
+
environment: { name: production, url: https://glideshow.org }
|
|
30
|
+
steps:
|
|
31
|
+
- uses: actions/checkout@v4
|
|
32
|
+
- uses: cloudflare/wrangler-action@v3
|
|
33
|
+
with:
|
|
34
|
+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
35
|
+
accountId: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
|
|
36
|
+
wranglerVersion: "4.152.0" # as locally (the action's own default is older)
|
|
37
|
+
workingDirectory: cloud
|
|
38
|
+
command: deploy
|
|
39
|
+
release:
|
|
40
|
+
needs: deploy
|
|
41
|
+
runs-on: ubuntu-latest
|
|
42
|
+
steps:
|
|
43
|
+
- uses: actions/checkout@v4
|
|
44
|
+
- uses: astral-sh/setup-uv@v5
|
|
45
|
+
- run: uv build
|
|
46
|
+
- env: { GH_TOKEN: '${{ github.token }}' }
|
|
47
|
+
run: gh release create "$GITHUB_REF_NAME" dist/* --title "Glideshow $GITHUB_REF_NAME" --generate-notes $([[ "$GITHUB_REF_NAME" == v0.* ]] && echo --prerelease)
|
|
48
|
+
pypi: # the package on PyPI as "glideshow" (trusted publishing: the PyPI project trusts this workflow; no token stored)
|
|
49
|
+
needs: release
|
|
50
|
+
runs-on: ubuntu-latest
|
|
51
|
+
environment: { name: pypi, url: https://pypi.org/p/glideshow }
|
|
52
|
+
permissions: { contents: read, id-token: write }
|
|
53
|
+
steps:
|
|
54
|
+
- uses: actions/checkout@v4
|
|
55
|
+
- uses: astral-sh/setup-uv@v5
|
|
56
|
+
- run: uv build && uv publish --trusted-publishing always
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Every push to main: the checks, then dev.glideshow.org (the nightly channel) runs it. Production is release.yml.
|
|
2
|
+
# Needs the repo secret CLOUDFLARE_API_TOKEN and the variable CLOUDFLARE_ACCOUNT_ID (README → Releasing).
|
|
3
|
+
name: staging
|
|
4
|
+
on:
|
|
5
|
+
push:
|
|
6
|
+
branches: [main]
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
concurrency: { group: staging, cancel-in-progress: true } # only the newest push deploys
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
checks:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- uses: astral-sh/setup-uv@v5
|
|
18
|
+
- uses: actions/setup-node@v4
|
|
19
|
+
with: { node-version: 22 }
|
|
20
|
+
- run: tools/check.sh
|
|
21
|
+
deploy:
|
|
22
|
+
needs: checks
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
environment: { name: staging, url: https://dev.glideshow.org }
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
- uses: cloudflare/wrangler-action@v3
|
|
28
|
+
with:
|
|
29
|
+
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
|
30
|
+
accountId: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
|
|
31
|
+
wranglerVersion: "4.152.0" # as locally (the action's own default is older)
|
|
32
|
+
workingDirectory: cloud
|
|
33
|
+
command: deploy --env dev
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# The end-to-end tests in headless Chrome (about 10 minutes on macOS): on pull requests, every night on main, and by hand
|
|
2
|
+
# (Actions → tests → Run workflow, or `gh workflow run tests.yml`). They gate nothing: a failure is a heads-up to look
|
|
3
|
+
# at. Before tagging a release, run `uv run test/smoke.py` locally.
|
|
4
|
+
name: tests
|
|
5
|
+
on:
|
|
6
|
+
pull_request:
|
|
7
|
+
schedule:
|
|
8
|
+
- cron: '0 7 * * *' # 07:00 UTC, every night
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
runs-on: macos-latest # the tests are macOS's: ⌘ shortcuts (docs/shortcuts.md), its fonts in the text-fitting checks
|
|
16
|
+
timeout-minutes: 30
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v4
|
|
19
|
+
- uses: astral-sh/setup-uv@v5
|
|
20
|
+
- run: git config --global user.name ci && git config --global user.email ci@example.org # the tests make git commits
|
|
21
|
+
- run: uv run --with playwright python -m playwright install chromium # tools/gslides2deck.py renders with Playwright's own Chromium
|
|
22
|
+
- run: uv run test/smoke.py # drives the installed Google Chrome (playwright channel "chrome")
|
|
23
|
+
- if: ${{ !cancelled() }} # (each test runs even when one before it failed)
|
|
24
|
+
run: uv run test/keys.py
|
|
25
|
+
- if: ${{ !cancelled() }}
|
|
26
|
+
run: uv run test/agent.py # the `glideshow` command as an agent uses it (skills/glideshow), in a library of its own
|
|
27
|
+
- if: failure()
|
|
28
|
+
uses: actions/upload-artifact@v4
|
|
29
|
+
with: { name: screenshots, path: "test/*.png", if-no-files-found: ignore }
|
|
30
|
+
|
|
31
|
+
cloud: # glideshow.org (cloud/) on a local Worker: browser mode, a Google account's library in a stand-in Drive, sharing
|
|
32
|
+
runs-on: macos-latest # (the sandbox, passes, comments), reports and takedowns. No real accounts: the secrets are made up.
|
|
33
|
+
timeout-minutes: 20
|
|
34
|
+
steps:
|
|
35
|
+
- uses: actions/checkout@v4
|
|
36
|
+
- uses: astral-sh/setup-uv@v5
|
|
37
|
+
with: { prune-cache: false } # (its cleanup failed on uv's cache, held by the background fake Drive)
|
|
38
|
+
- uses: actions/setup-node@v4
|
|
39
|
+
with: { node-version: 22 }
|
|
40
|
+
- name: made-up secrets for wrangler dev
|
|
41
|
+
run: |
|
|
42
|
+
cat > cloud/.dev.vars <<VARS
|
|
43
|
+
SESSION_KEY=$(openssl rand -hex 32)
|
|
44
|
+
GITHUB_APP_ID=1
|
|
45
|
+
GITHUB_APP_SLUG=glideshow-ci
|
|
46
|
+
GITHUB_CLIENT_ID=ci
|
|
47
|
+
GITHUB_CLIENT_SECRET=ci
|
|
48
|
+
GITHUB_APP_KEY=ci
|
|
49
|
+
DEV_LOGIN=1
|
|
50
|
+
DEV_REPO=ci/decks
|
|
51
|
+
DEV_DRIVE=1
|
|
52
|
+
DRIVE_API=http://localhost:8791
|
|
53
|
+
GOOGLE_TOKEN_URL=http://localhost:8791/token
|
|
54
|
+
GOOGLE_CLIENT_ID=ci
|
|
55
|
+
GOOGLE_CLIENT_SECRET=ci
|
|
56
|
+
VARS
|
|
57
|
+
- run: uv run test/fake_drive.py 8791 > fake_drive.log 2>&1 &
|
|
58
|
+
- run: cd cloud && npx --yes wrangler@4 dev --port 8790 --local-upstream localhost:8790 > ../wrangler.log 2>&1 &
|
|
59
|
+
- run: for i in $(seq 1 90); do curl -s -o /dev/null http://localhost:8790/ && exit 0; sleep 1; done; cat wrangler.log; exit 1
|
|
60
|
+
- run: uv run test/cloud.py --drive
|
|
61
|
+
- if: failure()
|
|
62
|
+
run: tail -50 wrangler.log fake_drive.log
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.pyc
|
|
3
|
+
.venv/
|
|
4
|
+
.DS_Store
|
|
5
|
+
# local only: Google Slides screenshots used as the visual reference, and generated test output
|
|
6
|
+
reference/
|
|
7
|
+
test/shots/*.png
|
|
8
|
+
test/*.png
|
|
9
|
+
replicate/
|
|
10
|
+
dist/
|
|
11
|
+
# secrets for `wrangler dev` (cloud/)
|
|
12
|
+
cloud/.dev.vars
|
|
13
|
+
cloud/.wrangler/
|
|
14
|
+
|
|
15
|
+
# fidelity study: the images are re-made from the code and from Google (summary.json and report.md are kept)
|
|
16
|
+
fidelity/results/*/google/
|
|
17
|
+
fidelity/results/*/ours/
|
|
18
|
+
|
|
19
|
+
# mobile study: captures of Google Slides' iPhone app stay on this Mac (only the checklist is kept)
|
|
20
|
+
mobile/reference/*
|
|
21
|
+
!mobile/reference/CAPTURE.md
|
|
22
|
+
test/shots/mobile/
|
|
23
|
+
test/shots/media/
|
|
24
|
+
test/shots/share/
|