Skip to content

Commit f501940

Browse files
authored
Merge pull request #1 from reprodev/dev
Add desktop download fix and end-user compose config
2 parents 7042c99 + 52873d2 commit f501940

5 files changed

Lines changed: 25 additions & 11 deletions

File tree

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,12 @@ Outputs are written to `/data/outputs` (mapped to your local volume path).
5151
Use the included compose example:
5252

5353
```bash
54-
docker compose -f docker-compose.ghcr.yml up -d
54+
docker compose up -d
5555
```
5656

5757
Default image reference in that file:
5858

59-
- `ghcr.io/reprodev/capotokeys:v1.0`
59+
- `ghcr.io/reprodev/capo2keys_private:latest`
6060

6161
If the package is private, authenticate first:
6262

@@ -74,8 +74,7 @@ Common tags:
7474

7575
- `latest` (default branch)
7676
- `dev` (dev branch)
77-
- `v1.0` (current release tag)
78-
- `vX.Y.Z` (future release tags)
77+
- `vX.Y.Z` (release tags)
7978
- `sha-<commit>`
8079

8180
## Configuration
@@ -171,4 +170,3 @@ GHCR setup details: `docs/GHCR_SETUP.md`
171170

172171
MIT — see `LICENSE`.
173172

174-

desktop_app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,10 @@ def main():
4242
except ImportError as exc:
4343
raise SystemExit("Desktop mode needs pywebview. Install requirements-desktop.txt") from exc
4444

45-
webview.create_window("CapoToKeys", f"http://{host}:{port}", min_size=(960, 700))
45+
# Let links with target=_blank open in the system browser.`r`n # This ensures file downloads work in desktop executable mode.`r`n webview.settings["OPEN_EXTERNAL_LINKS_IN_BROWSER"] = True`r`n webview.create_window("CapoToKeys", f"http://{host}:{port}", min_size=(960, 700))
4646
webview.start()
4747

4848

4949
if __name__ == "__main__":
5050
main()
51+

docker-compose.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
services:
2+
capotokeys:
3+
image: ghcr.io/reprodev/capotokeys:v1.0
4+
container_name: capotokeys
5+
ports:
6+
- "4506:4506"
7+
environment:
8+
OUTPUT_CONFLICT_MODE: suffix
9+
WEB_HOST: 0.0.0.0
10+
WEB_PORT: 4506
11+
volumes:
12+
- ./appdata/config/capotokeys:/data
13+
restart: unless-stopped

templates/index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!doctype html>
22
<html lang="en">
33

44
<head>
@@ -77,7 +77,7 @@ <h3>Transposed Result</h3>
7777

7878
<div class="row">
7979
<div class="actions">
80-
<a class="btn btn-sm" href="{{ url_for('download', filename=txt_name) }}">
80+
<a class="btn btn-sm" href="{{ url_for('download', filename=txt_name) }}" target="_blank" rel="noopener">
8181
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
8282
stroke-linecap="round" stroke-linejoin="round">
8383
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v4"></path>
@@ -86,7 +86,7 @@ <h3>Transposed Result</h3>
8686
</svg>
8787
Download TXT
8888
</a>
89-
<a class="btn btn-sm" href="{{ url_for('download', filename=pdf_name) }}">
89+
<a class="btn btn-sm" href="{{ url_for('download', filename=pdf_name) }}" target="_blank" rel="noopener">
9090
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"
9191
stroke-linecap="round" stroke-linejoin="round">
9292
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v4"></path>
@@ -117,3 +117,4 @@ <h3>Transposed Result</h3>
117117

118118

119119

120+

templates/list.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!doctype html>
1+
<!doctype html>
22
<html lang="en">
33

44
<head>
@@ -107,7 +107,7 @@ <h3 style="margin-top: 0;">Selected Files</h3>
107107
<a class="btn btn-secondary btn-sm" href="{{ url_for('view_file', filename=f.name) }}"
108108
target="_blank">View</a>
109109
<a class="btn btn-secondary btn-sm"
110-
href="{{ url_for('download', filename=f.name) }}">Download</a>
110+
href="{{ url_for('download', filename=f.name) }}" target="_blank" rel="noopener">Download</a>
111111
<form method="post" action="{{ url_for('delete_file', filename=f.name) }}"
112112
onsubmit="return confirm('Permanently delete {{ f.name }}?');">
113113
<button class="btn btn-danger btn-sm" type="submit">Delete</button>
@@ -134,3 +134,4 @@ <h3 style="margin-top: 0;">Selected Files</h3>
134134

135135

136136

137+

0 commit comments

Comments
 (0)