Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f637d89aae | ||
|
|
1e5720eecc | ||
|
|
08ebae0416 | ||
|
|
546802210e | ||
|
|
da22625178 | ||
|
|
f53b7df65b | ||
|
|
303f978a60 | ||
|
|
8405c6fa49 | ||
|
|
7ea308293a | ||
|
|
9f156d1f2c | ||
|
|
79be06b804 | ||
|
|
b4e32eac63 | ||
|
|
f8ada5944a | ||
|
|
ca0b795a0d | ||
|
|
89c0e76c2c | ||
|
|
61281c5815 | ||
|
|
7caf4180e9 | ||
|
|
521ca559d5 | ||
|
|
2f84586cf1 | ||
|
|
6f95d292e6 | ||
|
|
9554dcc7af | ||
|
|
3c667fa8d3 | ||
|
|
03d430d49a | ||
|
|
114c8d1ec6 | ||
|
|
12b17dbed0 | ||
|
|
10ac1764b4 | ||
|
|
107efcb0fa | ||
|
|
12c2fcd01c | ||
|
|
9faa192ec4 | ||
|
|
211d2d8364 | ||
|
|
2f50658d89 | ||
|
|
bbeae33506 | ||
|
|
0d4f1c7800 | ||
|
|
7ae5da629a | ||
|
|
c02464cafb | ||
|
|
c78e49d08b | ||
|
|
6f87dfc254 | ||
|
|
820bbb9369 | ||
|
|
b522540614 | ||
|
|
b8317c2151 | ||
|
|
69ede56493 | ||
|
|
8569e1f81b | ||
|
|
7a5b1f9e87 | ||
|
|
c29e04b15f | ||
|
|
23bec5fbda | ||
|
|
f86469485f | ||
|
|
3783c2b1a5 | ||
|
|
6796c78b7e | ||
|
|
3019be0610 | ||
|
|
6ba2acfd7e | ||
|
|
e4ba053951 | ||
|
|
58fce6d8d2 | ||
|
|
7b99f516ae | ||
|
|
b415d14f8b | ||
|
|
4650273b43 | ||
|
|
e691fc7c58 | ||
|
|
753a286706 | ||
|
|
494c3622ff | ||
|
|
86927eea63 | ||
|
|
fdeec0e913 | ||
|
|
5df2ef8227 | ||
|
|
b8e8e476f5 | ||
|
|
d0dd6bad12 | ||
|
|
a685b050d9 | ||
|
|
25d4e9e148 | ||
|
|
df7d734c74 | ||
|
|
8af06c425a | ||
|
|
406d68b19e | ||
|
|
00d19202f4 | ||
|
|
2ec146712b | ||
|
|
966da96d1b | ||
|
|
c9840c88a1 | ||
|
|
e6e49d329a | ||
|
|
bd2660e73a | ||
|
|
f7ebd1f078 | ||
|
|
4e64d5a25a | ||
|
|
a0d20617e2 | ||
|
|
43c77c99d4 | ||
|
|
14bb517a9a | ||
|
|
0b9dfcb0e6 | ||
|
|
404efa9a92 | ||
|
|
63212ef4b6 | ||
|
|
abb0a624d5 | ||
|
|
6fb476f7a5 | ||
|
|
9a6aafb173 | ||
|
|
d1cc09918b | ||
|
|
d5c0b2439f | ||
|
|
760c2090ca | ||
|
|
ebb819eec9 | ||
|
|
b4919d6075 | ||
|
|
3ebf3e0843 | ||
|
|
c4c65d8195 | ||
|
|
191985d218 | ||
|
|
49c0206744 | ||
|
|
92c453ab3c | ||
|
|
cacb1df694 | ||
|
|
d039378862 | ||
|
|
a325a5b44e | ||
|
|
6fd209e85c | ||
|
|
fa3ce87f61 | ||
|
|
25f0d0705f | ||
|
|
3f0622ac23 | ||
|
|
fa4c0534f4 | ||
|
|
d94e6ac024 | ||
|
|
a1ba3e5ba0 | ||
|
|
4d974bbfc6 | ||
|
|
da0efc6b88 | ||
|
|
58d7a94ca7 | ||
|
|
606f3109a1 | ||
|
|
9a9c51d2f5 | ||
|
|
fa3f8ed8ec | ||
|
|
1553a128f9 | ||
|
|
c8e75d7211 | ||
|
|
09989c6aca | ||
|
|
0f7a16b32b | ||
|
|
50bbaccee9 | ||
|
|
03bae05f07 | ||
|
|
39dd346050 | ||
|
|
ba58037306 | ||
|
|
26f5907006 | ||
|
|
73af30f6e6 | ||
|
|
66753acce0 | ||
|
|
c73c51472e | ||
|
|
2467d94328 | ||
|
|
54b3f1d180 | ||
|
|
bd1f6f6192 | ||
|
|
c7ac53ed60 | ||
|
|
31288e9b7b | ||
|
|
a5b2a16c29 | ||
|
|
24055f9668 |
No files matched your search
@@ -0,0 +1,6 @@
|
||||
github: poli0981
|
||||
ko_fi: skullmute
|
||||
buy_me_a_coffee: skullmute
|
||||
patreon: skullmute
|
||||
custom:
|
||||
- paypal.me/DungDang212
|
||||
@@ -0,0 +1,99 @@
|
||||
name: Bug report
|
||||
description: Something is broken or behaving unexpectedly.
|
||||
title: "[Bug]: "
|
||||
labels: ["bug", "triage"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to file a bug. Please fill in as much detail as you can —
|
||||
a clear reproduction is the difference between a fix today and a fix in 3 weeks.
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: App version
|
||||
description: From the About page or the title bar. Example `v0.13.0`.
|
||||
placeholder: v0.13.0
|
||||
validations:
|
||||
required: true
|
||||
- type: dropdown
|
||||
id: surface
|
||||
attributes:
|
||||
label: Where are you running YTDescGen?
|
||||
options:
|
||||
- Web (GitHub Pages)
|
||||
- Desktop — Windows (Tauri)
|
||||
- Desktop — macOS (Tauri)
|
||||
- Desktop — Linux (Tauri)
|
||||
- Local dev (npm run dev)
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: os
|
||||
attributes:
|
||||
label: Operating system
|
||||
description: e.g. Windows 11 25H2, macOS 14.6, Ubuntu 24.04
|
||||
validations:
|
||||
required: true
|
||||
- type: input
|
||||
id: browser
|
||||
attributes:
|
||||
label: Browser (web only)
|
||||
description: e.g. Chrome 131, Brave 1.70, Safari 17. Leave blank for desktop.
|
||||
- type: dropdown
|
||||
id: language
|
||||
attributes:
|
||||
label: App language at the time of the bug
|
||||
options:
|
||||
- English (en)
|
||||
- Tiếng Việt (vi)
|
||||
- 日本語 (ja)
|
||||
- Español (es)
|
||||
- 한국어 (ko)
|
||||
- 中文 (zh)
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: repro
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: Numbered steps. Include the exact inputs that triggered the bug.
|
||||
placeholder: |
|
||||
1. Open Editor
|
||||
2. Pick genre "Survival Horror"
|
||||
3. Toggle "eye_horror" warning
|
||||
4. Click Generate
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: Expected behavior
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: actual
|
||||
attributes:
|
||||
label: Actual behavior
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: console
|
||||
attributes:
|
||||
label: Console / log output
|
||||
description: Open DevTools (web) or the log panel (desktop) and paste any errors. Rendered as code.
|
||||
render: shell
|
||||
- type: textarea
|
||||
id: screenshots
|
||||
attributes:
|
||||
label: Screenshots / screen recording (optional)
|
||||
description: Drag and drop images or videos here.
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: Pre-flight checks
|
||||
options:
|
||||
- label: I searched existing issues and this is not a duplicate.
|
||||
required: true
|
||||
- label: I'm on the latest released version (or noted my older version above).
|
||||
required: true
|
||||
@@ -0,0 +1,8 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Discord — General chat
|
||||
url: https://discord.gg/2aNR3aVt
|
||||
about: For casual questions, gameplay chat, or quick help. Use a bug report or feature request for anything actionable.
|
||||
- name: GitHub Discussions
|
||||
url: https://github.com/poli0981/youtube-generator/discussions
|
||||
about: Ideas, Q&A, and release announcements live here.
|
||||
@@ -0,0 +1,48 @@
|
||||
name: Feature request
|
||||
description: Suggest a new feature or improvement.
|
||||
title: "[Feature]: "
|
||||
labels: ["enhancement", "triage"]
|
||||
body:
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: Problem
|
||||
description: What pain point or workflow gap are you running into today?
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: proposal
|
||||
attributes:
|
||||
label: Proposed solution
|
||||
description: What should YTDescGen do? Be concrete — UI sketch, example output, etc.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: alternatives
|
||||
attributes:
|
||||
label: Alternatives considered
|
||||
description: Other approaches you thought about and why you ruled them out.
|
||||
- type: dropdown
|
||||
id: scope
|
||||
attributes:
|
||||
label: Scope
|
||||
description: Which surfaces does this affect?
|
||||
multiple: true
|
||||
options:
|
||||
- Editor
|
||||
- Output / preview
|
||||
- Profiles / presets
|
||||
- Templates (description, title, tags)
|
||||
- i18n / locales
|
||||
- Settings
|
||||
- Desktop (Tauri)
|
||||
- Documentation
|
||||
validations:
|
||||
required: true
|
||||
- type: checkboxes
|
||||
id: checks
|
||||
attributes:
|
||||
label: Pre-flight checks
|
||||
options:
|
||||
- label: I searched existing issues and this is not a duplicate.
|
||||
required: true
|
||||
@@ -0,0 +1,47 @@
|
||||
## Summary
|
||||
|
||||
<!-- 1-3 bullet points describing the change -->
|
||||
|
||||
-
|
||||
-
|
||||
|
||||
## Type
|
||||
|
||||
- [ ] `feat` — new feature
|
||||
- [ ] `fix` — bug fix
|
||||
- [ ] `refactor` — code change with no behavior change
|
||||
- [ ] `docs` — documentation only
|
||||
- [ ] `test` — tests only
|
||||
- [ ] `ci` — CI / build pipeline
|
||||
- [ ] `chore` — other
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] `npm run typecheck` passes
|
||||
- [ ] `npm run lint` passes
|
||||
- [ ] `npm run validate:locales` passes (required if you touched `src/i18n/locales/` or `_schema.json`)
|
||||
- [ ] `npm run test:run` passes
|
||||
- [ ] No secrets, credentials, or PII committed
|
||||
- [ ] No new runtime dependencies without prior discussion in an issue
|
||||
- [ ] Commit messages follow `type(scope): message`
|
||||
|
||||
## UI Changes
|
||||
|
||||
<!--
|
||||
If this PR touches the UI, attach screenshots or short recordings at:
|
||||
- Desktop (≥1024px)
|
||||
- Tablet (768px)
|
||||
- Mobile (390px)
|
||||
Otherwise delete this section.
|
||||
-->
|
||||
|
||||
## AI-Assisted Contribution
|
||||
|
||||
- [ ] Yes — AI tool used: <!-- e.g. Claude Code 4.7 Opus, Cursor, GitHub Copilot -->
|
||||
- [ ] No
|
||||
|
||||
If yes: did you review every line of generated code/text yourself before submitting? <!-- yes/no -->
|
||||
|
||||
## Related Issues
|
||||
|
||||
<!-- Fixes #123, Closes #456 -->
|
||||
@@ -0,0 +1,31 @@
|
||||
# Dependabot configuration.
|
||||
#
|
||||
# This file exists only to configure SECURITY updates for cargo in /src-tauri.
|
||||
# Version updates stay disabled (open-pull-requests-limit: 0); npm and
|
||||
# GitHub Actions keep GitHub's default security-update behavior.
|
||||
#
|
||||
# Why the ignores: `rand` and `glib` are transitive dependencies of tauri,
|
||||
# and their security fixes require semver-major bumps that the dependency
|
||||
# tree does not allow, so every Dependabot security-update job for them
|
||||
# fails with `security_update_not_possible` (runs 27387346373, 27387346324):
|
||||
#
|
||||
# rand 0.7.3 (fix: 0.8.6) pinned by
|
||||
# tauri -> tauri-utils -> kuchikiki -> selectors -> phf_codegen 0.8
|
||||
# -> phf_generator 0.8 (requires rand ^0.7)
|
||||
# glib 0.18.5 (fix: 0.20.0) pinned by
|
||||
# tauri's gtk-rs 0.18 Linux stack (gtk/gdk/gio 0.18 require glib 0.18)
|
||||
#
|
||||
# Remove these ignores once tauri updates kuchikiki / the gtk-rs bindings
|
||||
# (re-check with: cargo update -p rand@0.7.3 --precise 0.8.6 --dry-run).
|
||||
|
||||
version: 2
|
||||
updates:
|
||||
- package-ecosystem: "cargo"
|
||||
directory: "/src-tauri"
|
||||
schedule:
|
||||
interval: "weekly"
|
||||
# No version-update PRs; this entry only feeds ignore rules to security updates.
|
||||
open-pull-requests-limit: 0
|
||||
ignore:
|
||||
- dependency-name: "rand"
|
||||
- dependency-name: "glib"
|
||||
@@ -0,0 +1,41 @@
|
||||
name: Announce Release to Discord
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Existing release tag to re-announce"
|
||||
required: true
|
||||
type: string
|
||||
|
||||
# `link-discussion` needs `contents: write` (to edit the release) and
|
||||
# `discussions: write` (so GitHub auto-creates the linked Discussion under
|
||||
# the configured category). The reusable announce job only needs read.
|
||||
permissions:
|
||||
contents: write
|
||||
discussions: write
|
||||
|
||||
jobs:
|
||||
link-discussion:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Link release to Announcements discussion
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# Setting --discussion-category on a published release causes
|
||||
# GitHub to auto-create the linked Discussion. Requires the
|
||||
# repo to have Discussions enabled with an "Announcements"
|
||||
# category (configured manually under repo Settings).
|
||||
run: |
|
||||
gh release edit "${{ github.event.release.tag_name || inputs.tag }}" \
|
||||
--repo "${{ github.repository }}" \
|
||||
--discussion-category "Announcements"
|
||||
|
||||
announce:
|
||||
needs: link-discussion
|
||||
uses: poli0981/.github/.github/workflows/announce-release.yml@main
|
||||
with:
|
||||
tag_override: ${{ inputs.tag || '' }}
|
||||
secrets: inherit
|
||||
@@ -10,10 +10,10 @@ jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 22
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- run: npm run typecheck
|
||||
|
||||
@@ -16,16 +16,16 @@ jobs:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 22
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- uses: actions/configure-pages@v5
|
||||
- uses: actions/upload-pages-artifact@v3
|
||||
- uses: actions/configure-pages@v6
|
||||
- uses: actions/upload-pages-artifact@v5
|
||||
with:
|
||||
path: dist
|
||||
- id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
uses: actions/deploy-pages@v5
|
||||
@@ -0,0 +1,19 @@
|
||||
name: Notify CI Failures
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
# Match the exact `name:` of the CI workflow (.github/workflows/ci.yml).
|
||||
# Renaming CI silently breaks this filter — keep them in sync.
|
||||
workflows: ["CI"]
|
||||
types: [completed]
|
||||
|
||||
# REQUIRED: declare permissions matching the reusable workflow's needs.
|
||||
# Reusable needs `actions: read` to inspect workflow_run details.
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
uses: poli0981/.github/.github/workflows/notify-ci-failure.yml@main
|
||||
secrets: inherit
|
||||
@@ -0,0 +1,18 @@
|
||||
name: Notify Deploy Status
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
# Match the exact `name:` of the deploy workflow
|
||||
# (.github/workflows/deploy-web.yml). Renaming it silently breaks this
|
||||
# filter — keep them in sync.
|
||||
workflows: ["Deploy to GitHub Pages"]
|
||||
types: [completed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
uses: poli0981/.github/.github/workflows/notify-deploy.yml@main
|
||||
secrets: inherit
|
||||
@@ -0,0 +1,18 @@
|
||||
name: Notify Release Pipeline
|
||||
|
||||
on:
|
||||
workflow_run:
|
||||
# Match the exact `name:` of the release-pipeline producers
|
||||
# (release-desktop.yml + announce-release.yml). Renaming either silently
|
||||
# breaks this filter — keep them in sync.
|
||||
workflows: ["Release Desktop", "Announce Release to Discord"]
|
||||
types: [completed]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
notify:
|
||||
uses: poli0981/.github/.github/workflows/notify-release-pipeline.yml@main
|
||||
secrets: inherit
|
||||
@@ -0,0 +1,89 @@
|
||||
name: Release Android
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ["v*"]
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Tag to build (e.g. v0.29.0). The manifests must already carry this version."
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build-android:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
ref: ${{ github.event.inputs.tag || github.ref }}
|
||||
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
|
||||
- uses: actions/setup-java@v5
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: "17"
|
||||
|
||||
- uses: android-actions/setup-android@v4
|
||||
|
||||
- name: Install Android NDK (r27 LTS)
|
||||
run: sdkmanager "ndk;27.3.13750724"
|
||||
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: aarch64-linux-android,armv7-linux-androideabi,i686-linux-android,x86_64-linux-android
|
||||
|
||||
- name: Cache cargo
|
||||
uses: actions/cache@v5
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/registry
|
||||
~/.cargo/git
|
||||
src-tauri/target
|
||||
key: ${{ runner.os }}-android-cargo-${{ hashFiles('src-tauri/Cargo.lock') }}
|
||||
|
||||
- run: npm ci
|
||||
|
||||
- name: Install Tauri CLI
|
||||
run: cargo install tauri-cli --version "^2" --locked
|
||||
|
||||
- name: Decode keystore
|
||||
env:
|
||||
ANDROID_KEYSTORE_BASE64: ${{ secrets.ANDROID_KEYSTORE_BASE64 }}
|
||||
run: echo "$ANDROID_KEYSTORE_BASE64" | base64 -d > "$RUNNER_TEMP/release.jks"
|
||||
|
||||
- name: Write keystore.properties
|
||||
env:
|
||||
ANDROID_KEY_ALIAS: ${{ secrets.ANDROID_KEY_ALIAS }}
|
||||
ANDROID_KEY_PASSWORD: ${{ secrets.ANDROID_KEY_PASSWORD }}
|
||||
ANDROID_STORE_PASSWORD: ${{ secrets.ANDROID_STORE_PASSWORD }}
|
||||
run: |
|
||||
{
|
||||
echo "storeFile=$RUNNER_TEMP/release.jks"
|
||||
echo "storePassword=$ANDROID_STORE_PASSWORD"
|
||||
echo "keyAlias=$ANDROID_KEY_ALIAS"
|
||||
echo "keyPassword=$ANDROID_KEY_PASSWORD"
|
||||
} > src-tauri/gen/android/keystore.properties
|
||||
|
||||
- name: Build signed APK
|
||||
env:
|
||||
# Pin NDK_HOME to the exact version we installed above — the runner may
|
||||
# ship a different default NDK that ANDROID_NDK_ROOT would point at.
|
||||
NDK_HOME: ${{ env.ANDROID_HOME }}/ndk/27.3.13750724
|
||||
run: cargo tauri android build --apk
|
||||
|
||||
- name: Upload APK to draft release
|
||||
uses: softprops/action-gh-release@v3
|
||||
with:
|
||||
tag_name: ${{ github.event.inputs.tag || github.ref_name }}
|
||||
draft: true
|
||||
files: src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -3,6 +3,16 @@ name: Release Desktop
|
||||
on:
|
||||
push:
|
||||
tags: ["v*"]
|
||||
# Manual re-run hook — lets us rebuild a release without deleting +
|
||||
# recreating the tag. Useful when a transient runner failure (e.g.
|
||||
# the macOS DMG bundler hitting an AppleScript flake) costs us one
|
||||
# arch's binary on an otherwise-shipped tag.
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag:
|
||||
description: "Tag to build (e.g. v0.9.0). The job still expects the manifests to already carry this version."
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
@@ -10,26 +20,75 @@ permissions:
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# windows-latest serves the windows-2025-vs2026 image (VS 2026
|
||||
# toolchain) from June 15, 2026. Tauri build (MSI + NSIS)
|
||||
# verified on that exact image 2026-06-12, actions run
|
||||
# 27388695090 — no runner pin needed.
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
# Default Windows bundles: MSI + NSIS (.exe). Both ship.
|
||||
bundleArgs: ""
|
||||
- os: macos-14
|
||||
target: aarch64-apple-darwin
|
||||
# macOS DMG bundling on hosted runners flakes inside
|
||||
# `bundle_dmg.sh` (the AppleScript that sets icon
|
||||
# positions in the DMG window times out on the headless
|
||||
# runner). Build only the `.app` bundle; tauri-action
|
||||
# tar.gzips it into a `.app.tar.gz` for upload. Users
|
||||
# expand and drag-drop into /Applications.
|
||||
#
|
||||
# Intel macOS (x86_64) is NOT built — the `macos-13`
|
||||
# free runner queue is functionally unavailable since
|
||||
# GitHub started deprecating it. Revisit with a
|
||||
# `universal-apple-darwin` build on this same runner if
|
||||
# Intel support becomes a priority.
|
||||
bundleArgs: "--bundles app"
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
# Default Linux bundles: AppImage + deb. Both ship.
|
||||
bundleArgs: ""
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
node-version: 20
|
||||
# On `workflow_dispatch` checkout the requested tag; on a
|
||||
# tag push we already get the tag commit by default.
|
||||
ref: ${{ github.event.inputs.tag || github.ref }}
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 22
|
||||
cache: npm
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.target }}
|
||||
- name: Install Linux dependencies
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
libwebkit2gtk-4.1-dev \
|
||||
libgtk-3-dev \
|
||||
libayatana-appindicator3-dev \
|
||||
librsvg2-dev \
|
||||
patchelf
|
||||
- run: npm ci
|
||||
- uses: tauri-apps/tauri-action@v0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
# AppImage bundling on hosted runners flakes: linuxdeploy (itself
|
||||
# an AppImage) needs FUSE to mount, which GitHub runners don't
|
||||
# reliably provide → "failed to run linuxdeploy". Extract-and-run
|
||||
# avoids FUSE; NO_STRIP skips a strip pass that also intermittently
|
||||
# fails. (No-op on Windows / macOS.) Transient CDN 504s while
|
||||
# *fetching* linuxdeploy are handled by re-running the job.
|
||||
APPIMAGE_EXTRACT_AND_RUN: 1
|
||||
NO_STRIP: true
|
||||
with:
|
||||
tagName: v__VERSION__
|
||||
releaseName: "YTDescGen v__VERSION__"
|
||||
tagName: ${{ github.event.inputs.tag || 'v__VERSION__' }}
|
||||
releaseName: "YTDescGen ${{ github.event.inputs.tag || 'v__VERSION__' }}"
|
||||
releaseBody: "See the assets to download the installer for your platform."
|
||||
releaseDraft: true
|
||||
args: ${{ matrix.bundleArgs }} --target ${{ matrix.target }}
|
||||
@@ -11,3 +11,14 @@ coverage/
|
||||
.claude/
|
||||
src-tauri/target/
|
||||
app-icon.png
|
||||
|
||||
# Android (Tauri gen) — the generated Gradle project source IS committed, but
|
||||
# never the signing secrets, machine-local files, or build artifacts.
|
||||
*.jks
|
||||
*.keystore
|
||||
src-tauri/gen/android/keystore.properties
|
||||
src-tauri/gen/android/local.properties
|
||||
src-tauri/gen/android/.gradle/
|
||||
src-tauri/gen/android/.idea/
|
||||
src-tauri/gen/android/build/
|
||||
src-tauri/gen/android/app/build/
|
||||
@@ -4,18 +4,18 @@
|
||||
|
||||
**YTDescGen** is a desktop-capable web application that generates YouTube video titles, descriptions, and tags for Gameplay No Commentary channels. It supports multiple languages, game genres, and video types with a profile/preset system to eliminate repetitive data entry.
|
||||
|
||||
- **Repository**: `github.com/poli0981/yt-desc-gen` (private)
|
||||
- **License**: MIT
|
||||
- **Repository**: `github.com/poli0981/youtube-generator`
|
||||
- **License**: Apache-2.0 (see `LICENSE` + `NOTICE`)
|
||||
- **Primary Language**: TypeScript
|
||||
- **Stack**: React 18 + Vite + Tailwind CSS + Zustand + Tauri (desktop)
|
||||
- **Target Platforms**: Web (GitHub Pages), Desktop (Windows/macOS via Tauri)
|
||||
- **Stack**: React 18 + Vite 8 + Tailwind CSS 3 + Zustand + Tauri 2 (desktop)
|
||||
- **Target Platforms**: Web (GitHub Pages), Desktop (Windows/macOS/Linux via Tauri)
|
||||
|
||||
## Tech Stack
|
||||
|
||||
| Layer | Technology | Why |
|
||||
|-------|-----------|-----|
|
||||
| Framework | React 18 | Familiar from F2P tracker dashboard |
|
||||
| Build | Vite 5 | Fast HMR, clean config |
|
||||
| Build | Vite 8 | Fast HMR, Rolldown bundler |
|
||||
| Language | TypeScript (strict) | Type safety for template engine |
|
||||
| Styling | Tailwind CSS 3 | Utility-first, fast iteration |
|
||||
| State | Zustand + persist middleware | Simple, localStorage/file persistence |
|
||||
@@ -40,13 +40,14 @@ yt-desc-gen/
|
||||
├── index.html
|
||||
│
|
||||
├── docs/ # Project documentation
|
||||
│ ├── PRD.md # Product Requirements Document
|
||||
│ ├── DEVELOPMENT.md # Toolchain / IDE / build commands (EN)
|
||||
│ ├── ARCHITECTURE.md # Technical architecture
|
||||
│ ├── FEATURES.md # Complete feature list
|
||||
│ ├── ROADMAP.md # Development phases
|
||||
│ ├── TECH-SPEC.md # Technical specifications
|
||||
│ ├── I18N.md # Internationalization guide
|
||||
│ └── PACKAGING.md # Desktop packaging guide
|
||||
│ ├── PACKAGING.md # Desktop packaging guide
|
||||
│ └── i18n/vi/ # Vietnamese mirrors (DEVELOPMENT, DISCLAIMER)
|
||||
│
|
||||
├── src/
|
||||
│ ├── main.tsx # Entry point
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
# Code of Conduct
|
||||
|
||||
This project adopts the **[Contributor Covenant v2.1](https://www.contributor-covenant.org/version/2/1/code_of_conduct/)** in full.
|
||||
|
||||
By participating in this project — opening issues, submitting pull requests, commenting, translating locales, or any other form of contribution — you agree to abide by its terms.
|
||||
|
||||
## Reporting
|
||||
|
||||
Report violations privately to the maintainer: `lopop05905@proton.me`.
|
||||
|
||||
All reports are reviewed and investigated promptly and fairly. The maintainer is obligated to respect the privacy and security of the reporter.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Examples of enforcement actions, in escalating order:
|
||||
|
||||
1. A private warning.
|
||||
2. A public warning on the relevant issue / PR.
|
||||
3. A temporary ban from contributing.
|
||||
4. A permanent ban — applied without warning for serious violations (harassment, threats, malicious code submissions per [`CONTRIBUTING.md`](./CONTRIBUTING.md) auto-ignore rules).
|
||||
|
||||
For the full list of enforcement guidelines, read the [Contributor Covenant v2.1 — Enforcement Section](https://www.contributor-covenant.org/version/2/1/code_of_conduct/#enforcement).
|
||||
@@ -0,0 +1,80 @@
|
||||
# Contributing to YTDescGen
|
||||
|
||||
Thanks for taking the time to contribute. Read this once before opening your first PR — it saves time on both sides.
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
Participation is governed by the [Code of Conduct](./CODE_OF_CONDUCT.md). By contributing, you agree to its terms.
|
||||
|
||||
## Getting Started
|
||||
|
||||
1. Read the [Development Guide](./docs/DEVELOPMENT.md) — also available in [Vietnamese](./docs/i18n/vi/DEVELOPMENT.md).
|
||||
2. Install dependencies: `npm install`.
|
||||
3. Start the dev server: `npm run dev`.
|
||||
4. Before opening a PR run all gates:
|
||||
```bash
|
||||
npm run typecheck
|
||||
npm run lint
|
||||
npm run validate:locales
|
||||
npm run test:run
|
||||
```
|
||||
|
||||
## How to Contribute
|
||||
|
||||
### Issues
|
||||
|
||||
Use the templates in `.github/ISSUE_TEMPLATE/`:
|
||||
|
||||
- **Bug report** — only if you can reproduce on the latest release.
|
||||
- **Feature request** — only with a concrete use case, not abstract requests.
|
||||
|
||||
### Pull Requests
|
||||
|
||||
- Branch from `dev`, not `main`.
|
||||
- Commit format: `type(scope): message` — e.g. `feat(engine): add Spanish template support`. Types: `feat`, `fix`, `refactor`, `docs`, `test`, `ci`, `chore`.
|
||||
- One logical change per PR. Don't bundle unrelated refactors.
|
||||
- All locale files must stay in lock-step — see the i18n section below.
|
||||
- AI-assisted contributions are welcome but **must be disclosed** in the PR description.
|
||||
|
||||
### i18n Contributions
|
||||
|
||||
If your change adds or removes any user-facing string:
|
||||
|
||||
1. Update the locale schema at `src/i18n/locales/_schema.json` first.
|
||||
2. Add the key to **all 6 locales** (`en` / `vi` / `ja` / `es` / `ko` / `zh`).
|
||||
3. `npm run validate:locales` must pass.
|
||||
|
||||
Native-speaker corrections to AI-translated locales (JA / ES / KO / ZH) are especially welcome — see [DISCLAIMER.md](./DISCLAIMER.md) for the current translation-quality status.
|
||||
|
||||
## Auto-ignored Contributions
|
||||
|
||||
The following are closed without review and may result in a contributor ban — no exceptions:
|
||||
|
||||
- **Suspected malicious code.** If a PR contains code we suspect may be a supply-chain attack, obfuscation, credential harvesting, cryptominer, or any form of malware — even if CodeQL and Dependabot don't flag it, the maintainer may investigate manually. **Detection equals ban.**
|
||||
- **Unverified or suspicious links** in issues, PRs, or comments (pastebin scrapers, redirect chains, unfamiliar shortlinks, link-shortener URLs without context).
|
||||
- **Behavior or language violating** [GitHub's Acceptable Use Policies](https://docs.github.com/en/site-policy/acceptable-use-policies).
|
||||
- **Off-topic / rambling reports** that don't get to the point. Example of what gets ignored: *"Good morning, today is a beautiful day, I was just wondering if maybe…"* — get straight to the problem.
|
||||
- **PRs that touch hundreds of files for a one-line fix** (typical sign of an auto-formatter run on unrelated files).
|
||||
- **Tests deleted, or `--no-verify` used to bypass pre-commit hooks.**
|
||||
- **"AI rewrote my entire codebase in a different style" PRs.** AI-assisted edits are welcome (disclosed); whole-repo rewrites are not.
|
||||
- **Spam, drive-by typo fixes** that don't address a real issue, and karma-farming PRs.
|
||||
|
||||
## What We Want
|
||||
|
||||
- Bug fixes with a reproduction case and a regression test.
|
||||
- Locale corrections from native speakers.
|
||||
- New content-warning IDs with all 6 translations and a clear rationale (especially horror-genre vocabulary).
|
||||
- New video types or genres that fit the gameplay no-commentary use case.
|
||||
- Accessibility and mobile-responsive improvements.
|
||||
- Performance fixes with a `before/after` measurement.
|
||||
|
||||
## What We Don't Want
|
||||
|
||||
- Cosmetic refactors with no behavior change.
|
||||
- Adding new runtime dependencies without first opening an issue to discuss the tradeoff.
|
||||
- Renaming files without coordinating with open PRs.
|
||||
- Changes to the LICENSE or NOTICE files (these are governance, not contributions).
|
||||
|
||||
## License
|
||||
|
||||
By contributing, you agree your contribution will be licensed under the [Apache License 2.0](./LICENSE), the same license as the project, and that you have the right to grant that license.
|
||||
@@ -0,0 +1,53 @@
|
||||
# Disclaimer
|
||||
|
||||
## Solo project, AI-assisted
|
||||
|
||||
YTDescGen is a personal project built by a single maintainer (`@poli0981`) for use with the [`@SkullMute`](https://www.youtube.com/@SkullMute) YouTube channel and shared publicly as open source. It is **not a commercial product** and there is no support obligation.
|
||||
|
||||
Code, documentation, locale translations, and design decisions in this repository were **co-authored with the assistance of Anthropic's Claude Code (model 4.7 Opus, 1M-context variant)**. All commits, releases, and architectural decisions are reviewed and approved by the maintainer before merging.
|
||||
|
||||
This disclosure applies to:
|
||||
|
||||
- Source code in `src/` and `src-tauri/`.
|
||||
- Documentation in `docs/` and all root markdown files.
|
||||
- Locale files in `src/i18n/locales/`.
|
||||
- CI/CD workflows in `.github/workflows/`.
|
||||
|
||||
See also: [`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md) § "AI-Assisted Development Disclosure".
|
||||
|
||||
## Translation quality
|
||||
|
||||
The application UI ships in six languages. Authoring quality varies:
|
||||
|
||||
| Locale | Authoring | Notes |
|
||||
| --- | --- | --- |
|
||||
| English (`en`) | Maintainer + AI | Primary working locale. Strings reviewed before commit. |
|
||||
| Vietnamese (`vi`) | Maintainer (native) + AI | Reviewed by the maintainer, who is a native Vietnamese speaker. |
|
||||
| Japanese (`ja`) | AI-translated | Not native-reviewed. Grammar and tone may be imperfect. |
|
||||
| Spanish (`es`) | AI-translated | Not native-reviewed. Regional voice (LatAm vs. Castilian) not specifically targeted. |
|
||||
| Korean (`ko`) | AI-translated | Not native-reviewed. Honorific register chosen for neutrality, not specific cultural fit. |
|
||||
| Chinese (`zh`) | AI-translated | Simplified Chinese only. Not native-reviewed. |
|
||||
|
||||
If you're a native speaker and spot mistranslations, please open an issue or PR — see [CONTRIBUTING.md](./CONTRIBUTING.md) § "i18n Contributions".
|
||||
|
||||
## Voice and tone
|
||||
|
||||
Generated description templates use an opinionated tone tailored to the **gameplay no-commentary** YouTube niche, with extra emphasis on horror / scary games (because that's the maintainer's channel). The output may not fit every channel's voice or every country's reader expectations. The application is template-driven — you can edit any generated text before publishing.
|
||||
|
||||
Some Vietnamese phrasings deliberately keep loanwords and casual tone reflecting how Vietnamese gameplay creators commonly write descriptions. These are not "incorrect translations"; they are stylistic choices for the target audience.
|
||||
|
||||
## No warranty
|
||||
|
||||
This software is provided **as-is, with no warranty of any kind**. See [`LICENSE`](./LICENSE) (Apache 2.0) §§ 7 and 8 for the full disclaimer of warranty and limitation of liability.
|
||||
|
||||
In plain English: if the application crashes, mangles your draft, generates a description that gets your video flagged by YouTube, or causes any other harm — the maintainer is not liable. Use at your own risk; back up your drafts.
|
||||
|
||||
## Not affiliated with YouTube / Anthropic
|
||||
|
||||
YTDescGen is **not** affiliated with, endorsed by, or sponsored by YouTube, Google LLC, or Alphabet Inc. The generated output is intended to be pasted into the YouTube Studio editor; this application does not interact with the YouTube API.
|
||||
|
||||
Use of Claude Code during development does **not** make this an Anthropic product. Anthropic, Claude, and Claude Code are trademarks of Anthropic, PBC. This project is independent.
|
||||
|
||||
## Not legal or financial advice
|
||||
|
||||
Any mention of GDPR, CCPA, copyright law, YouTube's monetization policies, or similar topics in this repository's documentation is provided for orientation only and is **not legal advice**. Consult a qualified lawyer in your jurisdiction if you need an authoritative answer.
|
||||
@@ -0,0 +1,201 @@
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for describing the origin of the Work and
|
||||
reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Support. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or support.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied. See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@@ -0,0 +1,28 @@
|
||||
# Maintainers
|
||||
|
||||
## Active Maintainers
|
||||
|
||||
### `@poli0981`
|
||||
|
||||
- **GitHub**: <https://github.com/poli0981>
|
||||
- **YouTube** (reference channel): <https://www.youtube.com/@SkullMute>
|
||||
- **Email** (security & private contact): `lopop05905@proton.me`
|
||||
- **Areas of responsibility**: all — core engine, locale management, UI, Tauri desktop shell, releases, CI/CD.
|
||||
|
||||
## Maintainer Responsibilities
|
||||
|
||||
- Triage incoming issues and PRs.
|
||||
- Run the release process: `CHANGELOG.md` entry, version bump, build artifacts, signed tag.
|
||||
- Enforce the [Code of Conduct](./CODE_OF_CONDUCT.md).
|
||||
- Review and approve locale translation contributions.
|
||||
- Coordinate security advisory disclosure per [SECURITY.md](./SECURITY.md).
|
||||
|
||||
## Becoming a Maintainer
|
||||
|
||||
There is currently no formal pathway. The project has been solo since inception. If you'd like to help maintain a specific area — most realistically, native-speaker review for one of the AI-translated locales (JA / ES / KO / ZH) — open an issue describing what you'd like to take on.
|
||||
|
||||
Persistent, high-quality contributions over time are the path. There is no application form.
|
||||
|
||||
## Past Maintainers
|
||||
|
||||
None — solo project since v0.1.0.
|
||||
@@ -0,0 +1,15 @@
|
||||
YTDescGen — YouTube Gameplay Description Generator
|
||||
Copyright 2026 poli0981 (https://github.com/poli0981)
|
||||
|
||||
This product includes software developed by poli0981 and contributors.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
see LICENSE for the full terms, or visit:
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
This product was co-developed with the assistance of Anthropic's
|
||||
Claude Code 4.7 Opus (1M context). See DISCLAIMER.md and
|
||||
THIRD_PARTY_NOTICES.md for details.
|
||||
|
||||
Third-party dependencies retain their respective licenses; see
|
||||
THIRD_PARTY_NOTICES.md for the complete attribution list.
|
||||
@@ -0,0 +1,75 @@
|
||||
# Privacy Policy
|
||||
|
||||
**Effective:** 2026-05-14
|
||||
|
||||
YTDescGen is an **offline-first** template engine for generating YouTube video metadata. This document describes what data the application handles, where it lives, and what it never collects.
|
||||
|
||||
## What We Collect
|
||||
|
||||
**Nothing.** The application sends no data to any server controlled by the maintainer.
|
||||
|
||||
There is no analytics provider, no telemetry, no crash reporter, no A/B testing, no advertising network, no behavioral tracking. There is no backend.
|
||||
|
||||
## What Stays on Your Device
|
||||
|
||||
### Web version (GitHub Pages)
|
||||
|
||||
The web build stores your work in your browser's **`localStorage`** only. Keys used:
|
||||
|
||||
| Key prefix | Purpose |
|
||||
| --- | --- |
|
||||
| `ytdesc:editor` | Current editor draft |
|
||||
| `ytdesc:settings` | Theme, default language, accordion state, hashtag preferences |
|
||||
| `ytdesc:profiles` | Saved channel / social / rig profiles |
|
||||
| `ytdesc:presets` | Saved game presets |
|
||||
| `ytdesc:templates` | Saved full-form snapshots |
|
||||
| `ytdesc:history` | Recently generated outputs |
|
||||
| `ytdesc:logs` | Application event log |
|
||||
|
||||
`localStorage` is scoped to the origin and never transmitted. Clearing your browser data, browsing in a private/incognito window, or signing out wipes all of it.
|
||||
|
||||
### Desktop version (Tauri)
|
||||
|
||||
The desktop build uses the operating system's standard application-data directory:
|
||||
|
||||
- **Windows**: `%APPDATA%\com.skullmute.ytdescgen`
|
||||
- **macOS**: `~/Library/Application Support/com.skullmute.ytdescgen`
|
||||
- **Linux**: `~/.config/com.skullmute.ytdescgen`
|
||||
|
||||
The same key set as the web version is stored as JSON files there. Uninstalling the application or deleting that directory removes everything.
|
||||
|
||||
## Third-Party Services
|
||||
|
||||
The application does **not** call third-party APIs at runtime.
|
||||
|
||||
Optional links you may click — donation buttons, store links you paste into a draft, social links you save to your profile — navigate **away** from the application to third-party sites. Those sites have their own privacy policies; the maintainer is not responsible for them.
|
||||
|
||||
YouTube oEmbed, the Steam store API, Twitch helix, and similar services are **not** fetched by this application.
|
||||
|
||||
## Cookies / Local Storage Distinction
|
||||
|
||||
The web version uses **`localStorage`**, not cookies. No cookie is set by the application. GitHub Pages itself may issue a session cookie at the platform level — that is GitHub's, not ours, and is governed by [GitHub's Privacy Statement](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement).
|
||||
|
||||
The first-run consent acknowledgement (added in v0.28.0) is recorded **inside the existing settings record** — a `legalConsentVersion` number plus a local timestamp — not as a separate cookie or storage key. It never leaves your device.
|
||||
|
||||
## Children's Privacy
|
||||
|
||||
This application is not directed at children under 13 and does not knowingly process any personal data from anyone.
|
||||
|
||||
## GDPR / CCPA / Equivalent Rights
|
||||
|
||||
Because no data ever leaves your device:
|
||||
|
||||
- **Right to access**: your data is already accessible — open DevTools → Application → Local Storage on the web, or browse the application-data directory on desktop.
|
||||
- **Right to erasure**: clear your browser's site data (web) or delete the application-data directory / uninstall the app (desktop).
|
||||
- **Right to portability**: use the in-app **Export** action in `Profiles` / `Presets` / `Templates` / `History` / `Logs` to download JSON.
|
||||
- **Right to object / restrict processing**: not applicable — no processing happens off-device.
|
||||
- **Right to know what is sold or shared**: nothing. Nothing is sold or shared.
|
||||
|
||||
## Changes to This Policy
|
||||
|
||||
If this policy changes, the change is committed to the repository under `PRIVACY.md` with the `Effective` date updated. There is no notification mechanism because the application has no way to reach you.
|
||||
|
||||
## Contact
|
||||
|
||||
`lopop05905@proton.me`
|
||||
@@ -1,56 +1,133 @@
|
||||
# 🎮 YTDescGen
|
||||
|
||||
**YouTube Gameplay Description Generator** — A template engine for Gameplay No Commentary channels.
|
||||
**YouTube Gameplay Description Generator** — an offline-first template engine for Gameplay No Commentary YouTube channels.
|
||||
|
||||
Generate YouTube video titles, descriptions, and tags in multiple languages with one click.
|
||||
Generate YouTube titles, descriptions, and tags in six languages with one click. Save channel, rig, and game presets to skip repetitive data entry. Works in the browser (GitHub Pages), as a ~8 MB native desktop app (Windows / macOS / Linux), or as an installable Android APK — all from one Tauri 2 codebase.
|
||||
|
||||
[](./LICENSE)
|
||||
[](./docs/DEVELOPMENT.md)
|
||||
[](https://github.com/poli0981/youtube-generator/releases)
|
||||
[](https://github.com/poli0981/youtube-generator/commits)
|
||||
|
||||
---
|
||||
|
||||
## What is YTDescGen
|
||||
|
||||
YTDescGen is a single-purpose template engine. It does **one** job: turn a small set of structured fields (video type, game name, genres, rig, social links, content warnings, …) into a publish-ready YouTube title + description + tag set.
|
||||
|
||||
It doesn't talk to the YouTube API. It doesn't upload anything. It doesn't track you. There is no server. State lives in your browser's `localStorage` (web) or your OS application-data directory (desktop) — and nowhere else.
|
||||
|
||||
Built for the gameplay no-commentary niche — especially horror / scary games — by someone running the [@SkullMute](https://www.youtube.com/@SkullMute) channel who got tired of pasting the same boilerplate into every video. Released under Apache 2.0 in case it's useful to anyone else.
|
||||
|
||||
## Features
|
||||
|
||||
- **14 video types** — Full Gameplay, Part, Boss Fight, Speedrun, 100%, DLC, and more
|
||||
- **12 languages** — English, Vietnamese, Japanese, Spanish, Korean, Chinese, and more
|
||||
- **25 game genres** — Action, Horror, RPG, FPS, Open World, Souls-like, and more
|
||||
- **Profile system** — Save social/rig/channel info once, reuse forever
|
||||
- **Game presets** — Save game info once, reuse for multi-part series
|
||||
- **Smart tags** — Auto-generated from genre + platform + quality + multilingual
|
||||
- **Character counters** — Real-time limits for title (100), description (5000), tags (500)
|
||||
- **Batch mode** — Generate descriptions for multiple parts at once
|
||||
- **Desktop app** — Windows & macOS via Tauri (~8MB binary)
|
||||
- **Offline** — Full functionality without internet
|
||||
- **20 video types** — Full Gameplay, Part, Boss Fight, Boss No-Hit, Ending, Speedrun, 100%, DLC, NG+, Challenge, Side Quest, Secret, Comparison, Guide, Mods, Collectibles, Livestream, Gacha Quest, Demo, Demo Part.
|
||||
- **6 UI languages** — English, Vietnamese, Japanese, Spanish, Korean, Chinese. *(VI authored by a native speaker; JA / ES / KO / ZH AI-translated — see [DISCLAIMER.md](./DISCLAIMER.md).)*
|
||||
- **40+ game genres** — across action, RPG, FPS, horror, soulslike, indie, simulation, fighting, and more.
|
||||
- **248 content-warning IDs** across 12 groups — spoilers, photosensitive/VFX, audio, dialogue/language, phobias (incl. color phobias), mental health, social phenomena, internet/digital life, sensitive themes (incl. method-specific death/violence and suggestive imagery), horror-specific, playstyle, and gameplay disclosure (mods / cheats / glitches / guide-assisted / educational purpose). Sets viewer expectations before they hit play.
|
||||
- **Profile system** — save channel / social / rig info once, reuse across every video.
|
||||
- **Game presets** — save game name + store links once, reuse across the entire part series.
|
||||
- **Snapshot templates** — save full-form configurations and recall in one click.
|
||||
- **Smart tag generation** — combines genre pool, platform, quality tier, multilingual hooks, and trending terms; auto-dedup and 500-char-limit aware.
|
||||
- **Character counters** — real-time limits for title (100), description (5000), tags (500).
|
||||
- **Batch mode** — generate metadata for all parts of a series in one pass.
|
||||
- **Cross-post captions** — a dedicated **Social** tab re-packages the same YouTube source into short-form captions for **TikTok** (4,000-char), **Instagram Reels**, and **Facebook Reels** — title, rig, content warnings, copyright, thanks, and hashtags (game + genre + curated per-platform popular tags). Single + bulk modes, per-platform character limits with smart overflow trimming, and JSON import/export.
|
||||
- **Desktop app** — Windows, macOS & Linux native binaries via Tauri (~8 MB).
|
||||
- **Android app** — installable, sideloadable `.apk` built from the same Tauri 2 codebase. **Requires Android 11+** (tested 11–16; real-device test on Android 12). Grab it from [Releases](https://github.com/poli0981/youtube-generator/releases) and enable "Install unknown apps" to sideload.
|
||||
- **Mobile-responsive web** — drawer navigation, touch-sized controls, iOS-safe text-input behavior. Tested down to 360 × 640.
|
||||
- **100% offline** — no server, no telemetry, no account. See [PRIVACY.md](./PRIVACY.md).
|
||||
|
||||
## Quick Start
|
||||
|
||||
```bash
|
||||
# Clone
|
||||
git clone https://github.com/poli0981/yt-desc-gen.git
|
||||
git clone https://github.com/poli0981/youtube-generator.git
|
||||
cd yt-desc-gen
|
||||
|
||||
# Install
|
||||
npm install
|
||||
|
||||
# Dev
|
||||
npm run dev
|
||||
|
||||
# Build
|
||||
npm run build
|
||||
npm run dev # web dev server at http://localhost:5173
|
||||
```
|
||||
|
||||
Desktop build (Windows / macOS / Linux):
|
||||
|
||||
```bash
|
||||
npm run tauri:build
|
||||
# Output: src-tauri/target/release/bundle/{msi,deb,dmg,app}
|
||||
```
|
||||
|
||||
Android build (`.apk`) — requires the Android SDK + NDK + a JDK:
|
||||
|
||||
```bash
|
||||
cargo tauri android init # one-time; generates src-tauri/gen/android
|
||||
cargo tauri android build --apk
|
||||
# Output: src-tauri/gen/android/app/build/outputs/apk/universal/release/
|
||||
```
|
||||
|
||||
See [`docs/PACKAGING.md`](./docs/PACKAGING.md#android-apk-packaging) for the SDK/NDK setup and signing steps.
|
||||
|
||||
Full development setup, IDE config, and troubleshooting: see [`docs/DEVELOPMENT.md`](./docs/DEVELOPMENT.md). Vietnamese version: [`docs/i18n/vi/DEVELOPMENT.md`](./docs/i18n/vi/DEVELOPMENT.md).
|
||||
|
||||
## Use Cases
|
||||
|
||||
- **Gameplay no-commentary channels** — the primary target. Default templates assume no voice-over and lean on visual hooks, music attribution, and timestamps.
|
||||
- **Horror / scary-game channels** — the content-warning system is especially deep here (analog horror, liminal spaces, pursuit / chase, entity / SCP-style, body horror, etc.).
|
||||
- **Demo / Early Access playthroughs** — dedicated video types and language-patch / game-version disclosure fields.
|
||||
- **Speedrunners and 100% completionists** — playstyle disclosures, run-type metadata, and difficulty fields.
|
||||
- **Solo creators tired of copy-paste** — profiles and presets exist specifically to eliminate repetitive data entry.
|
||||
|
||||
## Privacy & Offline-First
|
||||
|
||||
Nothing leaves your device. No analytics, no telemetry, no tracking. The web version stores your work in `localStorage`; the desktop version stores it in the OS application-data directory. Clearing site data (web) or uninstalling the app (desktop) wipes everything. Full details in [PRIVACY.md](./PRIVACY.md).
|
||||
|
||||
## Tech Stack
|
||||
|
||||
React 18 • TypeScript • Vite • Tailwind CSS • Zustand • i18next • Tauri 2
|
||||
React 18 · TypeScript (strict) · Vite 8 · Tailwind CSS 3 · Zustand · i18next · Tauri 2 (Rust stable).
|
||||
|
||||
Architecture overview: [`docs/ARCHITECTURE.md`](./docs/ARCHITECTURE.md).
|
||||
|
||||
## Documentation
|
||||
|
||||
| Document | Description |
|
||||
|----------|-------------|
|
||||
| [CLAUDE.md](./CLAUDE.md) | Claude Code instructions & project overview |
|
||||
| [PRD](./docs/PRD.md) | Product Requirements Document |
|
||||
| [Architecture](./docs/ARCHITECTURE.md) | Technical architecture & data flow |
|
||||
| [Features](./docs/FEATURES.md) | Complete feature list |
|
||||
| [Roadmap](./docs/ROADMAP.md) | Development phases & timeline |
|
||||
| [Tech Spec](./docs/TECH-SPEC.md) | Implementation details & configs |
|
||||
| [i18n Guide](./docs/I18N.md) | How to add new languages |
|
||||
| [Packaging](./docs/PACKAGING.md) | Desktop app build guide |
|
||||
| Document | What's in it |
|
||||
| --- | --- |
|
||||
| [Development Guide](./docs/DEVELOPMENT.md) | Toolchain, IDE setup, build commands, troubleshooting. *(Also: [Vietnamese](./docs/i18n/vi/DEVELOPMENT.md).)* |
|
||||
| [Architecture](./docs/ARCHITECTURE.md) | Layer model, data flow, engine design. |
|
||||
| [Features](./docs/FEATURES.md) | Full feature matrix. |
|
||||
| [Content Inventory](./docs/CONTENT-INVENTORY.md) | Every video type, genre, and content warning the editor surfaces. *(Also: [Vietnamese](./docs/i18n/vi/CONTENT-INVENTORY.md).)* |
|
||||
| [Roadmap](./docs/ROADMAP.md) | Development phases. |
|
||||
| [Tech Spec](./docs/TECH-SPEC.md) | Implementation details and configs. |
|
||||
| [i18n Guide](./docs/I18N.md) | Adding new locales. |
|
||||
| [Packaging](./docs/PACKAGING.md) | Tauri desktop + Android release builds and signing. |
|
||||
| [Contributing](./CONTRIBUTING.md) | PR process, commit conventions, auto-ignore rules. |
|
||||
| [Security](./SECURITY.md) | Reporting vulnerabilities. |
|
||||
| [Privacy](./PRIVACY.md) | Data handling (TL;DR: none). |
|
||||
| [Disclaimer](./DISCLAIMER.md) | AI-assistance and translation-quality disclosure. *(Also: [Vietnamese](./docs/i18n/vi/DISCLAIMER.md).)* |
|
||||
| [Terms of Use](./TERMS.md) | Acceptable use and license compliance. |
|
||||
| [Code of Conduct](./CODE_OF_CONDUCT.md) | Contributor Covenant v2.1. |
|
||||
| [Maintainers](./MAINTAINERS.md) | Who runs this. |
|
||||
| [Third-Party Notices](./THIRD_PARTY_NOTICES.md) | Dependency attribution. |
|
||||
| [Changelog](./CHANGELOG.md) | Per-release notes. |
|
||||
|
||||
## Contributing
|
||||
|
||||
PRs welcome — read [CONTRIBUTING.md](./CONTRIBUTING.md) first. Native-speaker corrections to AI-translated locales (JA / ES / KO / ZH) are especially appreciated.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
Licensed under the **[Apache License 2.0](./LICENSE)**. See [`NOTICE`](./NOTICE) for the copyright statement and [`THIRD_PARTY_NOTICES.md`](./THIRD_PARTY_NOTICES.md) for dependency licenses.
|
||||
|
||||
## AI Disclosure
|
||||
|
||||
This project was co-authored with **Anthropic's Claude Code (model 4.7 Opus, 1M-context variant)**. Source code, locale translations, documentation, and CI workflows were generated or edited with AI assistance, then reviewed by the human maintainer (`@poli0981`) before being committed. See [DISCLAIMER.md](./DISCLAIMER.md) for the full disclosure.
|
||||
|
||||
## Channel & Socials
|
||||
|
||||
Reference channel and maintainer links:
|
||||
|
||||
- **YouTube**: [@SkullMute](https://www.youtube.com/@SkullMute)
|
||||
- **X / Twitter**: [@SkullMute0011](https://x.com/SkullMute0011)
|
||||
- **Bluesky**: [skullmute0011.bsky.social](https://bsky.app/profile/skullmute0011.bsky.social)
|
||||
- **Mastodon**: [@skullmute1122@mastodon.social](https://mastodon.social/@skullmute1122)
|
||||
- **Discord** (project / repo): [join](https://discord.gg/2aNR3aVt)
|
||||
- **Discord** (gaming): [join](https://discord.gg/kDM9GMu5vm)
|
||||
- **Steam**: [profile](https://steamcommunity.com/profiles/76561199544666292/)
|
||||
- **Patreon / Ko-fi**: `skullmute`
|
||||
- **Telegram**: `@SkullMute0011` (bot: `@my_skull_bot`)
|
||||
- **Email** (security & private contact): `lopop05905@proton.me`
|
||||
@@ -0,0 +1,50 @@
|
||||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
Only the latest released version of YTDescGen receives security updates. This is a solo open-source project; there are no LTS branches.
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | --------- |
|
||||
| 0.13.x | ✅ |
|
||||
| < 0.13 | ❌ |
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
Please report security issues **privately**. Do not open a public issue.
|
||||
|
||||
**Preferred channels (in order):**
|
||||
|
||||
1. **GitHub Security Advisory** — open a draft advisory in this repository's `Security` tab.
|
||||
2. **Email** — `lopop05905@proton.me` with subject prefix `[SECURITY]`.
|
||||
|
||||
Include:
|
||||
|
||||
- A description of the issue and its potential impact.
|
||||
- Steps to reproduce, ideally a minimal proof-of-concept.
|
||||
- The affected version (`node -p "require('./package.json').version"`).
|
||||
- Whether the issue is already public.
|
||||
|
||||
## Response Timeline
|
||||
|
||||
- **Initial reply**: within 7 days.
|
||||
- **Triage + planned fix**: within 30 days for high-severity issues.
|
||||
- **Disclosure**: coordinated with the reporter after a fix ships, or at most 90 days from initial reply.
|
||||
|
||||
## Scope
|
||||
|
||||
In scope:
|
||||
|
||||
- The web bundle deployed to GitHub Pages.
|
||||
- The Tauri desktop binaries (Windows, macOS, Linux).
|
||||
- CI/CD workflows in `.github/workflows/`.
|
||||
|
||||
Out of scope:
|
||||
|
||||
- Vulnerabilities in third-party dependencies — report those upstream and we'll bump.
|
||||
- Issues requiring physical access to the user's device.
|
||||
- Self-XSS in user-supplied template content (the app deliberately renders user input as plain text in the preview).
|
||||
|
||||
## No Bounty
|
||||
|
||||
This is a solo open-source project. Credit in release notes and a thank-you in `MAINTAINERS.md` is the only reward we can offer.
|
||||
@@ -0,0 +1,67 @@
|
||||
# Terms of Use
|
||||
|
||||
**Effective:** 2026-05-14
|
||||
|
||||
These terms govern your use of YTDescGen — both the web version hosted at the project's GitHub Pages URL and any Tauri desktop binaries distributed under this project.
|
||||
|
||||
## License
|
||||
|
||||
YTDescGen is licensed under the **[Apache License 2.0](./LICENSE)**. You may use, modify, and redistribute it under those terms.
|
||||
|
||||
Apache 2.0 grants a patent license (Section 3) and an irrevocable copyright license (Section 2). It does **not** grant trademark rights — see Section 6 of the LICENSE.
|
||||
|
||||
## Acceptable Use
|
||||
|
||||
You may use YTDescGen for any lawful purpose. You may **not** use it to:
|
||||
|
||||
- Generate content that harasses, threatens, defames, or incites violence against any person or group.
|
||||
- Generate content intended to mislead or impersonate (faked attribution, false sponsor disclosure, deepfake-adjacent metadata).
|
||||
- Generate content that violates any third party's intellectual-property rights (including misleading copyright or licensing claims in descriptions).
|
||||
- Distribute modified versions of YTDescGen in a way that violates Apache-2.0 — e.g. stripping copyright notices, omitting the NOTICE file, falsely indicating endorsement.
|
||||
- Violate applicable law in your jurisdiction, including but not limited to **GDPR** (EU), **CCPA / CPRA** (California), **PIPL** (China), **LGPD** (Brazil), the **Vietnamese Cybersecurity Law**, or equivalent data-protection / cybercrime regulation in your country.
|
||||
- Bypass YouTube's policies on metadata (misleading thumbnails / titles / tags) using the application.
|
||||
|
||||
## GitHub Terms
|
||||
|
||||
If you use the web version hosted on GitHub Pages, your use is also subject to:
|
||||
|
||||
- [GitHub's Terms of Service](https://docs.github.com/en/site-policy/github-terms/github-terms-of-service)
|
||||
- [GitHub's Acceptable Use Policies](https://docs.github.com/en/site-policy/acceptable-use-policies)
|
||||
|
||||
These apply alongside this document; in case of conflict, GitHub's policies govern the hosted artifact.
|
||||
|
||||
## No Warranty
|
||||
|
||||
See [DISCLAIMER.md](./DISCLAIMER.md) and `LICENSE` §§ 7–8. The software is provided **as-is** with no warranty of any kind, express or implied.
|
||||
|
||||
## Generated Content
|
||||
|
||||
YTDescGen produces text intended to be pasted into YouTube descriptions. **You — the operator pasting that text — are solely responsible for**:
|
||||
|
||||
- Confirming the generated description complies with [YouTube's Community Guidelines](https://www.youtube.com/howyoutubeworks/policies/community-guidelines/) and [YouTube's Terms of Service](https://www.youtube.com/static?template=terms).
|
||||
- Disclosing paid promotions, sponsorships, and any AI-generated portions per YouTube's monetization and disclosure rules.
|
||||
- Not including misleading information, copyright-infringing material, or any prohibited content listed in YouTube's policies.
|
||||
- Truthful representation of run-type, difficulty, blind status, mod / cheat usage, and similar disclosures the application optionally exposes.
|
||||
|
||||
## Contributions
|
||||
|
||||
By submitting a contribution (issue, pull request, comment, locale translation, screenshot, log dump), you agree:
|
||||
|
||||
1. Your contribution is licensed under Apache 2.0, the same as the project.
|
||||
2. You have the right to grant that license (you wrote it, or it's compatibly licensed and credited).
|
||||
3. You will not include malicious code or knowingly vulnerable dependencies.
|
||||
4. You will follow the [Code of Conduct](./CODE_OF_CONDUCT.md) and [Contributing Guide](./CONTRIBUTING.md).
|
||||
|
||||
Violations may result in your contribution being closed and, in severe cases, a permanent ban from the repository — see `CONTRIBUTING.md` § "Auto-ignored Contributions".
|
||||
|
||||
## Termination
|
||||
|
||||
These terms remain in effect for as long as you use the software. Your rights under Apache 2.0 are perpetual subject to that license's termination clauses (notably § 3 patent retaliation).
|
||||
|
||||
## Changes
|
||||
|
||||
Updates to these terms are committed under `TERMS.md` with the `Effective` date updated. Continued use of the software after a change constitutes acceptance.
|
||||
|
||||
## Contact
|
||||
|
||||
`lopop05905@proton.me`
|
||||
@@ -0,0 +1,79 @@
|
||||
# Third-Party Notices
|
||||
|
||||
YTDescGen incorporates the following third-party software. Each dependency retains its own license; consult the linked project page for the full text of each license.
|
||||
|
||||
## Runtime Dependencies (web bundle)
|
||||
|
||||
| Package | Version | License | Project |
|
||||
| --- | --- | --- | --- |
|
||||
| `react` | ^18.3.0 | MIT | <https://github.com/facebook/react> |
|
||||
| `react-dom` | ^18.3.0 | MIT | <https://github.com/facebook/react> |
|
||||
| `react-router-dom` | ^6.26.0 | MIT | <https://github.com/remix-run/react-router> |
|
||||
| `react-i18next` | ^15.0.0 | MIT | <https://github.com/i18next/react-i18next> |
|
||||
| `i18next` | ^23.15.0 | MIT | <https://github.com/i18next/i18next> |
|
||||
| `zustand` | ^4.5.0 | MIT | <https://github.com/pmndrs/zustand> |
|
||||
| `react-hot-toast` | ^2.4.0 | MIT | <https://github.com/timolins/react-hot-toast> |
|
||||
| `lucide-react` | ^0.400.0 | ISC | <https://github.com/lucide-icons/lucide> |
|
||||
| `clsx` | ^2.1.0 | MIT | <https://github.com/lukeed/clsx> |
|
||||
| `@tauri-apps/api` | ^2.11.0 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/tauri> |
|
||||
| `@tauri-apps/plugin-dialog` | ^2.0.0 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/plugins-workspace> |
|
||||
| `@tauri-apps/plugin-fs` | ^2.0.0 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/plugins-workspace> |
|
||||
| `@tauri-apps/plugin-opener` | ^2.0.0 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/plugins-workspace> |
|
||||
| `@tauri-apps/plugin-shell` | ^2.0.0 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/plugins-workspace> |
|
||||
|
||||
## Build / Dev Dependencies
|
||||
|
||||
| Package | Version | License | Project |
|
||||
| --- | --- | --- | --- |
|
||||
| `vite` | ^7.3.3 | MIT | <https://github.com/vitejs/vite> |
|
||||
| `@vitejs/plugin-react` | ^4.3.0 | MIT | <https://github.com/vitejs/vite-plugin-react> |
|
||||
| `typescript` | ^5.5.0 | Apache-2.0 | <https://github.com/microsoft/TypeScript> |
|
||||
| `tsx` | ^4.16.0 | MIT | <https://github.com/privatenumber/tsx> |
|
||||
| `tailwindcss` | ^3.4.0 | MIT | <https://github.com/tailwindlabs/tailwindcss> |
|
||||
| `prettier-plugin-tailwindcss` | ^0.6.0 | MIT | <https://github.com/tailwindlabs/prettier-plugin-tailwindcss> |
|
||||
| `postcss` | ^8.5.14 | MIT | <https://github.com/postcss/postcss> |
|
||||
| `autoprefixer` | ^10.4.0 | MIT | <https://github.com/postcss/autoprefixer> |
|
||||
| `eslint` | ^9.0.0 | MIT | <https://github.com/eslint/eslint> |
|
||||
| `@eslint/js` | ^9.0.0 | MIT | <https://github.com/eslint/eslint> |
|
||||
| `eslint-plugin-react-hooks` | ^5.0.0 | MIT | <https://github.com/facebook/react> |
|
||||
| `typescript-eslint` | ^8.0.0 | MIT | <https://github.com/typescript-eslint/typescript-eslint> |
|
||||
| `prettier` | ^3.3.0 | MIT | <https://github.com/prettier/prettier> |
|
||||
| `vitest` | ^3.2.4 | MIT | <https://github.com/vitest-dev/vitest> |
|
||||
| `@testing-library/react` | ^16.0.0 | MIT | <https://github.com/testing-library/react-testing-library> |
|
||||
| `@testing-library/jest-dom` | ^6.4.0 | MIT | <https://github.com/testing-library/jest-dom> |
|
||||
| `@types/react` | ^18.3.0 | MIT | DefinitelyTyped |
|
||||
| `@types/react-dom` | ^18.3.0 | MIT | DefinitelyTyped |
|
||||
|
||||
## Tauri Desktop (Rust crates)
|
||||
|
||||
| Crate | Version | License | Project |
|
||||
| --- | --- | --- | --- |
|
||||
| `tauri` | ^2 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/tauri> |
|
||||
| `tauri-build` | ^2 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/tauri> |
|
||||
| `tauri-plugin-dialog` | ^2 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/plugins-workspace> |
|
||||
| `tauri-plugin-fs` | ^2 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/plugins-workspace> |
|
||||
| `tauri-plugin-opener` | ^2 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/plugins-workspace> |
|
||||
| `tauri-plugin-shell` | ^2 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/plugins-workspace> |
|
||||
| `tauri-plugin-single-instance` | ^2 | Apache-2.0 OR MIT | <https://github.com/tauri-apps/plugins-workspace> |
|
||||
| `serde` | ^1 | Apache-2.0 OR MIT | <https://github.com/serde-rs/serde> |
|
||||
| `serde_json` | ^1 | Apache-2.0 OR MIT | <https://github.com/serde-rs/json> |
|
||||
|
||||
Transitive dependencies are not enumerated here. `cargo tree` (in `src-tauri/`) and `npm list --all` produce the exhaustive trees; this list covers the direct dependencies declared in `package.json` and `src-tauri/Cargo.toml`.
|
||||
|
||||
## Fonts & Icons
|
||||
|
||||
The application uses **system fonts** (`Inter` / `SF Pro` / `Segoe UI` / `Roboto`, fallback `sans-serif`). No custom font files are bundled in the web build.
|
||||
|
||||
Icons are provided by [`lucide-react`](https://github.com/lucide-icons/lucide) (ISC license — see above).
|
||||
|
||||
## AI-Assisted Development Disclosure
|
||||
|
||||
Per [`DISCLAIMER.md`](./DISCLAIMER.md), this project was co-authored with **Anthropic's Claude Code (model 4.7 Opus, 1M-context variant)**. The model contributed to source code, locale translations, documentation, and CI configuration. All output was reviewed by the human maintainer (`@poli0981`) before being committed.
|
||||
|
||||
No third-party content was reproduced verbatim from the model's training data. Any external text quoted in this repository (notably the Apache License 2.0 in [`LICENSE`](./LICENSE) and the Contributor Covenant link in [`CODE_OF_CONDUCT.md`](./CODE_OF_CONDUCT.md)) is sourced from canonical public locations.
|
||||
|
||||
Claude is a product of Anthropic, PBC — <https://www.anthropic.com>. No license is granted by Anthropic to use this project; the Apache 2.0 license in `LICENSE` is granted by `@poli0981` as the project author.
|
||||
|
||||
## Reporting an Omission
|
||||
|
||||
If you believe a dependency is missing from this list, please open an issue or PR per [`CONTRIBUTING.md`](./CONTRIBUTING.md).
|
||||
@@ -46,6 +46,14 @@
|
||||
└──────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
**Error pages (v0.27):** `components/errors/` holds a reusable `ErrorPage`
|
||||
(404/403/419/500/offline/runtime) driven by the pure `config/error-pages.ts`
|
||||
map. The dedicated error routes (`/403`, `/419`, `/500`, `/offline`, catch-all
|
||||
`*`) are declared as **siblings of the `AppShell` route group** in `App.tsx`, so
|
||||
they render full-screen with no Sidebar/Header. `ErrorPage` is router-agnostic
|
||||
(hash anchors + `history.back()`) so the root `ErrorBoundary` — mounted outside
|
||||
`HashRouter` in `main.tsx` — can reuse it as its crash fallback.
|
||||
|
||||
## 2. Core Engine Design
|
||||
|
||||
Engine module chứa toàn bộ logic generate — **zero framework dependency**. Mọi function đều pure: input → string.
|
||||
@@ -254,9 +262,9 @@ Zustand Stores:
|
||||
│ SettingsStore │
|
||||
│ - theme: "dark" | "light" │
|
||||
│ - defaultLanguage: SupportedLanguage │
|
||||
│ - defaultGenre: Genre │
|
||||
│ - autoSaveDraft: boolean │
|
||||
│ Middleware: persist (localStorage) │
|
||||
│ - defaultGenres: GenreId[] │
|
||||
│ - (flags: quality badge / copyright / ...) │
|
||||
│ Middleware: persist (localStorage + file) │
|
||||
└───────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
@@ -278,6 +286,8 @@ i18n/locales/
|
||||
|
||||
**Adding a new language** = 2 JSON files + 1 line registration. See docs/I18N.md.
|
||||
|
||||
**Lazy loading (v0.26+)**: only English is bundled into the main chunk — it is the `fallbackLng` and the engine's bilingual `tEn` translator, both of which must resolve synchronously. Every other language is fetched on first use as a Vite async chunk via `i18next-resources-to-backend` + dynamic `import()`. Generation paths gate on bundle readiness (`useLanguagesReady` hook / `ensureLanguagesLoaded`): an unloaded language would otherwise silently render English fallback output. A chunk that fails to fetch degrades to English and logs to the in-app Log page — it never hangs the UI.
|
||||
|
||||
**UI language vs Output language**: These are independent. User can browse the app in English but generate descriptions in Japanese. UI language follows `SettingsStore.defaultLanguage`, output language follows `EditorStore.language`.
|
||||
|
||||
## 5. Desktop Packaging (Tauri)
|
||||
@@ -313,7 +323,7 @@ Tauri advantages over Electron:
|
||||
|
||||
| What | How to Extend | Files to Touch |
|
||||
|------|--------------|----------------|
|
||||
| New language | Add `locales/{code}/ui.json` + `templates.json`, register in `i18n/index.ts` | 3 files |
|
||||
| New language | Add `locales/{code}/ui.json` + `templates.json`, register in `SUPPORTED_LANGUAGES` (lazy-loaded automatically) | 3 files |
|
||||
| New genre | Add entry to `config/genres.ts`, add tag pool to `engine/tag-generator.ts` | 2 files |
|
||||
| New video type | Add to `config/video-types.ts`, add patterns to all `templates.json` | 1 + N locale files |
|
||||
| New platform/store | Add entry to `config/platforms.ts` | 1 file |
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
# Content Inventory
|
||||
|
||||
A static manifest of every video type, game genre, and content warning surfaced in YTDescGen's editor. Maintained manually — when adding a new option to one of the source files below, **add a row here too** in the same PR.
|
||||
|
||||
This file exists for **transparency** — anyone curious about what the editor can describe (without installing the app or reading the source) can scan it in one minute.
|
||||
|
||||
**Vietnamese mirror:** [`docs/i18n/vi/CONTENT-INVENTORY.md`](./i18n/vi/CONTENT-INVENTORY.md).
|
||||
|
||||
**Source of truth:**
|
||||
- Video types: [`src/config/video-types.ts`](../src/config/video-types.ts)
|
||||
- Game genres: [`src/config/genres.ts`](../src/config/genres.ts)
|
||||
- Content warnings: [`src/config/content-warning-groups.ts`](../src/config/content-warning-groups.ts)
|
||||
|
||||
---
|
||||
|
||||
## 1. Video types (20)
|
||||
|
||||
Each video type drives a dedicated description template + title structure + tag bias. The "Extra fields" column lists fields the editor reveals when this type is selected.
|
||||
|
||||
| Icon | Type | Extra fields |
|
||||
|---|---|---|
|
||||
| 🎮 | Full Gameplay | — |
|
||||
| 📂 | Gameplay Part | Part Number |
|
||||
| 🎬 | Full Demo | — |
|
||||
| 🎞 | Demo Part | Part Number |
|
||||
| 👹 | Boss Fight | Boss Name |
|
||||
| 💀 | Boss No Hit | Boss Name |
|
||||
| 🏁 | Ending / All Endings | — |
|
||||
| ⚡ | Speedrun | — |
|
||||
| 💯 | 100% Completion | — |
|
||||
| 📦 | DLC Content | DLC Name |
|
||||
| 🔄 | New Game+ | — |
|
||||
| 🏆 | Challenge Run | Challenge Name |
|
||||
| 📌 | Side Quests | — |
|
||||
| 🔍 | Secrets / Hidden | — |
|
||||
| ⚖️ | Graphics Comparison | — |
|
||||
| 📘 | Silent Guide | — |
|
||||
| 🧩 | Modded Gameplay | Mod Name |
|
||||
| ⭐ | All Collectibles | — |
|
||||
| 🔴 | Livestream | Live URL, Scheduled Time |
|
||||
| 🎴 | Gacha Quest | Quest Type, Chapter Name, Quest Name, Part Number |
|
||||
|
||||
---
|
||||
|
||||
## 2. Game genres (41)
|
||||
|
||||
Selected genres feed the title format, the tag pool, and (when configured in Settings → Genre Playlists) the pinned-comment recommendation.
|
||||
|
||||
Bulk-select groups available in the editor: **All RPGs** (rpg + jrpg + action_rpg + crpg), **All Shooters** (fps + arena_shooter + tactical_fps + boomer_shooter + extraction_shooter + shmup), **All Horror** (horror + survival_horror + psychological_horror).
|
||||
|
||||
| Icon | Genre |
|
||||
|---|---|
|
||||
| ⚔️ | Action / Adventure |
|
||||
| 🗡 | Hack & Slash |
|
||||
| 👊 | Beat 'em Up |
|
||||
| 🦘 | Platformer |
|
||||
| 👻 | Horror / Survival |
|
||||
| 🧟 | Survival Horror |
|
||||
| 🧠 | Psychological Horror |
|
||||
| 🛡 | RPG |
|
||||
| 🎎 | JRPG |
|
||||
| 🏹 | Action RPG |
|
||||
| 📜 | CRPG / Isometric |
|
||||
| 🔫 | FPS / Shooter |
|
||||
| 🎯 | Arena Shooter |
|
||||
| 🎖 | Tactical FPS |
|
||||
| 💥 | Boomer Shooter |
|
||||
| 🎒 | Extraction Shooter |
|
||||
| 🛸 | SHMUP / Bullet Hell |
|
||||
| 🌍 | Open World / Sandbox |
|
||||
| 🕹 | Indie |
|
||||
| 💀 | Souls-like |
|
||||
| 🏎 | Racing / Sports |
|
||||
| 📖 | Story / Narrative |
|
||||
| 🏗 | Simulation / Strategy |
|
||||
| 🏙 | City Builder |
|
||||
| 🥊 | Fighting |
|
||||
| 🥷 | Stealth / Espionage |
|
||||
| ⛏ | Survival / Crafting |
|
||||
| 🎲 | Roguelike / Roguelite |
|
||||
| 🗺 | Metroidvania |
|
||||
| 🌐 | MMO / Online |
|
||||
| 🎵 | Rhythm / Music |
|
||||
| 🧩 | Puzzle |
|
||||
| 🏰 | Tower Defense |
|
||||
| 🃏 | Card Game |
|
||||
| 🎴 | Deck Builder |
|
||||
| 🤖 | Auto Battler |
|
||||
| 🏆 | Battle Royale |
|
||||
| ♟ | Tactical / Turn-based |
|
||||
| 🚀 | Space / Sci-Fi |
|
||||
| 🌾 | Farming / Life Sim |
|
||||
| 🎬 | FMV / Interactive Movie |
|
||||
| 💬 | Visual Novel |
|
||||
|
||||
---
|
||||
|
||||
## 3. Content warnings (248, grouped)
|
||||
|
||||
Selected warnings are appended to a `⚠ CONTENT WARNINGS` block in the description, ahead of timestamps. Each group is collapsible in the editor; warnings render in description order = user's selection order.
|
||||
|
||||
### Spoilers (6)
|
||||
|
||||
Story / ending spoilers · Ending spoilers · True-ending spoilers · Post-game / NG+ spoilers · Secret-ending spoilers · DLC story spoilers
|
||||
|
||||
### Photosensitive / Health (13)
|
||||
|
||||
Flashing lights · Motion sickness · Migraine trigger · Strobe lighting · Heavy screen shake · Lens flare / sun glare · Excessive bloom / overblown highlights · Dense particle effects · Flashing HUD / UI overlays · Extreme color saturation · Heavy motion blur · Aggressive depth of field · Intense post-processing
|
||||
|
||||
### Audio / Sensory (13)
|
||||
|
||||
Loud / sudden sounds · Ear-piercing / high-pitched · Audio jumpscares · Sudden volume changes · Distorted / clipping audio · Screeching / metallic sounds · Persistent high-pitched tones · Audio glitches / artifacts · Heavy bass / sub-bass rumble · Sustained screaming · Glass breaking / shattering · Mic pops / breath noise · White noise / static
|
||||
|
||||
### Dialogue / Language (10)
|
||||
|
||||
Frequent profanity · Sexual innuendo / suggestive dialogue · Inflammatory / inciting dialogue · Verbal abuse · Threats / intimidation · Slurs / derogatory terms · Crude / toilet humor · Mature / adult humor · Dark / morbid humor · Drug / alcohol references
|
||||
|
||||
### Phobias (56)
|
||||
|
||||
Jumpscares · Heights (acrophobia) · Holes / clusters (trypophobia) · Deep water (thalassophobia) · Confined spaces (claustrophobia) · Spiders (arachnophobia) · Insects (entomophobia) · Snakes (ophidiophobia) · Dogs (cynophobia) · Darkness (nyctophobia) · Fire (pyrophobia) · Dolls (pediophobia) · Blood (hemophobia) · Clowns (coulrophobia) · Drowning / water immersion (ablutophobia) · Live burial (taphophobia) · Animatronics / mannequins (automatonophobia) · Large objects (megalophobia) · Submerged man-made objects (submechanophobia) · Corpses (necrophobia) · Ghosts (spectrophobia) · Demons (demonophobia) · Sharks (selachophobia) · Germs / contamination (mysophobia) · Vomiting (emetophobia) · Being watched (scopophobia) · Isolation (monophobia) · Mice / rats (musophobia) · Bats (chiroptophobia) · Birds (ornithophobia) · Fish (ichthyophobia) · Reptiles (herpetophobia) · Cockroaches (katsaridaphobia) · Bees / wasps (apiphobia) · Thunder / lightning (astraphobia) · Open spaces (agoraphobia) · Crowds (enochlophobia) · Snow / extreme cold (chionophobia) · Hospitals (nosocomephobia) · Sharp objects (aichmophobia) · Choking / suffocation (pnigophobia) · Fog / mist (homichlophobia) · Tornadoes / hurricanes (lilapsophobia) · Heavy rain (ombrophobia) · Clouds (nephophobia) · Strong wind (ancraophobia) · Extreme cold (cryophobia) · Sunlight (heliophobia) · Large waves (cymophobia) · Lakes / still water (limnophobia) · Rivers / currents (potamophobia) · Colors / vivid color scenes (chromophobia) · Red / all-red scenes (erythrophobia) · Yellow color (xanthophobia) · White / all-white spaces (leukophobia) · Black color (melanophobia)
|
||||
|
||||
### Mental health (17)
|
||||
|
||||
Anxiety-inducing scenes · Depression themes · Eating disorders · Substance use · Self-harm / suicide · PTSD content · Needles · Body fluids · Pregnancy / birth horror · Illness / infection · Bipolar themes · OCD themes · Panic attacks · Dissociation · Paranoia · Intrusive thoughts · Medical horror
|
||||
|
||||
### Social phenomena (22)
|
||||
|
||||
Autism / neurodivergence themes · ADHD / executive dysfunction · Hikikomori / social withdrawal · NEET themes · Social anxiety themes · Social isolation / loneliness · Schizophrenia / psychosis · Burnout / overwork · Survivor guilt · Abandonment themes · Parasocial relationships · Gaslighting · Stockholm syndrome · Gaming / gambling addiction · Existential / nihilistic themes · Impostor syndrome · Midlife crisis · Quarter-life crisis · Workplace harassment · Gender-role pressure · Body shaming / appearance mockery · Unrealistic beauty standards
|
||||
|
||||
### Internet / Digital life (18)
|
||||
|
||||
Cyberbullying / online harassment · Doxxing / privacy exposure · Trolling / griefing · Cancel culture / public shaming · Social media addiction · Doomscrolling · FOMO (fear of missing out) · Fake news / misinformation · Online scams / phishing · Catfishing / fake identity · Deepfakes / synthetic media · Cyberstalking · Dangerous viral challenges · Influencer culture / clout chasing · Online radicalization / echo chambers · Loot boxes / gacha mechanics · AI / artificial intelligence themes · Data privacy / mass surveillance
|
||||
|
||||
### Mature / Sensitive content (66)
|
||||
|
||||
Blood and gore · Mature 18+ · Revealing / skimpy outfits · Partial nudity · Sexualized character designs · Fan service / ecchi · Suggestive poses / camera angles · Disturbing imagery · Animal cruelty · Violence against minors · Domestic violence · Sexual assault references · Torture · Religious themes · War violence · Discrimination · State / police violence · Smoking / drinking · Detailed killing · Cult / occult · Psychological manipulation · Loss / grief · Kidnapping · Hate speech · Historical atrocities · Slavery themes · Terrorism themes · Bullying themes · Human experimentation · Cannibalism · Nuclear / radiation · Homophobia / anti-LGBTQ+ · Transphobia / anti-trans · Xenophobia / anti-foreigner · Political extremism · Religious extremism / fundamentalism · Genocide / ethnic cleansing · Holy war / sectarian conflict · Holocaust themes · Civil war · Mass / school shootings · Colonialism / imperialism · State propaganda · Surveillance / dystopian state · Conspiracy theories · Censorship themes · Ethnic / racial conflict · Refugee crisis · Revolution / uprising · Political assassination · Coup d'état · Inquisition / religious persecution · Forced labor · Ultranationalism · Hanging / strangulation · Drowning scene · Burning alive / immolation · Asphyxiation / suffocation · Bound / restrained victim · Public execution · Decapitation · Impalement · Mass-casualty event · Vehicular violence · Overdose scene · Falling from height (intentional)
|
||||
|
||||
### Heavy horror (12)
|
||||
|
||||
Eyes / eyeball clusters · Body horror (flesh distortion) · Distorted / mutilated faces · Cosmic / eldritch horror · Extreme gore / dismemberment · Decay, rot, maggots · Mutilation / amputation · Liminal spaces · Analog horror / VHS · Unreality / distortion · Pursuit / chase · Entity / SCP horror
|
||||
|
||||
### Playstyle disclosures (10)
|
||||
|
||||
Blind playthrough · No spoilers in chat · Casual / story mode · Hardcore / max difficulty · Permadeath / Iron Man · Speedrun attempt · 100% completionist · Still learning mechanics · First time playing · Returning / NG+
|
||||
|
||||
### Gameplay disclosure (5)
|
||||
|
||||
Mods used · Cheats / debug · Glitches used · Guide-assisted · Educational / PSA purpose
|
||||
|
||||
---
|
||||
|
||||
## 4. Maintenance
|
||||
|
||||
When adding a new item to any of the source files:
|
||||
|
||||
1. **Video types** → append to [`src/config/video-types.ts`](../src/config/video-types.ts) AND add a row in section 1 above.
|
||||
2. **Genres** → append to [`src/config/genres.ts`](../src/config/genres.ts) AND add a row in section 2.
|
||||
3. **Content warnings** → append to the relevant group in [`src/config/content-warning-groups.ts`](../src/config/content-warning-groups.ts) AND add the label to the right group in section 3 — keep the group count in the heading accurate.
|
||||
4. Update the Vietnamese mirror at [`docs/i18n/vi/CONTENT-INVENTORY.md`](./i18n/vi/CONTENT-INVENTORY.md) in the same PR.
|
||||
|
||||
Mismatch between this file and the source files is treated as a documentation bug — open an issue or PR.
|
||||
@@ -0,0 +1,147 @@
|
||||
# Development Guide
|
||||
|
||||
This guide covers setting up YTDescGen for local development on Windows, macOS, or Linux. The application is a Vite/React web app with an optional Tauri desktop shell.
|
||||
|
||||
## Reference Workstation
|
||||
|
||||
The reference workstation used to develop and ship this project:
|
||||
|
||||
| Component | Spec |
|
||||
| --- | --- |
|
||||
| OS | Windows 11 Pro (24H2 or newer) |
|
||||
| CPU | Modern x86-64 — 6+ cores with AVX2 (Intel 11th-gen / AMD Zen 3 or newer) |
|
||||
| GPU | Discrete or integrated — Tauri's WebView2 backend runs fine on iGPU |
|
||||
| RAM | 16 GB minimum, 32 GB recommended for parallel typecheck + dev server |
|
||||
| Storage | 5 GB free for `node_modules` + Cargo `target/` after a full Tauri build |
|
||||
| Display | 1920×1080 minimum; mobile-responsive layout tested down to 360×640 |
|
||||
|
||||
macOS and Linux work for development. Tauri release builds are cross-compiled or run on dedicated CI runners — see [PACKAGING.md](./PACKAGING.md).
|
||||
|
||||
## Toolchain
|
||||
|
||||
Install in this order:
|
||||
|
||||
| Tool | Version | Why |
|
||||
| --- | --- | --- |
|
||||
| **Node.js** | `>= 22.12.0` | Vite 8 requires Node `^20.19` or `>= 22.12`. Use [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm). |
|
||||
| **npm** | bundled with Node 22 | The project uses npm; `pnpm` and `yarn` are not tested. |
|
||||
| **Rust** | stable, `>= 1.78` | Required for the Tauri desktop build. Install via [rustup](https://rustup.rs/). |
|
||||
| **Python** | `3.12` | Optional — only needed for some Tauri platform tooling on Windows. |
|
||||
| **Tauri prerequisites** | per OS | See <https://v2.tauri.app/start/prerequisites/>. |
|
||||
|
||||
### Windows specifics
|
||||
|
||||
- Install **Visual Studio Build Tools 2022** with the "Desktop development with C++" workload (required by `tauri-build`).
|
||||
- Install the **WebView2 Runtime** (usually pre-installed on Windows 11).
|
||||
- Long path support: `git config --global core.longpaths true`.
|
||||
|
||||
### macOS specifics
|
||||
|
||||
- Install Xcode Command Line Tools: `xcode-select --install`.
|
||||
|
||||
### Linux specifics
|
||||
|
||||
- Install per-distro Tauri prerequisites — `libwebkit2gtk-4.1-dev`, `libappindicator3-dev`, etc. See the Tauri docs linked above.
|
||||
|
||||
## IDE Setup
|
||||
|
||||
The reference workflow uses **JetBrains 2026.x** IDEs (WebStorm or RustRover) as primary, with **VS Code** for quick edits.
|
||||
|
||||
### JetBrains (WebStorm / RustRover / IntelliJ Ultimate)
|
||||
|
||||
- Enable the **Tailwind CSS** plugin.
|
||||
- Enable the **i18next** plugin (or rely on `src/i18n/locales/_schema.json` for autocomplete).
|
||||
- Settings → Languages → TypeScript → "Use TypeScript from `node_modules/typescript`".
|
||||
- Settings → Code Style → Prettier → Run on save (`src/**/*.{ts,tsx,json,css}`).
|
||||
|
||||
### VS Code
|
||||
|
||||
Recommended extensions (no `.vscode/extensions.json` is committed — install manually):
|
||||
|
||||
- `dbaeumer.vscode-eslint`
|
||||
- `esbenp.prettier-vscode`
|
||||
- `bradlc.vscode-tailwindcss`
|
||||
- `rust-lang.rust-analyzer` (if you touch `src-tauri/`)
|
||||
- `tauri-apps.tauri-vscode`
|
||||
|
||||
## First Run
|
||||
|
||||
```bash
|
||||
# 1. Clone
|
||||
git clone https://github.com/poli0981/youtube-generator.git
|
||||
cd youtube-generator
|
||||
|
||||
# 2. Install web dependencies
|
||||
npm install
|
||||
|
||||
# 3. Start the web dev server
|
||||
npm run dev
|
||||
# → http://localhost:5173
|
||||
```
|
||||
|
||||
## Common Commands
|
||||
|
||||
| Command | What it does |
|
||||
| --- | --- |
|
||||
| `npm run dev` | Vite dev server, hot reload, web only. |
|
||||
| `npm run build` | Production web bundle into `dist/`. |
|
||||
| `npm run preview` | Serve the production bundle for sanity-testing. |
|
||||
| `npm run typecheck` | `tsc --noEmit`. Run before every PR. |
|
||||
| `npm run lint` | ESLint. Use `npm run lint:fix` to autofix. |
|
||||
| `npm run format` | Prettier write across `src/`. |
|
||||
| `npm run test` | Vitest watch mode. |
|
||||
| `npm run test:run` | Vitest single-run (for CI / pre-commit). |
|
||||
| `npm run test:coverage` | Coverage report into `coverage/`. |
|
||||
| `npm run validate:locales` | Enforces all 6 locales match `_schema.json` exactly. **Must pass before any locale-touching PR merges.** |
|
||||
| `npm run generate:locale` | Scaffold an empty locale from `_schema.json` for a new language. |
|
||||
| `npm run tauri:dev` | Tauri desktop in dev mode (auto-restarts on Rust or frontend changes). |
|
||||
| `npm run tauri:build` | Tauri release binary for the current platform. |
|
||||
|
||||
## Tauri Desktop Build
|
||||
|
||||
See [PACKAGING.md](./PACKAGING.md) for the full release pipeline. Quick local build:
|
||||
|
||||
```bash
|
||||
npm run tauri:build
|
||||
# Output: src-tauri/target/release/bundle/{msi,deb,dmg,app}
|
||||
```
|
||||
|
||||
The first build takes ~5–10 minutes (cold Cargo cache). Subsequent builds are incremental.
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
### `validate:locales` fails after adding a key
|
||||
|
||||
You forgot to update `src/i18n/locales/_schema.json`. The schema is the source of truth; locales must match it exactly.
|
||||
|
||||
### Tauri build fails with `link.exe not found` (Windows)
|
||||
|
||||
Install Visual Studio Build Tools 2022 + Desktop C++ workload, then restart your shell so the new PATH is picked up.
|
||||
|
||||
### Tauri build fails with `pkg-config not found` (Linux)
|
||||
|
||||
Install the per-distro Tauri prerequisites listed at <https://v2.tauri.app/start/prerequisites/>.
|
||||
|
||||
### `npm install` is slow or hangs
|
||||
|
||||
Disable corporate VPNs / proxies that block the npm registry. The lock file is committed; offline installs work after one successful online install.
|
||||
|
||||
### Hot reload not picking up locale edits
|
||||
|
||||
Locale JSON is bundled at build time, not watched. Restart the dev server after editing `src/i18n/locales/*`.
|
||||
|
||||
Since v0.26, only English ships in the main chunk; the other languages are
|
||||
lazy-loaded async chunks fetched on first use (see `src/i18n/index.ts` and
|
||||
docs/I18N.md). The restart advice above still applies to all of them.
|
||||
|
||||
### Pre-commit hook fails on `validate:locales` but I didn't touch locales
|
||||
|
||||
You probably added a new key to `_schema.json` indirectly via the engine types (`src/engine/types.ts` → `CONTENT_WARNINGS`). New IDs require translations in all 6 locales.
|
||||
|
||||
## See Also
|
||||
|
||||
- [ARCHITECTURE.md](./ARCHITECTURE.md) — layer model, data flow, engine design.
|
||||
- [I18N.md](./I18N.md) — adding new languages step-by-step.
|
||||
- [PACKAGING.md](./PACKAGING.md) — Tauri release builds and signing.
|
||||
- [Top-level CONTRIBUTING.md](../CONTRIBUTING.md) — PR process, commit conventions, auto-ignore rules.
|
||||
- [Top-level SECURITY.md](../SECURITY.md) — reporting vulnerabilities.
|
||||
@@ -4,84 +4,40 @@
|
||||
|
||||
---
|
||||
|
||||
## 🎬 Video Types (14 types)
|
||||
## 🎬 Video Types (20 types)
|
||||
|
||||
| ID | Label (EN) | Label (VI) | Label (JA) | Extra Fields |
|
||||
|----|-----------|------------|------------|--------------|
|
||||
| `full` | Full Gameplay | Full Gameplay | フルゲームプレイ | — |
|
||||
| `part` | Gameplay Part | Gameplay Phần | ゲームプレイ パート | `partNumber` |
|
||||
| `boss` | Boss Fight | Boss Fight | ボス戦 | `bossName` |
|
||||
| `boss_nohit` | Boss No Hit | Boss No Hit | ボス ノーヒット | `bossName` |
|
||||
| `ending` | Ending / All Endings | Kết thúc | エンディング | — |
|
||||
| `speedrun` | Speedrun | Speedrun | スピードラン | — |
|
||||
| `100percent` | 100% Completion | 100% Completion | 100%クリア | — |
|
||||
| `dlc` | DLC Content | Nội dung DLC | DLCコンテンツ | `dlcName` |
|
||||
| `newgame_plus` | New Game+ | New Game+ | 強くてニューゲーム | — |
|
||||
| `challenge` | Challenge Run | Challenge Run | チャレンジラン | `challengeName` |
|
||||
| `side_quest` | Side Quests | Nhiệm vụ phụ | サブクエスト | — |
|
||||
| `secret` | Secrets / Hidden | Bí mật | 隠し要素 | — |
|
||||
| `comparison` | Graphics Comparison | So sánh đồ họa | グラフィック比較 | — |
|
||||
| `guide` | Silent Guide | Hướng dẫn | 攻略ガイド | — |
|
||||
Twenty video types, each driving a dedicated description template, title
|
||||
structure, and tag bias. The complete table — every type with its icon and
|
||||
the extra fields the editor reveals — is in
|
||||
[Content Inventory](./CONTENT-INVENTORY.md).
|
||||
|
||||
## 🌐 Languages (12 languages)
|
||||
## 🌐 Languages (6 shipped)
|
||||
|
||||
All six locales ship today — UI strings and description templates fully
|
||||
translated and parity-validated by `npm run validate:locales`.
|
||||
|
||||
### Launch (Phase 1)
|
||||
| Code | Language | Native Name | Status |
|
||||
|------|----------|-------------|--------|
|
||||
| `en` | English | English | ✅ Ready |
|
||||
| `vi` | Vietnamese | Tiếng Việt | ✅ Ready |
|
||||
| `ja` | Japanese | 日本語 | ✅ Ready |
|
||||
| `en` | English | English | ✅ Shipped |
|
||||
| `vi` | Vietnamese | Tiếng Việt | ✅ Shipped |
|
||||
| `ja` | Japanese | 日本語 | ✅ Shipped |
|
||||
| `es` | Spanish | Español | ✅ Shipped |
|
||||
| `ko` | Korean | 한국어 | ✅ Shipped |
|
||||
| `zh` | Chinese (Simplified) | 简体中文 | ✅ Shipped |
|
||||
|
||||
### Phase 2
|
||||
| Code | Language | Native Name |
|
||||
|------|----------|-------------|
|
||||
| `es` | Spanish | Español |
|
||||
| `ko` | Korean | 한국어 |
|
||||
| `zh` | Chinese (Simplified) | 简体中文 |
|
||||
|
||||
### Phase 3+
|
||||
| Code | Language | Native Name |
|
||||
|------|----------|-------------|
|
||||
| `fr` | French | Français |
|
||||
| `de` | German | Deutsch |
|
||||
| `pt` | Portuguese | Português |
|
||||
| `ru` | Russian | Русский |
|
||||
| `th` | Thai | ภาษาไทย |
|
||||
| `ar` | Arabic | العربية |
|
||||
Further locales (French, German, Portuguese, Russian, Thai, Arabic) are
|
||||
tracked in [Roadmap § 5.3](./ROADMAP.md).
|
||||
|
||||
Each language requires:
|
||||
- `ui.json` — UI labels, buttons, placeholders, error messages
|
||||
- `templates.json` — Title patterns, description sections, CTA text
|
||||
|
||||
## 🎮 Game Genres (25 genres)
|
||||
## 🎮 Game Genres (41 genres)
|
||||
|
||||
| ID | Label | Icon | Tag Keywords (sample) |
|
||||
|----|-------|------|-----------------------|
|
||||
| `action` | Action / Adventure | ⚔️ | action game, hack and slash, action adventure |
|
||||
| `horror` | Horror / Survival | 👻 | horror game, survival horror, scary game, psychological horror |
|
||||
| `rpg` | RPG / JRPG | 🛡 | RPG, JRPG, action RPG, turn based RPG |
|
||||
| `fps` | FPS / Shooter | 🔫 | FPS, shooter, tactical shooter, third person shooter |
|
||||
| `openworld` | Open World / Sandbox | 🌍 | open world, sandbox, free roam, exploration |
|
||||
| `indie` | Indie / Platformer | 🕹 | indie game, platformer, pixel art |
|
||||
| `soulslike` | Souls-like | 💀 | souls like, soulsborne, boss fight, no death run |
|
||||
| `racing` | Racing / Sports | 🏎 | racing game, driving sim, sports game |
|
||||
| `story` | Story / Visual Novel | 📖 | story game, visual novel, narrative game, interactive drama |
|
||||
| `simulation` | Simulation / Strategy | 🏗 | simulation, city builder, management, tycoon |
|
||||
| `fighting` | Fighting | 🥊 | fighting game, combo, versus, arcade |
|
||||
| `stealth` | Stealth / Espionage | 🥷 | stealth game, stealth gameplay, infiltration |
|
||||
| `survival_craft` | Survival / Crafting | 🏕 | survival game, crafting, base building |
|
||||
| `mmo` | MMO / Online | 🌐 | MMO, MMORPG, online game, multiplayer |
|
||||
| `rhythm` | Rhythm / Music | 🎵 | rhythm game, music game, beat game |
|
||||
| `puzzle` | Puzzle | 🧩 | puzzle game, brain teaser, logic game |
|
||||
| `roguelike` | Roguelike / Roguelite | 🎲 | roguelike, roguelite, procedural, permadeath |
|
||||
| `metroidvania` | Metroidvania | 🗺 | metroidvania, exploration, ability unlock |
|
||||
| `tower_defense` | Tower Defense | 🏰 | tower defense, TD game, strategy |
|
||||
| `card_game` | Card / Deck Builder | 🃏 | card game, deck builder, TCG |
|
||||
| `battle_royale` | Battle Royale | 🏆 | battle royale, last man standing, BR |
|
||||
| `crpg` | CRPG / Isometric | 📜 | CRPG, isometric RPG, classic RPG |
|
||||
| `tactical` | Tactical / Turn-based | ♟ | tactical, turn based strategy, XCOM-like |
|
||||
| `space` | Space / Sci-Fi | 🚀 | space game, sci-fi, space exploration |
|
||||
| `farming` | Farming / Life Sim | 🌾 | farming sim, life sim, cozy game |
|
||||
Forty-one genres feed the title format, the tag pool, and (when configured
|
||||
in Settings → Genre Playlists) the pinned-comment playlist recommendation.
|
||||
The complete list — with icons and bulk-select groups — is in
|
||||
[Content Inventory](./CONTENT-INVENTORY.md).
|
||||
|
||||
## 🛒 Store Platforms (9 platforms)
|
||||
|
||||
@@ -143,16 +99,44 @@ Mỗi ngôn ngữ có description structure như sau (tất cả sections option
|
||||
4. ─── Store Links ─── (if any platform link provided)
|
||||
5. ─── Video Settings ─── (resolution / FPS / graphics)
|
||||
6. ─── My Rig ─── (if any rig field provided)
|
||||
7. ─── Spoiler Warning ─── (if toggled)
|
||||
8. ─── 18+ Warning ─── (if toggled)
|
||||
9. ─── Donate Links ─── (if any provided)
|
||||
10. ─── Social Links ─── (if any provided)
|
||||
11. ─── Playlist Link ─── (if provided)
|
||||
12. ─── Contact Email ─── (if provided)
|
||||
13. CTA line (Like / Subscribe / Share)
|
||||
14. Hashtags (3 max, auto-generated)
|
||||
7. ─── Content Warnings ─── (if any selected — 248 IDs across 12 groups)
|
||||
8. ─── Donate Links ─── (if any provided)
|
||||
9. ─── Social Links ─── (if any provided)
|
||||
10. ─── Playlist Link ─── (if provided)
|
||||
11. ─── Contact Email ─── (if provided)
|
||||
12. CTA line (Like / Subscribe / Share)
|
||||
13. Hashtags (3 max, auto-generated)
|
||||
```
|
||||
|
||||
## 🔁 Cross-Post Captions (Social tab)
|
||||
|
||||
A dedicated **Social** tab re-packages the same editor source that drives the
|
||||
YouTube description into short-form captions for other platforms — no
|
||||
re-typing. Each caption is derived live from the current form.
|
||||
|
||||
| Platform | Caption limit | Popular hashtags appended |
|
||||
|----------|--------------|----------------------------|
|
||||
| TikTok | 4,000 | `#fyp #foryou #foryoupage #gaming #gamingtiktok #gameplay #gamer` |
|
||||
| Instagram Reels | 2,200 | `#reels #reelsinstagram #gaming #gamingreels #gamer #instagaming #videogames` |
|
||||
| Facebook Reels | 2,200 | `#reels #facebookreels #fbreels #gaming #gameplay #gamingcommunity #videogames` |
|
||||
|
||||
Each caption pulls, in order: **Title** (quality badge suppressed for
|
||||
short-form), **My Rig**, **Content Warnings**, **Thanks / sponsor credit**,
|
||||
**Copyright**, and **hashtags** (game + primary genre + the curated
|
||||
per-platform popular set, deduplicated case-insensitively).
|
||||
|
||||
- **Overflow handling** — when a caption exceeds the platform limit, optional
|
||||
blocks are dropped in priority order (warnings → copyright → thanks → rig).
|
||||
The title and the hashtag line are never dropped, and there is no
|
||||
mid-string truncation.
|
||||
- **Single mode** — platform tabs with a live character counter and
|
||||
over-limit warning.
|
||||
- **Bulk mode** — generate a part range (e.g. Parts 1–10) across selected
|
||||
languages in one pass, reusing the Batch loop.
|
||||
- **Import / Export** — round-trip the generated captions as a typed JSON
|
||||
bundle (`_type: "social"`); import is display-only since captions are
|
||||
derived artifacts (the source round-trips via Profiles / Presets).
|
||||
|
||||
## 🏷 Tag Generation
|
||||
|
||||
### Tag Pools by Category
|
||||
@@ -266,6 +250,58 @@ interface HistoryEntry {
|
||||
| Offline | Full functionality without internet |
|
||||
| Global Hotkey | System-wide hotkey to open app (optional) |
|
||||
|
||||
## 📱 Android App (v0.29)
|
||||
|
||||
An installable, sideloadable `.apk` built from the same Tauri 2 codebase — no
|
||||
separate mobile project. Build with `cargo tauri android build --apk`; see
|
||||
[PACKAGING.md](./PACKAGING.md#android-apk-packaging).
|
||||
|
||||
| Feature | Description |
|
||||
|---------|-------------|
|
||||
| Same codebase | One Tauri 2 project produces web, desktop, and Android |
|
||||
| Min version | Android 11+ (minSdk 30); `targetSdk` 36 (Android 16) |
|
||||
| Tested | Android 11 → 16 (emulators); real device on Android 12 |
|
||||
| Signed APK | Self-signed release APK for sideloading; CI publishes it to GitHub Releases |
|
||||
| Responsive UI | Drawer navigation, touch-sized controls, safe-area insets |
|
||||
| File export | Routed through the WebView download (lands in Downloads) on Android |
|
||||
| Persistence | App-private data dir (`appDataDir()`) + localStorage; works offline |
|
||||
| No tray | Desktop-only tray / single-instance are `#[cfg(desktop)]`-gated out |
|
||||
|
||||
## 🚦 Error Pages & Offline (v0.27)
|
||||
|
||||
A single reusable, fully-localized `ErrorPage` component (`src/components/errors/`)
|
||||
backed by a pure kind→meta config (`src/config/error-pages.ts`). All copy ships
|
||||
in every locale (en/vi/ja/es/ko/zh).
|
||||
|
||||
| Kind | Route | Trigger |
|
||||
|------|-------|---------|
|
||||
| 404 Not found | catch-all `*` | A mistyped / dead hash route (live — was a blank screen before) |
|
||||
| 403 Forbidden | `/#/403` | Designed page, route-reachable for future triggers |
|
||||
| 419 Expired | `/#/419` | Designed page, route-reachable for future triggers |
|
||||
| 500 Server error | `/#/500` | Designed page (covers 408/5xx), route-reachable for future triggers |
|
||||
| Offline | `/#/offline` + banner | `navigator.onLine` flips false |
|
||||
| Runtime crash | — | A render error caught by `ErrorBoundary` (shared `contained` variant) |
|
||||
|
||||
- **Full-screen, no shell** — dedicated error routes render outside `AppShell`
|
||||
(no Sidebar/Header), with Home / Back / (Reload) / Report-a-bug actions.
|
||||
- **Non-blocking offline banner** — a dismissible bottom strip; the app stays
|
||||
fully usable offline, and a toast confirms when the connection returns.
|
||||
|
||||
## ⚖️ Legal & Consent (v0.28)
|
||||
|
||||
A first-run **consent gate** (`src/components/ConsentGate.tsx`, backed by the
|
||||
pure `src/config/legal.ts`) blocks the app until the user reviews the legal
|
||||
documents and ticks one "I agree" checkbox.
|
||||
|
||||
| Aspect | Behaviour |
|
||||
|--------|-----------|
|
||||
| Documents | Terms of Use, Privacy Policy, Disclaimer, License — linked to the GitHub-hosted copies (open in the browser); also surfaced in About → Legal |
|
||||
| Acceptance | One combined checkbox; Continue disabled until checked |
|
||||
| Persistence | Stored in the existing settings record (`legalConsentVersion` + timestamp) — **no cookie, no new storage key** |
|
||||
| Re-prompt | Version-based — only when `CURRENT_TERMS_VERSION` is raised (terms changed); also re-shows in fresh / incognito storage |
|
||||
| Desktop | Same in-app gate on Windows/macOS/Linux, **plus** a license-acceptance page in the Windows MSI/NSIS installer (`bundle.licenseFile`) |
|
||||
| Layout | Full-screen, non-dismissible, theme- and locale-aware (all 6 languages) |
|
||||
|
||||
## 🔌 Future Extension Points
|
||||
|
||||
| Extension | Description | Effort |
|
||||
|
||||
@@ -17,7 +17,7 @@ These are independent: a Vietnamese user can browse the app in Vietnamese (UI) w
|
||||
|
||||
```
|
||||
src/i18n/
|
||||
├── index.ts # i18next initialization + language registration
|
||||
├── index.ts # i18next init + SUPPORTED_LANGUAGES (en eager, others lazy-loaded)
|
||||
├── locales/
|
||||
│ ├── _schema.json # JSON Schema defining all required keys
|
||||
│ ├── en/
|
||||
@@ -206,25 +206,23 @@ cp -r src/i18n/locales/en src/i18n/locales/es
|
||||
### Step 4: Register the language
|
||||
|
||||
```typescript
|
||||
// src/i18n/index.ts — add to SUPPORTED_LANGUAGES
|
||||
// src/i18n/index.ts — add to SUPPORTED_LANGUAGES (the only registration step)
|
||||
export const SUPPORTED_LANGUAGES = [
|
||||
{ id: "en", label: "English", flag: "🇬🇧", nativeName: "English" },
|
||||
{ id: "vi", label: "Vietnamese", flag: "🇻🇳", nativeName: "Tiếng Việt" },
|
||||
{ id: "ja", label: "Japanese", flag: "🇯🇵", nativeName: "日本語" },
|
||||
{ id: "es", label: "Spanish", flag: "🇪🇸", nativeName: "Español" }, // ← Add here
|
||||
] as const;
|
||||
|
||||
// Add resource import
|
||||
import esUI from "./locales/es/ui.json";
|
||||
import esTemplates from "./locales/es/templates.json";
|
||||
|
||||
// Add to i18next resources
|
||||
resources: {
|
||||
// ...existing
|
||||
es: { ui: esUI, templates: esTemplates },
|
||||
}
|
||||
```
|
||||
|
||||
No import or `resources` edits needed (v0.26+): locales are lazy-loaded
|
||||
through a dynamic `import("./locales/<code>/<ns>.json")`, so Vite picks the
|
||||
new files up automatically as async chunks — **the file names must stay
|
||||
exactly `ui.json` and `templates.json`**. Only English is eagerly bundled
|
||||
(it's the `fallbackLng` and the engine's bilingual `tEn` source); don't add
|
||||
static imports for other languages, that would drag them back into the
|
||||
main chunk.
|
||||
|
||||
### Step 5: Add multilingual tag pool
|
||||
|
||||
```typescript
|
||||
|
||||
@@ -27,7 +27,7 @@ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
|
||||
# Tauri CLI
|
||||
cargo install tauri-cli
|
||||
|
||||
# Node.js 20+
|
||||
# Node.js 22+
|
||||
# npm already installed from web development
|
||||
|
||||
# Platform-specific
|
||||
@@ -108,6 +108,15 @@ This creates `src-tauri/` directory.
|
||||
}
|
||||
```
|
||||
|
||||
> **Installer license page (v0.28).** The real `src-tauri/tauri.conf.json`
|
||||
> sets `bundle.licenseFile: "installer-license.txt"` (path relative to
|
||||
> `src-tauri/`). Tauri shows that file as an "accept the terms" page in the
|
||||
> **Windows MSI/NSIS** installers. macOS `.app`/`.dmg` and the Linux packages
|
||||
> have no interactive license step, so they rely on the app's first-run
|
||||
> consent gate instead. If a WiX/MSI build ever rejects the `.txt`, switch to
|
||||
> the per-bundler keys (`bundle.windows.wix.licenseFile` wants `.rtf`,
|
||||
> `bundle.windows.nsis.licenseFile` accepts `.txt`).
|
||||
|
||||
### 3. Rust Backend (src-tauri/src/main.rs)
|
||||
|
||||
```rust
|
||||
@@ -239,49 +248,168 @@ Output locations:
|
||||
|
||||
### GitHub Actions Release
|
||||
|
||||
```yaml
|
||||
# .github/workflows/release-desktop.yml
|
||||
name: Release Desktop
|
||||
The live workflow lives at [.github/workflows/release-desktop.yml](../.github/workflows/release-desktop.yml). Pushing a `v*` tag (e.g. `v0.10.0`) triggers a three-platform matrix build (Windows, macOS ARM, Linux) and uploads each installer to a single draft GitHub Release named `YTDescGen v__VERSION__`. Publish the draft manually after smoke-testing the binaries.
|
||||
|
||||
on:
|
||||
push:
|
||||
tags: ["v*"]
|
||||
Matrix entries:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
| Runner | Target | Output |
|
||||
|---|---|---|
|
||||
| `windows-latest` | `x86_64-pc-windows-msvc` | `.msi`, `.exe` (NSIS) |
|
||||
| `macos-14` | `aarch64-apple-darwin` | `.app.tar.gz` |
|
||||
| `ubuntu-latest` | `x86_64-unknown-linux-gnu` | `.AppImage`, `.deb` |
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
- os: macos-latest
|
||||
target: aarch64-apple-darwin
|
||||
- os: macos-latest
|
||||
target: x86_64-apple-darwin
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: ${{ matrix.target }}
|
||||
- run: npm ci
|
||||
- uses: tauri-apps/tauri-action@v0
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tagName: v__VERSION__
|
||||
releaseName: "YTDescGen v__VERSION__"
|
||||
releaseBody: "See CHANGELOG.md for details."
|
||||
releaseDraft: true
|
||||
Linux runners install `libwebkit2gtk-4.1-dev`, `libgtk-3-dev`, `libayatana-appindicator3-dev`, `librsvg2-dev`, and `patchelf` before building — Tauri's webview + AppImage tooling needs these.
|
||||
|
||||
`fail-fast: false` keeps the other platforms going if one breaks. The `bundleArgs` matrix field is concatenated with `--target ${{ matrix.target }}` and passed through to `tauri build`.
|
||||
|
||||
**macOS notes (v0.9.1+):**
|
||||
- **DMG bundling is skipped** (`--bundles app`). Tauri's DMG bundler runs an AppleScript that flakes intermittently on hosted macOS runners (the headless display can't load Finder fast enough for `osascript` to position icons), so we ship a `.app.tar.gz` instead. Users expand the archive and drag the `.app` into `/Applications`.
|
||||
- **Intel macOS (`macos-13`) is NOT built.** GitHub started deprecating the `macos-13` free runner pool in 2025; jobs queue indefinitely. If Intel support becomes a priority, switch the macos-14 entry's target to `universal-apple-darwin` (Tauri builds both archs and lipos them into one universal binary) — the runner already has the toolchain capacity.
|
||||
|
||||
**Code signing is intentionally skipped** for both Windows and macOS — this is an open-source personal tool, and signing certificates carry recurring cost. End users will see the standard "unverified publisher" / "unidentified developer" prompts on first launch. Document the bypass steps in the release notes if needed.
|
||||
|
||||
**Auto-changelog** (`git-cliff`) is out of scope; release notes come from the tag's annotated message via the default `tauri-action` behaviour. CHANGELOG.md is hand-maintained.
|
||||
|
||||
**Manual re-run:** the workflow accepts `workflow_dispatch` with a `tag` input — `gh workflow run release-desktop.yml -f tag=v0.9.0` rebuilds an existing release without deleting + recreating the tag. Useful when a transient runner failure costs a single arch's binary.
|
||||
|
||||
**Backfill for pre-workflow tags:** `v0.8.0` and `v0.8.1` predate the multi-platform matrix and only have local Windows builds. To attach binaries retroactively, build manually then `gh release create v0.8.0 --notes-file CHANGELOG.md path/to/*.msi …`.
|
||||
|
||||
## Android (.apk) Packaging
|
||||
|
||||
YTDescGen also builds an installable Android APK from the **same** Tauri 2
|
||||
codebase — there is no separate mobile project. Tauri 2 ships Android support;
|
||||
the crate is already `cdylib`/`staticlib` with a `#[cfg_attr(mobile, …)]` entry
|
||||
point, and the Android launcher icons live in `src-tauri/icons/android/`. The
|
||||
desktop-only tray / single-instance / hide-to-tray logic in `src-tauri/src/lib.rs`
|
||||
is gated behind `#[cfg(desktop)]` so the library compiles for Android.
|
||||
|
||||
### Requirements & tested versions
|
||||
|
||||
| | |
|
||||
|---|---|
|
||||
| **Minimum OS** | **Android 11** (API level 30, `minSdk 30`). The APK will not install below this. |
|
||||
| **Target OS** | **Android 16** (API level 36, `targetSdk 36`). |
|
||||
| **Architectures** | Universal APK — `arm64-v8a`, `armeabi-v7a`, `x86`, `x86_64`. |
|
||||
| **Tested** | **Android 11 → 16.** The v0.29.0 build was verified on Android emulators across this range **and on a real device running Android 12** (the maintainer's phone). |
|
||||
|
||||
Where the value lives: `bundle.android.minSdkVersion` in
|
||||
[`src-tauri/tauri.conf.json`](../src-tauri/tauri.conf.json) is the source of
|
||||
truth used by `tauri android init`; the generated
|
||||
`gen/android/app/build.gradle.kts` carries the baked `minSdk = 30` — edit that
|
||||
directly if you change the floor without re-running `init`.
|
||||
|
||||
**Why Android 11 is the floor (rationale):**
|
||||
|
||||
- **Coverage.** Android 11+ accounts for the large majority of active devices in
|
||||
2026 (Android 14/15 alone are the two biggest slices, and 11–13 together still
|
||||
hold a sizeable share). Going lower buys few extra users at growing compat cost.
|
||||
- **A modern, patched WebView.** The app renders entirely in the system WebView,
|
||||
whose minimum is Android 10. On Android 11+ the WebView auto-updates via Google
|
||||
Play, so the rendering/JS engine stays current and patched. This is exactly why
|
||||
the **real-device test on Android 12 worked**, while a *stale* Android-12
|
||||
emulator stuck on WebView 91 showed a black screen (the `crypto.randomUUID`
|
||||
boot crash) — that class of bug is fixed in v0.29.0 and is moot on an
|
||||
up-to-date WebView.
|
||||
- **Security upkeep.** Even though Google's *OS-level* monthly security bulletins
|
||||
for Android 11–13 have ended (Android 12 in 2025, Android 13 in early 2026),
|
||||
Android 11+ keeps receiving security updates for the components that matter to a
|
||||
sandboxed WebView app: Google Play system updates (Project Mainline), Google
|
||||
Play services, and System WebView. Requiring strict OS-bulletin support would
|
||||
mean Android 14+, which would drop more than half of users.
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- **Android SDK** — platform-tools, a platform (e.g. `android-34`/`android-36`), build-tools. Install via Android Studio or the command-line tools.
|
||||
- **Android NDK** — r27 LTS recommended (e.g. `27.3.13750724`).
|
||||
- **JDK 17** — Android Studio's bundled JBR works (`…/Android Studio/jbr`).
|
||||
- **Rust android targets**:
|
||||
```bash
|
||||
rustup target add aarch64-linux-android armv7-linux-androideabi i686-linux-android x86_64-linux-android
|
||||
```
|
||||
|
||||
Set these environment variables before any `android` command (PowerShell shown):
|
||||
|
||||
```powershell
|
||||
$env:ANDROID_HOME = "C:\Users\<you>\AppData\Local\Android\Sdk"
|
||||
$env:NDK_HOME = "C:\Users\<you>\AppData\Local\Android\Sdk\ndk\27.3.13750724"
|
||||
$env:JAVA_HOME = "C:\Jetbrains\Android Studio\jbr" # or any JDK 17
|
||||
```
|
||||
|
||||
### Initialize (one-time)
|
||||
|
||||
```bash
|
||||
cargo tauri android init
|
||||
```
|
||||
|
||||
Generates the Gradle project under `src-tauri/gen/android/` — **committed** to
|
||||
the repo so the signing block and any manifest edits persist. It pulls launcher
|
||||
icons from `src-tauri/icons/android/` and sets `applicationId =
|
||||
com.skullmute.ytdescgen`. Treat `init` as a one-time step: re-running it
|
||||
overwrites hand edits like the signing config below, so only re-run it if a
|
||||
Tauri upgrade requires regenerating the project (then re-apply the signing edit).
|
||||
|
||||
### Signing (one-time)
|
||||
|
||||
Sideloaded APKs must be signed. Create a self-signed release keystore and keep
|
||||
it **outside** the repo:
|
||||
|
||||
```powershell
|
||||
& "$env:JAVA_HOME\bin\keytool.exe" -genkeypair -v `
|
||||
-keystore C:\keys\ytdescgen-release.jks `
|
||||
-keyalg RSA -keysize 2048 -validity 10000 -alias ytdescgen
|
||||
```
|
||||
|
||||
> ⚠️ **Back this keystore up.** If you lose it you can never publish an update
|
||||
> that installs over an existing copy — Android rejects a changed signature.
|
||||
|
||||
Create `src-tauri/gen/android/keystore.properties` (gitignored):
|
||||
|
||||
```properties
|
||||
storeFile=C:/keys/ytdescgen-release.jks
|
||||
storePassword=<store-password>
|
||||
keyAlias=ytdescgen
|
||||
keyPassword=<key-password>
|
||||
```
|
||||
|
||||
`app/build.gradle.kts` carries a `release` `signingConfigs` block that reads this
|
||||
file, guarded by `if (exists())` — a missing keystore yields an *unsigned*
|
||||
release build rather than a hard failure (handy for contributors).
|
||||
|
||||
### Build
|
||||
|
||||
```bash
|
||||
cargo tauri android build --apk
|
||||
# → src-tauri/gen/android/app/build/outputs/apk/universal/release/app-universal-release.apk
|
||||
```
|
||||
|
||||
- `--apk` produces an APK. **Without it Tauri builds an `.aab`** App Bundle for the Play Store, which cannot be sideloaded.
|
||||
- `cargo tauri android build --apk --target aarch64` builds an arm64-only APK (smaller download; covers virtually all modern phones).
|
||||
- The build runs `npm run build` first (the `beforeBuildCommand`), then Gradle. The first build takes several minutes (Rust × up to 4 ABIs + a cold Gradle).
|
||||
- For on-device iteration with hot reload: `cargo tauri android dev`.
|
||||
|
||||
Install on a device: copy the APK over (or `adb install -r <apk>`) and enable
|
||||
"Install unknown apps" for the source app.
|
||||
|
||||
### CI
|
||||
|
||||
[.github/workflows/release-android.yml](../.github/workflows/release-android.yml)
|
||||
builds and signs the APK on a `v*` tag (or `workflow_dispatch`) and attaches it
|
||||
to the same draft GitHub Release as the desktop binaries. It needs four repo
|
||||
secrets:
|
||||
|
||||
| Secret | Value |
|
||||
|---|---|
|
||||
| `ANDROID_KEYSTORE_BASE64` | base64 of the `.jks` (`base64 -w0 ytdescgen-release.jks`) |
|
||||
| `ANDROID_STORE_PASSWORD` | keystore store password |
|
||||
| `ANDROID_KEY_PASSWORD` | key password |
|
||||
| `ANDROID_KEY_ALIAS` | `ytdescgen` |
|
||||
|
||||
### App-level changes for Android
|
||||
|
||||
- **`src-tauri/src/lib.rs`** — tray / single-instance / hide-to-tray / exit-prevention are `#[cfg(desktop)]`; the dialog/fs/opener/shell plugins and the six file commands run on every platform.
|
||||
- **`src-tauri/Cargo.toml`** — `tauri-plugin-single-instance` lives in a desktop-only `[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]` table.
|
||||
- **`src/utils/platform.ts` / `file-ops.ts`** — `IS_MOBILE` routes file export through the WebView blob download on Android (the native save dialog is unreliable under scoped storage). Settings persist via `appDataDir()` (app-private storage) **and** localStorage, both of which work on Android.
|
||||
|
||||
## Auto-Update Flow
|
||||
|
||||
```
|
||||
|
||||
@@ -1,120 +0,0 @@
|
||||
# Product Requirements Document (PRD)
|
||||
|
||||
## YTDescGen — YouTube Gameplay Description Generator
|
||||
|
||||
**Version**: 1.0
|
||||
**Author**: Kokone (skullmute)
|
||||
**Last Updated**: 2026-04-07
|
||||
|
||||
---
|
||||
|
||||
## 1. Problem Statement
|
||||
|
||||
Kênh YouTube Gameplay No Commentary cần tạo title, description, và tags cho mỗi video upload. Quy trình hiện tại:
|
||||
|
||||
1. Mở file template → copy → paste vào YouTube Studio
|
||||
2. Thay thế từng placeholder bằng thông tin game cụ thể
|
||||
3. Tìm và thêm tags phù hợp thể loại
|
||||
4. Lặp lại toàn bộ cho mỗi ngôn ngữ
|
||||
5. Lặp lại toàn bộ cho mỗi video trong series
|
||||
|
||||
**Pain Points:**
|
||||
- Lặp lại thao tác nhập Social/Rig/Channel info mỗi lần
|
||||
- Dễ quên/sai khi thay placeholder
|
||||
- Tags phải nhớ hoặc tra cứu từ file Excel
|
||||
- Không có cách kiểm tra character limit trước khi paste
|
||||
- Multi-language phải làm riêng từng bản
|
||||
- Không tái sử dụng được game info cho multi-part series
|
||||
|
||||
## 2. Solution
|
||||
|
||||
Ứng dụng web (+ desktop) với form-based UI:
|
||||
- Chọn video type, ngôn ngữ, thể loại game
|
||||
- Nhập thông tin một lần → lưu Profile
|
||||
- Nhập game info một lần → lưu Preset cho cả series
|
||||
- Tự động generate title + description + tags
|
||||
- Copy trực tiếp vào clipboard, paste vào YouTube Studio
|
||||
- Hỗ trợ batch mode cho nhiều video cùng game
|
||||
|
||||
## 3. Target Users
|
||||
|
||||
- **Primary**: Bản thân Kokone — kênh Gameplay No Commentary
|
||||
- **Secondary**: Các YouTuber gameplay nhỏ lẻ cùng niche
|
||||
- **Future**: Mở rộng cho community qua GitHub release
|
||||
|
||||
## 4. Core User Stories
|
||||
|
||||
### Must Have (P0)
|
||||
|
||||
| ID | Story | Acceptance Criteria |
|
||||
|----|-------|-------------------|
|
||||
| US-01 | Chọn loại video (Full, Part, Boss, etc.) | UI hiển thị đúng form fields theo loại video đã chọn |
|
||||
| US-02 | Chọn ngôn ngữ output (EN/VI/JA) | Toàn bộ generated output chuyển sang ngôn ngữ đã chọn |
|
||||
| US-03 | Chọn thể loại game | Tags được generate phù hợp thể loại |
|
||||
| US-04 | Nhập game info (tên, platform, store links) | Thông tin được đưa vào title + description đúng vị trí |
|
||||
| US-05 | Nhập timestamps | Timestamps xuất hiện trong description với format YouTube chapters |
|
||||
| US-06 | Nhập Social/Donate links | Links xuất hiện trong description section phù hợp |
|
||||
| US-07 | Nhập Rig info | Rig xuất hiện dưới dạng compact format trong description |
|
||||
| US-08 | Xem preview title + description + tags | Preview cập nhật real-time khi thay đổi input |
|
||||
| US-09 | Copy từng phần (title / desc / tags) | Clipboard chứa đúng nội dung, toast confirm |
|
||||
| US-10 | Copy tất cả | Clipboard chứa title + desc, tags riêng |
|
||||
| US-11 | Hiển thị character count | Description ≤ 5000, Tags ≤ 500, warning khi gần/vượt limit |
|
||||
| US-12 | Toggle Spoiler/18+ warning | Dòng warning xuất hiện/ẩn trong description |
|
||||
|
||||
### Should Have (P1)
|
||||
|
||||
| ID | Story | Acceptance Criteria |
|
||||
|----|-------|-------------------|
|
||||
| US-13 | Lưu Profile (social, rig, channel) | Profile persist qua sessions, load vào form |
|
||||
| US-14 | Lưu Game Preset (tên + store links) | Preset persist, selectable khi tạo video mới |
|
||||
| US-15 | Xem lịch sử generated outputs | Danh sách outputs đã tạo, có thể copy lại |
|
||||
| US-16 | Thêm ngôn ngữ mới dễ dàng | Chỉ cần thêm locale JSON files + register |
|
||||
| US-17 | Thêm thể loại game mới | Chỉ cần thêm entry trong config + tag pool |
|
||||
| US-18 | Import/Export settings | JSON export/import cho profiles + presets |
|
||||
| US-19 | Multi-language output đồng thời | Generate cả 3 ngôn ngữ cùng lúc, mỗi ngôn ngữ 1 tab |
|
||||
|
||||
### Nice to Have (P2)
|
||||
|
||||
| ID | Story | Acceptance Criteria |
|
||||
|----|-------|-------------------|
|
||||
| US-20 | Batch mode cho multi-part series | Nhập game info 1 lần, tạo N videos khác part/timestamps |
|
||||
| US-21 | Desktop app (Windows/macOS) | Tauri binary, hoạt động offline |
|
||||
| US-22 | Custom template editor | Người dùng tự sửa template structure |
|
||||
| US-23 | Keyboard shortcuts | Ctrl+Enter = generate, Ctrl+Shift+C = copy all |
|
||||
| US-24 | Dark/Light theme toggle | Theme persist qua sessions |
|
||||
| US-25 | Auto-save draft | Form state tự lưu, recover khi reload |
|
||||
| US-26 | Tag suggestions từ game name | Gợi ý tag dựa trên tên game + trending |
|
||||
| US-27 | YouTube API integration | Auto-fill qua YouTube Data API (future) |
|
||||
| US-28 | VS Code / IDE extension | Command palette → generate description |
|
||||
|
||||
## 5. Non-Functional Requirements
|
||||
|
||||
| Requirement | Target |
|
||||
|------------|--------|
|
||||
| First Contentful Paint | < 1.5s |
|
||||
| Bundle size (web) | < 500KB gzipped |
|
||||
| Desktop binary size | < 15MB (Tauri) |
|
||||
| Offline support | Full functionality without internet |
|
||||
| Browser support | Chrome 90+, Firefox 90+, Edge 90+ |
|
||||
| Accessibility | WCAG 2.1 Level AA |
|
||||
| Persistence | localStorage (web), file system (desktop) |
|
||||
|
||||
## 6. Out of Scope (v1)
|
||||
|
||||
- YouTube API auto-upload
|
||||
- Thumbnail generation
|
||||
- Video editing integration
|
||||
- Multi-user / team features
|
||||
- Cloud sync between devices
|
||||
- Analytics / tracking
|
||||
- Monetization
|
||||
|
||||
## 7. Success Metrics
|
||||
|
||||
| Metric | Target |
|
||||
|--------|--------|
|
||||
| Time to generate 1 video description | < 2 minutes (vs ~10 minutes manual) |
|
||||
| Error rate (missing fields, wrong format) | 0% — form validates before generate |
|
||||
| Languages supported at launch | 3 (EN, VI, JA) |
|
||||
| Genres supported at launch | 10+ |
|
||||
| Video types supported | 7+ |
|
||||
@@ -51,7 +51,7 @@
|
||||
- [x] editor/ components: StoreLinkEditor, RigEditor, SocialEditor, WarningToggles
|
||||
- [x] editor/ components: QuickPreview
|
||||
- [x] output/ components: OutputPreview, CopyButton, CharCounter, CopyAllBar
|
||||
- [x] layout/ components: AppShell, Header, TabBar
|
||||
- [x] layout/ components: AppShell, Header, Sidebar
|
||||
|
||||
1.7 Pages
|
||||
- [x] EditorPage (form + quick preview)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
```jsonc
|
||||
{
|
||||
"name": "yt-desc-gen",
|
||||
"version": "0.1.0",
|
||||
"version": "0.20.0",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
@@ -317,10 +317,10 @@ jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 22
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- run: npm run typecheck
|
||||
@@ -350,19 +350,19 @@ jobs:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
- uses: actions/checkout@v6
|
||||
- uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: 20
|
||||
node-version: 22
|
||||
cache: npm
|
||||
- run: npm ci
|
||||
- run: npm run build
|
||||
- uses: actions/configure-pages@v5
|
||||
- uses: actions/upload-pages-artifact@v3
|
||||
- uses: actions/configure-pages@v6
|
||||
- uses: actions/upload-pages-artifact@v5
|
||||
with:
|
||||
path: dist
|
||||
- id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
uses: actions/deploy-pages@v5
|
||||
```
|
||||
|
||||
## 5. Testing Strategy
|
||||
|
||||
@@ -0,0 +1,161 @@
|
||||
# Danh mục Nội dung
|
||||
|
||||
Bản kê khai tĩnh cho mọi loại video, thể loại game, và cảnh báo nội dung trong editor của YTDescGen. Cập nhật thủ công — khi thêm mục mới vào một trong các file nguồn dưới đây, **thêm dòng tương ứng vào đây** trong cùng PR.
|
||||
|
||||
File này tồn tại để **minh bạch** — bất kỳ ai tò mò về việc editor có thể mô tả được gì (mà không cần cài app hay đọc source) đều có thể quét trong một phút.
|
||||
|
||||
**Bản gốc tiếng Anh:** [`docs/CONTENT-INVENTORY.md`](../../CONTENT-INVENTORY.md).
|
||||
|
||||
**Nguồn tham chiếu (source of truth):**
|
||||
- Loại video: [`src/config/video-types.ts`](../../../src/config/video-types.ts)
|
||||
- Thể loại game: [`src/config/genres.ts`](../../../src/config/genres.ts)
|
||||
- Cảnh báo nội dung: [`src/config/content-warning-groups.ts`](../../../src/config/content-warning-groups.ts)
|
||||
|
||||
---
|
||||
|
||||
## 1. Loại video (20)
|
||||
|
||||
Mỗi loại video kéo theo một template description, cấu trúc title, và tag bias riêng. Cột "Trường bổ sung" liệt kê các trường editor sẽ hiển thị khi chọn loại video tương ứng.
|
||||
|
||||
| Icon | Loại | Trường bổ sung |
|
||||
|---|---|---|
|
||||
| 🎮 | Gameplay đầy đủ | — |
|
||||
| 📂 | Gameplay theo phần | Số phần |
|
||||
| 🎬 | Demo đầy đủ | — |
|
||||
| 🎞 | Demo theo phần | Số phần |
|
||||
| 👹 | Đấu trùm | Tên trùm |
|
||||
| 💀 | Đấu trùm không trúng đòn | Tên trùm |
|
||||
| 🏁 | Kết thúc / Toàn bộ Ending | — |
|
||||
| ⚡ | Speedrun | — |
|
||||
| 💯 | Hoàn thành 100% | — |
|
||||
| 📦 | Nội dung DLC | Tên DLC |
|
||||
| 🔄 | New Game+ | — |
|
||||
| 🏆 | Thử thách | Tên thử thách |
|
||||
| 📌 | Nhiệm vụ phụ | — |
|
||||
| 🔍 | Bí mật / Ẩn | — |
|
||||
| ⚖️ | So sánh đồ họa | — |
|
||||
| 📘 | Hướng dẫn không lời | — |
|
||||
| 🧩 | Chơi với Mod | Tên Mod |
|
||||
| ⭐ | Toàn bộ vật phẩm sưu tầm | — |
|
||||
| 🔴 | Livestream | URL Live, Thời gian dự kiến |
|
||||
| 🎴 | Nhiệm vụ Gacha | Loại nhiệm vụ, Tên chapter, Tên quest, Số phần |
|
||||
|
||||
---
|
||||
|
||||
## 2. Thể loại game (41)
|
||||
|
||||
Thể loại được chọn ảnh hưởng đến định dạng title, tag pool, và (khi cấu hình ở Settings → Genre Playlists) gợi ý playlist trong pinned comment.
|
||||
|
||||
Các nhóm bulk-select trong editor: **All RPGs** (rpg + jrpg + action_rpg + crpg), **All Shooters** (fps + arena_shooter + tactical_fps + boomer_shooter + extraction_shooter + shmup), **All Horror** (horror + survival_horror + psychological_horror).
|
||||
|
||||
| Icon | Thể loại |
|
||||
|---|---|
|
||||
| ⚔️ | Hành động / Phiêu lưu |
|
||||
| 🗡 | Hack & Slash |
|
||||
| 👊 | Beat 'em Up |
|
||||
| 🦘 | Platformer |
|
||||
| 👻 | Kinh dị / Sinh tồn |
|
||||
| 🧟 | Kinh dị Sinh tồn |
|
||||
| 🧠 | Kinh dị Tâm lý |
|
||||
| 🛡 | RPG |
|
||||
| 🎎 | JRPG |
|
||||
| 🏹 | Action RPG |
|
||||
| 📜 | CRPG / Góc nhìn từ trên |
|
||||
| 🔫 | FPS / Bắn súng |
|
||||
| 🎯 | Bắn súng Arena |
|
||||
| 🎖 | Bắn súng Chiến thuật |
|
||||
| 💥 | Boomer Shooter |
|
||||
| 🎒 | Extraction Shooter |
|
||||
| 🛸 | SHMUP / Bullet Hell |
|
||||
| 🌍 | Thế giới mở / Sandbox |
|
||||
| 🕹 | Indie |
|
||||
| 💀 | Souls-like |
|
||||
| 🏎 | Đua xe / Thể thao |
|
||||
| 📖 | Cốt truyện |
|
||||
| 🏗 | Mô phỏng / Chiến thuật |
|
||||
| 🏙 | Xây thành |
|
||||
| 🥊 | Đối kháng |
|
||||
| 🥷 | Lén lút / Gián điệp |
|
||||
| ⛏ | Sinh tồn / Chế tạo |
|
||||
| 🎲 | Roguelike / Roguelite |
|
||||
| 🗺 | Metroidvania |
|
||||
| 🌐 | MMO / Trực tuyến |
|
||||
| 🎵 | Âm nhạc / Nhịp điệu |
|
||||
| 🧩 | Giải đố |
|
||||
| 🏰 | Tower Defense |
|
||||
| 🃏 | Bài / Card |
|
||||
| 🎴 | Deck Builder |
|
||||
| 🤖 | Auto Battler |
|
||||
| 🏆 | Battle Royale |
|
||||
| ♟ | Chiến thuật theo lượt |
|
||||
| 🚀 | Không gian / Sci-Fi |
|
||||
| 🌾 | Nông trại / Life Sim |
|
||||
| 🎬 | FMV / Phim tương tác |
|
||||
| 💬 | Visual Novel |
|
||||
|
||||
---
|
||||
|
||||
## 3. Cảnh báo nội dung (248, chia nhóm)
|
||||
|
||||
Cảnh báo được chọn sẽ thêm vào khối `⚠ CONTENT WARNINGS` trong description, trước phần timestamp. Mỗi nhóm có thể thu gọn trong editor; cảnh báo hiển thị theo thứ tự người dùng chọn.
|
||||
|
||||
### Spoiler (6)
|
||||
|
||||
Spoiler cốt truyện / ending · Spoiler ending · Spoiler ending thật · Spoiler hậu game / NG+ · Spoiler ending bí mật · Spoiler cốt truyện DLC
|
||||
|
||||
### Sức khỏe / Quang nhạy (13)
|
||||
|
||||
Hiệu ứng chớp sáng · Say game / camera nhanh · Có thể đau nửa đầu · Đèn nhấp nháy · Rung màn hình mạnh · Loé sáng / lens flare · Bloom quá đà / sáng cháy · Hiệu ứng hạt dày đặc · HUD / overlay nhấp nháy · Màu sắc quá rực / loè loẹt · Motion blur nặng · Depth of field gắt · Post-processing đậm đặc
|
||||
|
||||
### Âm thanh / Cảm âm (13)
|
||||
|
||||
Âm thanh đột ngột · Âm chói tai / tần số cao · Jumpscare bằng âm thanh · Thay đổi âm lượng đột ngột · Âm thanh méo / vỡ · Tiếng ken két / kim loại · Tiếng cao kéo dài · Lỗi âm thanh / glitch · Bass nặng / sub-bass rung · Tiếng la hét kéo dài · Tiếng kính vỡ / va đập · Tạp âm mic / tiếng thở · Tiếng nhiễu / tĩnh điện
|
||||
|
||||
### Lời thoại / Ngôn từ (10)
|
||||
|
||||
Văng tục dày đặc · Lời thoại ẩn ý t*nh d*c · Lời thoại kích động · Lăng mạ / sỉ nhục bằng lời · Lời đe dọa / uy hiếp · Từ ngữ miệt thị / xúc phạm · Hài thô tục · Hài người lớn · Hài đen / u tối · Nhắc đến chất kích thích / đồ có cồn
|
||||
|
||||
### Ám ảnh / Phobia (56)
|
||||
|
||||
Jumpscare · Sợ độ cao (acrophobia) · Sợ lỗ / cụm (trypophobia) · Sợ nước sâu (thalassophobia) · Sợ không gian kín (claustrophobia) · Sợ nhện (arachnophobia) · Sợ côn trùng (entomophobia) · Sợ rắn (ophidiophobia) · Sợ chó (cynophobia) · Sợ bóng tối (nyctophobia) · Sợ lửa (pyrophobia) · Sợ búp bê (pediophobia) · Sợ máu (hemophobia) · Sợ chú hề (coulrophobia) · Sợ chết đuối (ablutophobia) · Sợ bị chôn sống (taphophobia) · Hình nhân máy (automatonophobia) · Vật thể khổng lồ (megalophobia) · Vật nhân tạo dưới nước (submechanophobia) · Xác chết (necrophobia) · Ma quỷ (spectrophobia) · Quỷ dữ (demonophobia) · Cá mập (selachophobia) · Vi trùng / ô nhiễm (mysophobia) · Nôn mửa (emetophobia) · Bị nhìn chằm chằm (scopophobia) · Cô lập (monophobia) · Chuột (musophobia) · Dơi (chiroptophobia) · Chim (ornithophobia) · Cá (ichthyophobia) · Bò sát (herpetophobia) · Gián (katsaridaphobia) · Ong (apiphobia) · Sấm sét (astraphobia) · Không gian rộng (agoraphobia) · Đám đông (enochlophobia) · Tuyết / giá lạnh (chionophobia) · Bệnh viện (nosocomephobia) · Vật sắc nhọn (aichmophobia) · Nghẹt thở (pnigophobia) · Sương mù (homichlophobia) · Lốc xoáy / bão (lilapsophobia) · Mưa lớn (ombrophobia) · Mây / trời u ám (nephophobia) · Gió mạnh (ancraophobia) · Cực lạnh (cryophobia) · Ánh nắng gay gắt (heliophobia) · Sóng lớn (cymophobia) · Hồ / nước tĩnh (limnophobia) · Sông / dòng chảy (potamophobia) · Sợ màu sắc / cảnh màu chói (chromophobia) · Sợ màu đỏ / cảnh toàn đỏ (erythrophobia) · Sợ màu vàng (xanthophobia) · Sợ màu trắng / không gian toàn trắng (leukophobia) · Sợ màu đen (melanophobia)
|
||||
|
||||
### Sức khỏe tâm thần (17)
|
||||
|
||||
Cảnh gây lo âu · Trầm cảm · Rối loạn ăn uống · Sử dụng chất kích thích · Tự hại / tự tử · PTSD · Kim tiêm · Dịch cơ thể · Mang thai / sinh nở kinh dị · Bệnh tật / nhiễm trùng · Lưỡng cực · OCD · Hoảng loạn · Phân ly · Hoang tưởng · Suy nghĩ xâm nhập · Y khoa kinh dị
|
||||
|
||||
### Hiện tượng tâm lý — xã hội (22)
|
||||
|
||||
Tự kỷ / thần kinh đa dạng · ADHD / rối loạn tập trung · Hikikomori / ẩn dật xã hội · NEET (không học không làm) · Lo âu xã hội · Cô lập xã hội / cô đơn · Tâm thần phân liệt / loạn thần · Burnout / kiệt sức · Mặc cảm sống sót · Bị bỏ rơi / sang chấn · Quan hệ parasocial · Gaslighting / thao túng · Hội chứng Stockholm · Nghiện game / cờ bạc · Khủng hoảng hiện sinh · Hội chứng kẻ mạo danh · Khủng hoảng tuổi trung niên · Khủng hoảng tuổi 1/4 · Quấy rối nơi làm việc · Áp lực vai trò giới · Miệt thị ngoại hình (body shaming) · Chuẩn mực ngoại hình phi thực tế
|
||||
|
||||
### Internet / Đời sống số (18)
|
||||
|
||||
Bắt nạt / quấy rối qua mạng · Doxxing / phơi bày thông tin cá nhân · Trolling / phá game · Văn hóa tẩy chay / bêu rếu công khai · Nghiện mạng xã hội · Lướt tin tiêu cực vô độ (doomscrolling) · Hội chứng sợ bỏ lỡ (FOMO) · Tin giả / thông tin sai lệch · Lừa đảo trực tuyến / phishing · Giả mạo danh tính trên mạng (catfishing) · Deepfake / nội dung giả mạo bằng AI · Theo dõi / rình rập qua mạng · Trào lưu / thử thách nguy hiểm trên mạng · Văn hóa influencer / câu tương tác · Cực đoan hóa qua mạng / buồng vang thông tin · Loot box / cơ chế gacha · Chủ đề AI / trí tuệ nhân tạo · Riêng tư dữ liệu / giám sát diện rộng
|
||||
|
||||
### Nội dung nhạy cảm / 18+ (66)
|
||||
|
||||
Máu me · 18+ · Trang phục hở hang · Kh*a th*n một phần · Tạo hình nhân vật bị t*nh d*c hóa · Yếu tố fan service · Tư thế / góc quay gợi cảm · Hình ảnh gây khó chịu · B*o h*nh động vật · Trẻ em chịu tác động · B*o h*nh gia đình · Tham chiếu x*m h*i t*nh d*c · Tra tấn · Tôn giáo · Tác động vật lý chiến tranh · Phân biệt đối xử · Tác động vật lý từ chính quyền · Hút thuốc / uống rượu · G*ết người chi tiết · Tà giáo / huyền bí · Thao túng tâm lý · Mất mát / đau buồn · Bắt cóc · Phát ngôn thù hận · Tội ác lịch sử · Nô lệ · Khủng bố · Bắt nạt · Thử nghiệm trên người · Ăn thịt người · Hạt nhân / phóng xạ · Kỳ thị người đồng tính / LGBTQ+ (homophobia) · Kỳ thị người chuyển giới (transphobia) · Bài ngoại (xenophobia) · Cực đoan chính trị · Cực đoan tôn giáo / cuồng tín · Diệt chủng / thanh trừng sắc tộc · Thánh chiến / xung đột tôn giáo · Đại nạn Holocaust · Nội chiến · Xả súng hàng loạt / xả súng trường học · Chủ nghĩa thực dân / đế quốc · Tuyên truyền nhà nước · Nhà nước giám sát / dystopia · Thuyết âm mưu · Kiểm duyệt / cấm phát ngôn · Xung đột sắc tộc / chủng tộc · Khủng hoảng tị nạn · Cách mạng / nổi dậy · Ám sát chính trị · Đảo chính · Toà án dị giáo / săn phù thủy · Lao động cưỡng bức · Chủ nghĩa dân tộc cực đoan · Treo c* / siết c* · Cảnh ch*t đuối · Cảnh thiêu s*ng · Cảnh ngạt th* · Bị trói / cầm tù tra tấn · Cảnh hành quyết công khai · Cảnh chặt đầu · Cảnh đâm xuyên cơ thể · Thương vong hàng loạt · Tác động vật lý bằng phương tiện · Cảnh sử dụng quá liều · Ngã / nhảy từ trên cao
|
||||
|
||||
### Kinh dị nặng (12)
|
||||
|
||||
Mắt / cụm mắt · Body horror (biến dạng cơ thể) · Mặt biến dạng / cắt xén · Kinh dị vũ trụ · Máu me / phân thây cực độ · Phân hủy, thối rữa, dòi bọ · Cắt xẻo / cụt chi · Liminal space · Analog horror / VHS · Phi thực tế / méo mó · Truy đuổi · Thực thể / SCP
|
||||
|
||||
### Thông tin về playstyle (10)
|
||||
|
||||
Lần đầu chơi (blind) · Không spoiler trong chat · Chế độ easy / story · Chế độ khó cao · Permadeath / Iron Man · Thử speedrun · 100% completionist · Đang học cơ chế · Chơi lần đầu · Chơi lại / NG+
|
||||
|
||||
### Thông tin về gameplay (5)
|
||||
|
||||
Dùng mod · Bật cheat / debug · Dùng glitch · Có guide hỗ trợ · Game mục đích giáo dục / tuyên truyền
|
||||
|
||||
---
|
||||
|
||||
## 4. Bảo trì
|
||||
|
||||
Khi thêm mục mới vào bất kỳ file nguồn nào:
|
||||
|
||||
1. **Loại video** → thêm vào [`src/config/video-types.ts`](../../../src/config/video-types.ts) VÀ thêm dòng vào mục 1 ở trên.
|
||||
2. **Thể loại** → thêm vào [`src/config/genres.ts`](../../../src/config/genres.ts) VÀ thêm dòng vào mục 2.
|
||||
3. **Cảnh báo nội dung** → thêm vào nhóm phù hợp ở [`src/config/content-warning-groups.ts`](../../../src/config/content-warning-groups.ts) VÀ thêm label vào đúng nhóm ở mục 3 — giữ số đếm trong tiêu đề chính xác.
|
||||
4. Cập nhật cả bản gốc EN tại [`docs/CONTENT-INVENTORY.md`](../../CONTENT-INVENTORY.md) trong cùng PR.
|
||||
|
||||
Sai lệch giữa file này và file nguồn được xem là lỗi tài liệu — mở issue hoặc PR.
|
||||
@@ -0,0 +1,149 @@
|
||||
# Hướng dẫn phát triển
|
||||
|
||||
> **Lưu ý dịch thuật:** Tiếng Anh là phiên bản chính ([`docs/DEVELOPMENT.md`](../../DEVELOPMENT.md)). Bản tiếng Việt này có thể chậm cập nhật một vài commit.
|
||||
|
||||
Hướng dẫn này bao gồm cách cài đặt YTDescGen để phát triển cục bộ trên Windows, macOS hoặc Linux. Ứng dụng là một web app Vite/React với tùy chọn vỏ desktop Tauri.
|
||||
|
||||
## Cấu hình máy tham chiếu
|
||||
|
||||
Cấu hình máy đã dùng để phát triển và phát hành dự án:
|
||||
|
||||
| Thành phần | Thông số |
|
||||
| --- | --- |
|
||||
| OS | Windows 11 Pro (24H2 trở lên) |
|
||||
| CPU | x86-64 hiện đại — 6 nhân trở lên có AVX2 (Intel gen 11 / AMD Zen 3 hoặc mới hơn) |
|
||||
| GPU | Rời hoặc tích hợp — backend WebView2 của Tauri chạy thoải mái trên iGPU |
|
||||
| RAM | Tối thiểu 16 GB, khuyến nghị 32 GB để chạy song song typecheck + dev server |
|
||||
| Lưu trữ | 5 GB trống cho `node_modules` + `target/` Cargo sau khi build Tauri đầy đủ |
|
||||
| Màn hình | Tối thiểu 1920×1080; layout mobile đã test đến 360×640 |
|
||||
|
||||
macOS và Linux đều dùng được để phát triển. Build release Tauri được cross-compile hoặc chạy trên CI riêng — xem [PACKAGING.md](../../PACKAGING.md).
|
||||
|
||||
## Toolchain
|
||||
|
||||
Cài theo thứ tự:
|
||||
|
||||
| Công cụ | Phiên bản | Lý do |
|
||||
| --- | --- | --- |
|
||||
| **Node.js** | `>= 22.12.0` | Vite 8 yêu cầu Node `^20.19` hoặc `>= 22.12`. Dùng [nvm](https://github.com/nvm-sh/nvm) hoặc [fnm](https://github.com/Schniz/fnm). |
|
||||
| **npm** | đi kèm Node 22 | Dự án dùng npm; `pnpm` và `yarn` chưa test. |
|
||||
| **Rust** | stable, `>= 1.78` | Bắt buộc cho build Tauri. Cài qua [rustup](https://rustup.rs/). |
|
||||
| **Python** | `3.12` | Tùy chọn — chỉ cần cho một số tooling Tauri trên Windows. |
|
||||
| **Tauri prerequisites** | theo OS | Xem <https://v2.tauri.app/start/prerequisites/>. |
|
||||
|
||||
### Windows
|
||||
|
||||
- Cài **Visual Studio Build Tools 2022** với workload "Desktop development with C++" (bắt buộc cho `tauri-build`).
|
||||
- Cài **WebView2 Runtime** (Windows 11 thường đã có sẵn).
|
||||
- Bật long path: `git config --global core.longpaths true`.
|
||||
|
||||
### macOS
|
||||
|
||||
- Cài Xcode Command Line Tools: `xcode-select --install`.
|
||||
|
||||
### Linux
|
||||
|
||||
- Cài Tauri prerequisites theo từng distro — `libwebkit2gtk-4.1-dev`, `libappindicator3-dev`, v.v. Xem docs Tauri ở link trên.
|
||||
|
||||
## Cấu hình IDE
|
||||
|
||||
Quy trình tham chiếu dùng **JetBrains 2026.x** (WebStorm hoặc RustRover) làm IDE chính, **VS Code** cho chỉnh sửa nhanh.
|
||||
|
||||
### JetBrains (WebStorm / RustRover / IntelliJ Ultimate)
|
||||
|
||||
- Bật plugin **Tailwind CSS**.
|
||||
- Bật plugin **i18next** (hoặc dùng `src/i18n/locales/_schema.json` để autocomplete).
|
||||
- Settings → Languages → TypeScript → "Use TypeScript from `node_modules/typescript`".
|
||||
- Settings → Code Style → Prettier → Run on save (`src/**/*.{ts,tsx,json,css}`).
|
||||
|
||||
### VS Code
|
||||
|
||||
Extension đề xuất (không có `.vscode/extensions.json` được commit — cài thủ công):
|
||||
|
||||
- `dbaeumer.vscode-eslint`
|
||||
- `esbenp.prettier-vscode`
|
||||
- `bradlc.vscode-tailwindcss`
|
||||
- `rust-lang.rust-analyzer` (nếu động vào `src-tauri/`)
|
||||
- `tauri-apps.tauri-vscode`
|
||||
|
||||
## Chạy lần đầu
|
||||
|
||||
```bash
|
||||
# 1. Clone
|
||||
git clone https://github.com/poli0981/youtube-generator.git
|
||||
cd youtube-generator
|
||||
|
||||
# 2. Cài web dependencies
|
||||
npm install
|
||||
|
||||
# 3. Chạy web dev server
|
||||
npm run dev
|
||||
# → http://localhost:5173
|
||||
```
|
||||
|
||||
## Lệnh thường dùng
|
||||
|
||||
| Lệnh | Tác dụng |
|
||||
| --- | --- |
|
||||
| `npm run dev` | Vite dev server, hot reload, chỉ web. |
|
||||
| `npm run build` | Bundle web production vào `dist/`. |
|
||||
| `npm run preview` | Phục vụ bundle production để kiểm tra. |
|
||||
| `npm run typecheck` | `tsc --noEmit`. Chạy trước mỗi PR. |
|
||||
| `npm run lint` | ESLint. Dùng `npm run lint:fix` để autofix. |
|
||||
| `npm run format` | Chạy Prettier trên `src/`. |
|
||||
| `npm run test` | Vitest chế độ watch. |
|
||||
| `npm run test:run` | Vitest chạy một lần (cho CI / pre-commit). |
|
||||
| `npm run test:coverage` | Báo cáo coverage vào `coverage/`. |
|
||||
| `npm run validate:locales` | Bắt buộc cả 6 locale có cùng key với `_schema.json`. **Phải pass trước khi merge PR động đến locale.** |
|
||||
| `npm run generate:locale` | Scaffold locale rỗng từ `_schema.json` cho ngôn ngữ mới. |
|
||||
| `npm run tauri:dev` | Tauri desktop chế độ dev (tự restart khi đổi Rust hoặc frontend). |
|
||||
| `npm run tauri:build` | Build binary Tauri release cho platform hiện tại. |
|
||||
|
||||
## Build Tauri desktop
|
||||
|
||||
Xem [PACKAGING.md](../../PACKAGING.md) cho pipeline release đầy đủ. Build cục bộ nhanh:
|
||||
|
||||
```bash
|
||||
npm run tauri:build
|
||||
# Output: src-tauri/target/release/bundle/{msi,deb,dmg,app}
|
||||
```
|
||||
|
||||
Build đầu tiên mất khoảng 5–10 phút (Cargo cache rỗng). Build sau đó là incremental.
|
||||
|
||||
## Khắc phục sự cố
|
||||
|
||||
### `validate:locales` fail sau khi thêm key
|
||||
|
||||
Bạn quên cập nhật `src/i18n/locales/_schema.json`. Schema là source of truth; locale phải khớp 100%.
|
||||
|
||||
### Build Tauri báo `link.exe not found` (Windows)
|
||||
|
||||
Cài Visual Studio Build Tools 2022 + workload Desktop C++, sau đó khởi động lại shell để PATH được cập nhật.
|
||||
|
||||
### Build Tauri báo `pkg-config not found` (Linux)
|
||||
|
||||
Cài Tauri prerequisites theo distro tại <https://v2.tauri.app/start/prerequisites/>.
|
||||
|
||||
### `npm install` chậm / treo
|
||||
|
||||
Tắt VPN/proxy doanh nghiệp chặn npm registry. Lock file đã commit; install offline chạy được sau lần install thành công đầu tiên.
|
||||
|
||||
### Hot reload không bắt được sửa đổi locale
|
||||
|
||||
Locale JSON bundle vào lúc build, không được watch. Restart dev server sau khi sửa `src/i18n/locales/*`.
|
||||
|
||||
Từ v0.26, chỉ tiếng Anh nằm trong main chunk; các ngôn ngữ khác là async
|
||||
chunk lazy-load, tải khi dùng lần đầu (xem `src/i18n/index.ts` và
|
||||
docs/I18N.md). Lời khuyên restart ở trên vẫn áp dụng cho tất cả.
|
||||
|
||||
### Pre-commit hook fail ở `validate:locales` mà mình không động đến locale
|
||||
|
||||
Có thể bạn vô tình thêm key mới vào `_schema.json` thông qua `src/engine/types.ts` → `CONTENT_WARNINGS`. ID mới cần dịch ở cả 6 locale.
|
||||
|
||||
## Xem thêm
|
||||
|
||||
- [ARCHITECTURE.md](../../ARCHITECTURE.md) — mô hình layer, data flow, thiết kế engine.
|
||||
- [I18N.md](../../I18N.md) — thêm ngôn ngữ mới từng bước.
|
||||
- [PACKAGING.md](../../PACKAGING.md) — Tauri release build và signing.
|
||||
- [CONTRIBUTING.md ở root](../../../CONTRIBUTING.md) — quy trình PR, quy ước commit, auto-ignore rules.
|
||||
- [SECURITY.md ở root](../../../SECURITY.md) — báo cáo lỗ hổng bảo mật.
|
||||
@@ -0,0 +1,55 @@
|
||||
# Tuyên bố miễn trừ
|
||||
|
||||
> **Lưu ý dịch thuật:** Tiếng Anh là phiên bản chính ([`DISCLAIMER.md` ở root](../../../DISCLAIMER.md)). Bản tiếng Việt này có thể chậm cập nhật một vài commit.
|
||||
|
||||
## Dự án cá nhân, có sự hỗ trợ của AI
|
||||
|
||||
YTDescGen là dự án cá nhân do một người duy trì (`@poli0981`) để dùng cho kênh YouTube [`@SkullMute`](https://www.youtube.com/@SkullMute), và chia sẻ công khai dưới dạng mã nguồn mở. Đây **không phải sản phẩm thương mại** và không có nghĩa vụ hỗ trợ.
|
||||
|
||||
Mã nguồn, tài liệu, bản dịch locale, và các quyết định thiết kế trong repo này được **đồng tác giả với sự hỗ trợ của Anthropic's Claude Code (model 4.7 Opus, cửa sổ context 1M)**. Tất cả commit, release, và quyết định kiến trúc được người duy trì xem xét và phê duyệt trước khi merge.
|
||||
|
||||
Tuyên bố này áp dụng cho:
|
||||
|
||||
- Mã nguồn trong `src/` và `src-tauri/`.
|
||||
- Tài liệu trong `docs/` và các file markdown ở root.
|
||||
- File locale trong `src/i18n/locales/`.
|
||||
- Workflow CI/CD trong `.github/workflows/`.
|
||||
|
||||
Xem thêm: [`THIRD_PARTY_NOTICES.md`](../../../THIRD_PARTY_NOTICES.md) § "AI-Assisted Development Disclosure".
|
||||
|
||||
## Chất lượng bản dịch
|
||||
|
||||
UI ứng dụng hỗ trợ sáu ngôn ngữ. Chất lượng tác giả khác nhau:
|
||||
|
||||
| Locale | Tác giả | Ghi chú |
|
||||
| --- | --- | --- |
|
||||
| Tiếng Anh (`en`) | Người duy trì + AI | Locale làm việc chính. Chuỗi được review trước khi commit. |
|
||||
| Tiếng Việt (`vi`) | Người duy trì (bản ngữ) + AI | Review bởi người duy trì là người bản ngữ tiếng Việt. |
|
||||
| Tiếng Nhật (`ja`) | AI dịch | Không có review bản ngữ. Ngữ pháp và văn phong có thể chưa chuẩn. |
|
||||
| Tiếng Tây Ban Nha (`es`) | AI dịch | Không có review bản ngữ. Không nhắm cụ thể vào giọng vùng miền (LatAm vs. Castilian). |
|
||||
| Tiếng Hàn (`ko`) | AI dịch | Không có review bản ngữ. Honorific register chọn ở mức trung tính. |
|
||||
| Tiếng Trung (`zh`) | AI dịch | Giản thể. Không có review bản ngữ. |
|
||||
|
||||
Nếu bạn là người bản ngữ và phát hiện dịch sai, vui lòng mở issue hoặc PR — xem [CONTRIBUTING.md](../../../CONTRIBUTING.md) § "i18n Contributions".
|
||||
|
||||
## Giọng văn và phong cách
|
||||
|
||||
Template description sinh ra dùng giọng văn được điều chỉnh cho ngách **gameplay no-commentary** trên YouTube, đặc biệt nhấn mạnh game horror / kinh dị (vì đó là nội dung kênh của người duy trì). Output có thể không hợp với mọi kênh hay mọi văn hoá đọc. Ứng dụng dùng template — bạn có thể sửa bất kỳ text sinh ra nào trước khi đăng.
|
||||
|
||||
Một số cụm tiếng Việt cố tình giữ từ vay mượn và giọng casual phản ánh cách các creator gameplay Việt thường viết description. Đây không phải "dịch sai" mà là lựa chọn phong cách cho đối tượng đọc.
|
||||
|
||||
## Không bảo hành
|
||||
|
||||
Phần mềm cung cấp **nguyên trạng, không có bất kỳ bảo hành nào**. Xem [`LICENSE`](../../../LICENSE) (Apache 2.0) §§ 7 và 8 cho đầy đủ điều khoản miễn trừ bảo hành và giới hạn trách nhiệm.
|
||||
|
||||
Nói ngắn gọn: nếu ứng dụng crash, làm hỏng draft, sinh ra description khiến video bị YouTube flag, hoặc gây bất kỳ thiệt hại nào — người duy trì không chịu trách nhiệm. Dùng tự chịu rủi ro; back up draft của bạn.
|
||||
|
||||
## Không liên kết với YouTube / Anthropic
|
||||
|
||||
YTDescGen **không** liên kết, được tài trợ, hay được YouTube, Google LLC, hay Alphabet Inc. xác nhận. Output sinh ra dành để paste vào YouTube Studio editor; ứng dụng này không tương tác với YouTube API.
|
||||
|
||||
Việc dùng Claude Code trong quá trình phát triển **không** biến đây thành sản phẩm của Anthropic. Anthropic, Claude, và Claude Code là nhãn hiệu của Anthropic, PBC. Dự án này độc lập.
|
||||
|
||||
## Không phải tư vấn pháp lý hay tài chính
|
||||
|
||||
Bất kỳ đề cập nào đến GDPR, CCPA, luật bản quyền, chính sách monetization của YouTube, hay các chủ đề tương tự trong tài liệu repo này chỉ để định hướng — **không phải tư vấn pháp lý**. Tham vấn luật sư có chuyên môn ở khu vực của bạn nếu cần câu trả lời chính thống.
|
||||
@@ -3,7 +3,70 @@
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>YTDescGen</title>
|
||||
<meta name="color-scheme" content="dark light" />
|
||||
<meta name="theme-color" content="#0a0a0a" />
|
||||
|
||||
<title>YTDescGen — YouTube Title, Description & Tag Generator for Gameplay Channels</title>
|
||||
<meta name="description" content="Generate YouTube titles, descriptions, and tags for Gameplay No Commentary channels — multilingual templates, profile presets, and a Tauri-based desktop build." />
|
||||
<meta name="keywords" content="youtube, gameplay, no commentary, description generator, tags generator, video title, vietnamese, japanese, korean, spanish, chinese, multilingual, tauri, desktop" />
|
||||
<meta name="author" content="SkullMute (poli0981)" />
|
||||
<meta name="robots" content="index, follow" />
|
||||
<meta name="generator" content="Vite + React" />
|
||||
|
||||
<link rel="canonical" href="https://poli0981.github.io/youtube-generator/" />
|
||||
<link rel="icon" type="image/svg+xml" href="/youtube-generator/favicon.svg" />
|
||||
<link rel="apple-touch-icon" href="/youtube-generator/apple-touch-icon.png" />
|
||||
<link rel="manifest" href="/youtube-generator/manifest.webmanifest" />
|
||||
|
||||
<!-- OpenGraph -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:site_name" content="YTDescGen" />
|
||||
<meta property="og:title" content="YTDescGen — YouTube Title, Description & Tag Generator" />
|
||||
<meta property="og:description" content="Multilingual title, description, and tag generator for Gameplay No Commentary channels." />
|
||||
<meta property="og:url" content="https://poli0981.github.io/youtube-generator/" />
|
||||
<meta property="og:image" content="https://poli0981.github.io/youtube-generator/og-image.png" />
|
||||
<meta property="og:image:width" content="1200" />
|
||||
<meta property="og:image:height" content="630" />
|
||||
<meta property="og:locale" content="en_US" />
|
||||
<meta property="og:locale:alternate" content="vi_VN" />
|
||||
<meta property="og:locale:alternate" content="ja_JP" />
|
||||
<meta property="og:locale:alternate" content="es_ES" />
|
||||
<meta property="og:locale:alternate" content="ko_KR" />
|
||||
<meta property="og:locale:alternate" content="zh_CN" />
|
||||
|
||||
<!-- Twitter / X card -->
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:site" content="@SkullMute0011" />
|
||||
<meta name="twitter:creator" content="@SkullMute0011" />
|
||||
<meta name="twitter:title" content="YTDescGen — YouTube Title, Description & Tag Generator" />
|
||||
<meta name="twitter:description" content="Multilingual title, description, and tag generator for Gameplay No Commentary channels." />
|
||||
<meta name="twitter:image" content="https://poli0981.github.io/youtube-generator/og-image.png" />
|
||||
|
||||
<!-- Structured data -->
|
||||
<script type="application/ld+json">
|
||||
{
|
||||
"@context": "https://schema.org",
|
||||
"@type": "WebApplication",
|
||||
"name": "YTDescGen",
|
||||
"alternateName": "YouTube Description Generator",
|
||||
"url": "https://poli0981.github.io/youtube-generator/",
|
||||
"applicationCategory": "MultimediaApplication",
|
||||
"operatingSystem": "Web, Windows, macOS, Linux",
|
||||
"description": "Generate YouTube titles, descriptions, and tags for Gameplay No Commentary channels — multilingual templates, profile presets, and a Tauri-based desktop build.",
|
||||
"inLanguage": ["en", "vi", "ja", "es", "ko", "zh"],
|
||||
"offers": {
|
||||
"@type": "Offer",
|
||||
"price": "0",
|
||||
"priceCurrency": "USD"
|
||||
},
|
||||
"author": {
|
||||
"@type": "Person",
|
||||
"name": "SkullMute",
|
||||
"url": "https://github.com/poli0981"
|
||||
},
|
||||
"license": "https://github.com/poli0981/youtube-generator/blob/main/LICENSE"
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"$schema": "https://unpkg.com/knip@6/schema.json",
|
||||
"entry": ["scripts/*.ts", "tests/**/*.test.ts"],
|
||||
"project": ["src/**/*.{ts,tsx}", "scripts/**/*.ts", "tests/**/*.ts"],
|
||||
"ignoreExportsUsedInFile": true,
|
||||
"ignoreDependencies": [
|
||||
"@tauri-apps/plugin-fs",
|
||||
"@tauri-apps/plugin-opener",
|
||||
"@tauri-apps/plugin-shell",
|
||||
"@testing-library/jest-dom",
|
||||
"@testing-library/react"
|
||||
],
|
||||
"ignoreBinaries": ["tauri"]
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
{
|
||||
"name": "yt-desc-gen",
|
||||
"version": "0.5.0",
|
||||
"version": "0.30.0",
|
||||
"private": true,
|
||||
"license": "Apache-2.0",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
@@ -12,6 +13,7 @@
|
||||
"test:coverage": "vitest run --coverage",
|
||||
"lint": "eslint src/",
|
||||
"lint:fix": "eslint src/ --fix",
|
||||
"knip": "knip",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"format": "prettier --write \"src/**/*.{ts,tsx,json,css}\"",
|
||||
"validate:locales": "tsx scripts/validate-locales.ts",
|
||||
@@ -21,39 +23,41 @@
|
||||
"tauri:build": "tauri build"
|
||||
},
|
||||
"dependencies": {
|
||||
"react": "^18.3.0",
|
||||
"react-dom": "^18.3.0",
|
||||
"react-router-dom": "^6.26.0",
|
||||
"zustand": "^4.5.0",
|
||||
"i18next": "^23.15.0",
|
||||
"react-i18next": "^15.0.0",
|
||||
"react-hot-toast": "^2.4.0",
|
||||
"lucide-react": "^0.400.0",
|
||||
"clsx": "^2.1.0",
|
||||
"@tauri-apps/api": "^2.0.0",
|
||||
"@tauri-apps/api": "^2.11.0",
|
||||
"@tauri-apps/plugin-dialog": "^2.0.0",
|
||||
"@tauri-apps/plugin-fs": "^2.0.0",
|
||||
"@tauri-apps/plugin-opener": "^2.0.0",
|
||||
"@tauri-apps/plugin-shell": "^2.0.0"
|
||||
"@tauri-apps/plugin-shell": "^2.0.0",
|
||||
"clsx": "^2.1.0",
|
||||
"i18next": "^23.15.0",
|
||||
"i18next-resources-to-backend": "^1.2.1",
|
||||
"lucide-react": "^0.400.0",
|
||||
"react": "^18.3.0",
|
||||
"react-dom": "^18.3.0",
|
||||
"react-hot-toast": "^2.4.0",
|
||||
"react-i18next": "^15.0.0",
|
||||
"react-router-dom": "^6.26.0",
|
||||
"zustand": "^4.5.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/js": "^9.0.0",
|
||||
"@testing-library/jest-dom": "^6.4.0",
|
||||
"@testing-library/react": "^16.0.0",
|
||||
"@types/react": "^18.3.0",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"@vitejs/plugin-react": "^4.3.0",
|
||||
"typescript": "^5.5.0",
|
||||
"vite": "^5.4.0",
|
||||
"vitest": "^2.0.0",
|
||||
"@testing-library/react": "^16.0.0",
|
||||
"@testing-library/jest-dom": "^6.4.0",
|
||||
"tailwindcss": "^3.4.0",
|
||||
"postcss": "^8.4.0",
|
||||
"@vitejs/plugin-react": "^5.2.0",
|
||||
"autoprefixer": "^10.4.0",
|
||||
"eslint": "^9.0.0",
|
||||
"@eslint/js": "^9.0.0",
|
||||
"typescript-eslint": "^8.0.0",
|
||||
"eslint-plugin-react-hooks": "^5.0.0",
|
||||
"knip": "^6.14.1",
|
||||
"postcss": "^8.5.14",
|
||||
"prettier": "^3.3.0",
|
||||
"prettier-plugin-tailwindcss": "^0.6.0",
|
||||
"tsx": "^4.16.0"
|
||||
"tailwindcss": "^3.4.0",
|
||||
"tsx": "^4.22.4",
|
||||
"typescript": "^5.5.0",
|
||||
"typescript-eslint": "^8.0.0",
|
||||
"vite": "^8.0.16",
|
||||
"vitest": "^4.1.8"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" fill="none">
|
||||
<rect width="64" height="64" rx="12" fill="#0a0a0a"/>
|
||||
<rect x="14" y="14" width="36" height="36" rx="6" fill="none" stroke="#ec4899" stroke-width="3"/>
|
||||
<path d="M22 22h20M22 30h20M22 38h12" stroke="#ec4899" stroke-width="3" stroke-linecap="round"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 335 B |
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "YTDescGen",
|
||||
"short_name": "YTDescGen",
|
||||
"description": "YouTube title, description, and tag generator for Gameplay No Commentary channels.",
|
||||
"start_url": "/youtube-generator/",
|
||||
"scope": "/youtube-generator/",
|
||||
"display": "standalone",
|
||||
"background_color": "#0a0a0a",
|
||||
"theme_color": "#0a0a0a",
|
||||
"lang": "en",
|
||||
"categories": ["productivity", "utilities", "multimedia"],
|
||||
"icons": [
|
||||
{
|
||||
"src": "favicon.svg",
|
||||
"sizes": "any",
|
||||
"type": "image/svg+xml",
|
||||
"purpose": "any"
|
||||
},
|
||||
{
|
||||
"src": "icon-192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
},
|
||||
{
|
||||
"src": "icon-512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png",
|
||||
"purpose": "any maskable"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
User-agent: *
|
||||
Allow: /
|
||||
Sitemap: https://poli0981.github.io/youtube-generator/sitemap.xml
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>https://poli0981.github.io/youtube-generator/</loc>
|
||||
<changefreq>weekly</changefreq>
|
||||
<priority>1.0</priority>
|
||||
</url>
|
||||
</urlset>
|
||||
@@ -1,9 +1,10 @@
|
||||
[package]
|
||||
name = "yt-desc-gen"
|
||||
version = "0.5.0"
|
||||
version = "0.30.0"
|
||||
description = "YouTube Gameplay Description Generator"
|
||||
authors = ["poli0981"]
|
||||
edition = "2021"
|
||||
license = "Apache-2.0"
|
||||
|
||||
[lib]
|
||||
name = "yt_desc_gen_lib"
|
||||
@@ -18,5 +19,9 @@ tauri-plugin-dialog = "2"
|
||||
tauri-plugin-fs = "2"
|
||||
tauri-plugin-opener = "2"
|
||||
tauri-plugin-shell = "2"
|
||||
serde = { version = "1", features = ["derive"] }
|
||||
serde_json = "1"
|
||||
|
||||
# Desktop-only: single-instance is unsupported on mobile and must not be
|
||||
# compiled into the Android/iOS library. cfg(not(any(android, ios))) is the
|
||||
# canonical Tauri "desktop" target table.
|
||||
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
|
||||
tauri-plugin-single-instance = "2"
|
||||
@@ -0,0 +1,12 @@
|
||||
# EditorConfig is awesome: https://EditorConfig.org
|
||||
|
||||
# top-most EditorConfig file
|
||||
root = true
|
||||
|
||||
[*]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
end_of_line = lf
|
||||
charset = utf-8
|
||||
trim_trailing_whitespace = false
|
||||
insert_final_newline = false
|
||||
@@ -0,0 +1,19 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
||||
key.properties
|
||||
|
||||
/.tauri
|
||||
/tauri.settings.gradle
|
||||
@@ -0,0 +1,6 @@
|
||||
/src/main/**/generated
|
||||
/src/main/jniLibs/**/*.so
|
||||
/src/main/assets/tauri.conf.json
|
||||
/tauri.build.gradle.kts
|
||||
/proguard-tauri.pro
|
||||
/tauri.properties
|
||||
@@ -0,0 +1,92 @@
|
||||
import java.util.Properties
|
||||
|
||||
plugins {
|
||||
id("com.android.application")
|
||||
id("org.jetbrains.kotlin.android")
|
||||
id("rust")
|
||||
}
|
||||
|
||||
val tauriProperties = Properties().apply {
|
||||
val propFile = file("tauri.properties")
|
||||
if (propFile.exists()) {
|
||||
propFile.inputStream().use { load(it) }
|
||||
}
|
||||
}
|
||||
|
||||
// Release signing. `keystore.properties` is gitignored and created out-of-band
|
||||
// (locally by the maintainer, or written from CI secrets). When it is absent
|
||||
// the release build is left unsigned instead of failing, so debug builds and
|
||||
// contributor checkouts without a keystore still work.
|
||||
val keystorePropertiesFile = rootProject.file("keystore.properties")
|
||||
val keystoreProperties = Properties().apply {
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keystorePropertiesFile.inputStream().use { load(it) }
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
compileSdk = 36
|
||||
namespace = "com.skullmute.ytdescgen"
|
||||
defaultConfig {
|
||||
manifestPlaceholders["usesCleartextTraffic"] = "false"
|
||||
applicationId = "com.skullmute.ytdescgen"
|
||||
minSdk = 30
|
||||
targetSdk = 36
|
||||
versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
|
||||
versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
|
||||
}
|
||||
signingConfigs {
|
||||
create("release") {
|
||||
if (keystorePropertiesFile.exists()) {
|
||||
keyAlias = keystoreProperties["keyAlias"] as String
|
||||
keyPassword = keystoreProperties["keyPassword"] as String
|
||||
storeFile = file(keystoreProperties["storeFile"] as String)
|
||||
storePassword = keystoreProperties["storePassword"] as String
|
||||
}
|
||||
}
|
||||
}
|
||||
buildTypes {
|
||||
getByName("debug") {
|
||||
manifestPlaceholders["usesCleartextTraffic"] = "true"
|
||||
isDebuggable = true
|
||||
isJniDebuggable = true
|
||||
isMinifyEnabled = false
|
||||
packaging { jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
|
||||
jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so")
|
||||
jniLibs.keepDebugSymbols.add("*/x86/*.so")
|
||||
jniLibs.keepDebugSymbols.add("*/x86_64/*.so")
|
||||
}
|
||||
}
|
||||
getByName("release") {
|
||||
isMinifyEnabled = true
|
||||
proguardFiles(
|
||||
*fileTree(".") { include("**/*.pro") }
|
||||
.plus(getDefaultProguardFile("proguard-android-optimize.txt"))
|
||||
.toList().toTypedArray()
|
||||
)
|
||||
signingConfig = signingConfigs.getByName("release")
|
||||
}
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "1.8"
|
||||
}
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
}
|
||||
}
|
||||
|
||||
rust {
|
||||
rootDirRel = "../../../"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation("androidx.webkit:webkit:1.14.0")
|
||||
implementation("androidx.appcompat:appcompat:1.7.1")
|
||||
implementation("androidx.activity:activity-ktx:1.10.1")
|
||||
implementation("com.google.android.material:material:1.12.0")
|
||||
testImplementation("junit:junit:4.13.2")
|
||||
androidTestImplementation("androidx.test.ext:junit:1.1.4")
|
||||
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
|
||||
}
|
||||
|
||||
apply(from = "tauri.build.gradle.kts")
|
||||
@@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
|
||||
<!-- AndroidTV support -->
|
||||
<uses-feature android:name="android.software.leanback" android:required="false" />
|
||||
|
||||
<application
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@style/Theme.yt_desc_gen"
|
||||
android:usesCleartextTraffic="${usesCleartextTraffic}">
|
||||
<activity
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
|
||||
android:launchMode="singleTask"
|
||||
android:label="@string/main_activity_title"
|
||||
android:name=".MainActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
<!-- AndroidTV support -->
|
||||
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.fileprovider"
|
||||
android:exported="false"
|
||||
android:grantUriPermissions="true">
|
||||
<meta-data
|
||||
android:name="android.support.FILE_PROVIDER_PATHS"
|
||||
android:resource="@xml/file_paths" />
|
||||
</provider>
|
||||
</application>
|
||||
</manifest>
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.skullmute.ytdescgen
|
||||
|
||||
import android.os.Bundle
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
|
||||
class MainActivity : TauriActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
enableEdgeToEdge()
|
||||
super.onCreate(savedInstanceState)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
||||
@@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
||||
@@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Hello World!"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 3.4 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 3.3 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 29 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 40 KiB |
|
After Width: | Height: | Size: 16 KiB |
@@ -0,0 +1,6 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.yt_desc_gen" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="purple_200">#FFBB86FC</color>
|
||||
<color name="purple_500">#FF6200EE</color>
|
||||
<color name="purple_700">#FF3700B3</color>
|
||||
<color name="teal_200">#FF03DAC5</color>
|
||||
<color name="teal_700">#FF018786</color>
|
||||
<color name="black">#FF000000</color>
|
||||
<color name="white">#FFFFFFFF</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,4 @@
|
||||
<resources>
|
||||
<string name="app_name">YTDescGen</string>
|
||||
<string name="main_activity_title">YTDescGen</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,6 @@
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.yt_desc_gen" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||
<!-- Customize your theme here. -->
|
||||
</style>
|
||||
</resources>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<paths xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<external-path name="my_images" path="." />
|
||||
<cache-path name="my_cache_images" path="." />
|
||||
</paths>
|
||||
@@ -0,0 +1,22 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
dependencies {
|
||||
classpath("com.android.tools.build:gradle:8.11.0")
|
||||
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("clean").configure {
|
||||
delete("build")
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
plugins {
|
||||
`kotlin-dsl`
|
||||
}
|
||||
|
||||
gradlePlugin {
|
||||
plugins {
|
||||
create("pluginsForCoolKids") {
|
||||
id = "rust"
|
||||
implementationClass = "RustPlugin"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
compileOnly(gradleApi())
|
||||
implementation("com.android.tools.build:gradle:8.11.0")
|
||||
}
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
import java.io.File
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.GradleException
|
||||
import org.gradle.api.logging.LogLevel
|
||||
import org.gradle.api.tasks.Input
|
||||
import org.gradle.api.tasks.TaskAction
|
||||
|
||||
open class BuildTask : DefaultTask() {
|
||||
@Input
|
||||
var rootDirRel: String? = null
|
||||
@Input
|
||||
var target: String? = null
|
||||
@Input
|
||||
var release: Boolean? = null
|
||||
|
||||
@TaskAction
|
||||
fun assemble() {
|
||||
val executable = """cargo""";
|
||||
try {
|
||||
runTauriCli(executable)
|
||||
} catch (e: Exception) {
|
||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||
// Try different Windows-specific extensions
|
||||
val fallbacks = listOf(
|
||||
"$executable.exe",
|
||||
"$executable.cmd",
|
||||
"$executable.bat",
|
||||
)
|
||||
|
||||
var lastException: Exception = e
|
||||
for (fallback in fallbacks) {
|
||||
try {
|
||||
runTauriCli(fallback)
|
||||
return
|
||||
} catch (fallbackException: Exception) {
|
||||
lastException = fallbackException
|
||||
}
|
||||
}
|
||||
throw lastException
|
||||
} else {
|
||||
throw e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fun runTauriCli(executable: String) {
|
||||
val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null")
|
||||
val target = target ?: throw GradleException("target cannot be null")
|
||||
val release = release ?: throw GradleException("release cannot be null")
|
||||
val args = listOf("tauri", "android", "android-studio-script");
|
||||
|
||||
project.exec {
|
||||
workingDir(File(project.projectDir, rootDirRel))
|
||||
executable(executable)
|
||||
args(args)
|
||||
if (project.logger.isEnabled(LogLevel.DEBUG)) {
|
||||
args("-vv")
|
||||
} else if (project.logger.isEnabled(LogLevel.INFO)) {
|
||||
args("-v")
|
||||
}
|
||||
if (release) {
|
||||
args("--release")
|
||||
}
|
||||
args(listOf("--target", target))
|
||||
}.assertNormalExitValue()
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
import com.android.build.api.dsl.ApplicationExtension
|
||||
import org.gradle.api.DefaultTask
|
||||
import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.gradle.kotlin.dsl.get
|
||||
|
||||
const val TASK_GROUP = "rust"
|
||||
|
||||
open class Config {
|
||||
lateinit var rootDirRel: String
|
||||
}
|
||||
|
||||
open class RustPlugin : Plugin<Project> {
|
||||
private lateinit var config: Config
|
||||
|
||||
override fun apply(project: Project) = with(project) {
|
||||
config = extensions.create("rust", Config::class.java)
|
||||
|
||||
val defaultAbiList = listOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64");
|
||||
val abiList = (findProperty("abiList") as? String)?.split(',') ?: defaultAbiList
|
||||
|
||||
val defaultArchList = listOf("arm64", "arm", "x86", "x86_64");
|
||||
val archList = (findProperty("archList") as? String)?.split(',') ?: defaultArchList
|
||||
|
||||
val targetsList = (findProperty("targetList") as? String)?.split(',') ?: listOf("aarch64", "armv7", "i686", "x86_64")
|
||||
|
||||
extensions.configure<ApplicationExtension> {
|
||||
@Suppress("UnstableApiUsage")
|
||||
flavorDimensions.add("abi")
|
||||
productFlavors {
|
||||
create("universal") {
|
||||
dimension = "abi"
|
||||
ndk {
|
||||
abiFilters += abiList
|
||||
}
|
||||
}
|
||||
defaultArchList.forEachIndexed { index, arch ->
|
||||
create(arch) {
|
||||
dimension = "abi"
|
||||
ndk {
|
||||
abiFilters.add(defaultAbiList[index])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
afterEvaluate {
|
||||
for (profile in listOf("debug", "release")) {
|
||||
val profileCapitalized = profile.replaceFirstChar { it.uppercase() }
|
||||
val buildTask = tasks.maybeCreate(
|
||||
"rustBuildUniversal$profileCapitalized",
|
||||
DefaultTask::class.java
|
||||
).apply {
|
||||
group = TASK_GROUP
|
||||
description = "Build dynamic library in $profile mode for all targets"
|
||||
}
|
||||
|
||||
tasks["mergeUniversal${profileCapitalized}JniLibFolders"].dependsOn(buildTask)
|
||||
|
||||
for (targetPair in targetsList.withIndex()) {
|
||||
val targetName = targetPair.value
|
||||
val targetArch = archList[targetPair.index]
|
||||
val targetArchCapitalized = targetArch.replaceFirstChar { it.uppercase() }
|
||||
val targetBuildTask = project.tasks.maybeCreate(
|
||||
"rustBuild$targetArchCapitalized$profileCapitalized",
|
||||
BuildTask::class.java
|
||||
).apply {
|
||||
group = TASK_GROUP
|
||||
description = "Build dynamic library in $profile mode for $targetArch"
|
||||
rootDirRel = config.rootDirRel
|
||||
target = targetName
|
||||
release = profile == "release"
|
||||
}
|
||||
|
||||
buildTask.dependsOn(targetBuildTask)
|
||||
tasks["merge$targetArchCapitalized${profileCapitalized}JniLibFolders"].dependsOn(
|
||||
targetBuildTask
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
# Project-wide Gradle settings.
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. More details, visit
|
||||
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
|
||||
# org.gradle.parallel=true
|
||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||
# Android operating system, and which are packaged with your app"s APK
|
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=official
|
||||
# Enables namespacing of each library's R class so that its R class includes only the
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
android.nonFinalResIds=false
|
||||
@@ -0,0 +1,6 @@
|
||||
#Tue May 10 19:22:52 CST 2022
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
@@ -0,0 +1,185 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
@@ -0,0 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -0,0 +1,3 @@
|
||||
include ':app'
|
||||
|
||||
apply from: 'tauri.settings.gradle'
|
||||
@@ -1 +1 @@
|
||||
{"core":{"default_permission":{"identifier":"default","description":"Default core plugins set.","permissions":["core:path:default","core:event:default","core:window:default","core:webview:default","core:app:default","core:image:default","core:resources:default","core:menu:default","core:tray:default"]},"permissions":{},"permission_sets":{},"global_scope_schema":null},"core:app":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-version","allow-name","allow-tauri-version","allow-identifier","allow-bundle-type","allow-register-listener","allow-remove-listener"]},"permissions":{"allow-app-hide":{"identifier":"allow-app-hide","description":"Enables the app_hide command without any pre-configured scope.","commands":{"allow":["app_hide"],"deny":[]}},"allow-app-show":{"identifier":"allow-app-show","description":"Enables the app_show command without any pre-configured scope.","commands":{"allow":["app_show"],"deny":[]}},"allow-bundle-type":{"identifier":"allow-bundle-type","description":"Enables the bundle_type command without any pre-configured scope.","commands":{"allow":["bundle_type"],"deny":[]}},"allow-default-window-icon":{"identifier":"allow-default-window-icon","description":"Enables the default_window_icon command without any pre-configured scope.","commands":{"allow":["default_window_icon"],"deny":[]}},"allow-fetch-data-store-identifiers":{"identifier":"allow-fetch-data-store-identifiers","description":"Enables the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":["fetch_data_store_identifiers"],"deny":[]}},"allow-identifier":{"identifier":"allow-identifier","description":"Enables the identifier command without any pre-configured scope.","commands":{"allow":["identifier"],"deny":[]}},"allow-name":{"identifier":"allow-name","description":"Enables the name command without any pre-configured scope.","commands":{"allow":["name"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-data-store":{"identifier":"allow-remove-data-store","description":"Enables the remove_data_store command without any pre-configured scope.","commands":{"allow":["remove_data_store"],"deny":[]}},"allow-remove-listener":{"identifier":"allow-remove-listener","description":"Enables the remove_listener command without any pre-configured scope.","commands":{"allow":["remove_listener"],"deny":[]}},"allow-set-app-theme":{"identifier":"allow-set-app-theme","description":"Enables the set_app_theme command without any pre-configured scope.","commands":{"allow":["set_app_theme"],"deny":[]}},"allow-set-dock-visibility":{"identifier":"allow-set-dock-visibility","description":"Enables the set_dock_visibility command without any pre-configured scope.","commands":{"allow":["set_dock_visibility"],"deny":[]}},"allow-tauri-version":{"identifier":"allow-tauri-version","description":"Enables the tauri_version command without any pre-configured scope.","commands":{"allow":["tauri_version"],"deny":[]}},"allow-version":{"identifier":"allow-version","description":"Enables the version command without any pre-configured scope.","commands":{"allow":["version"],"deny":[]}},"deny-app-hide":{"identifier":"deny-app-hide","description":"Denies the app_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["app_hide"]}},"deny-app-show":{"identifier":"deny-app-show","description":"Denies the app_show command without any pre-configured scope.","commands":{"allow":[],"deny":["app_show"]}},"deny-bundle-type":{"identifier":"deny-bundle-type","description":"Denies the bundle_type command without any pre-configured scope.","commands":{"allow":[],"deny":["bundle_type"]}},"deny-default-window-icon":{"identifier":"deny-default-window-icon","description":"Denies the default_window_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["default_window_icon"]}},"deny-fetch-data-store-identifiers":{"identifier":"deny-fetch-data-store-identifiers","description":"Denies the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":[],"deny":["fetch_data_store_identifiers"]}},"deny-identifier":{"identifier":"deny-identifier","description":"Denies the identifier command without any pre-configured scope.","commands":{"allow":[],"deny":["identifier"]}},"deny-name":{"identifier":"deny-name","description":"Denies the name command without any pre-configured scope.","commands":{"allow":[],"deny":["name"]}},"deny-register-listener":{"identifier":"deny-register-listener","description":"Denies the register_listener command without any pre-configured scope.","commands":{"allow":[],"deny":["register_listener"]}},"deny-remove-data-store":{"identifier":"deny-remove-data-store","description":"Denies the remove_data_store command Line truncated
|
||||
{"core":{"default_permission":{"identifier":"default","description":"Default core plugins set.","permissions":["core:path:default","core:event:default","core:window:default","core:webview:default","core:app:default","core:image:default","core:resources:default","core:menu:default","core:tray:default"]},"permissions":{},"permission_sets":{},"global_scope_schema":null},"core:app":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-version","allow-name","allow-tauri-version","allow-identifier","allow-bundle-type","allow-register-listener","allow-remove-listener","allow-supports-multiple-windows"]},"permissions":{"allow-app-hide":{"identifier":"allow-app-hide","description":"Enables the app_hide command without any pre-configured scope.","commands":{"allow":["app_hide"],"deny":[]}},"allow-app-show":{"identifier":"allow-app-show","description":"Enables the app_show command without any pre-configured scope.","commands":{"allow":["app_show"],"deny":[]}},"allow-bundle-type":{"identifier":"allow-bundle-type","description":"Enables the bundle_type command without any pre-configured scope.","commands":{"allow":["bundle_type"],"deny":[]}},"allow-default-window-icon":{"identifier":"allow-default-window-icon","description":"Enables the default_window_icon command without any pre-configured scope.","commands":{"allow":["default_window_icon"],"deny":[]}},"allow-fetch-data-store-identifiers":{"identifier":"allow-fetch-data-store-identifiers","description":"Enables the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":["fetch_data_store_identifiers"],"deny":[]}},"allow-identifier":{"identifier":"allow-identifier","description":"Enables the identifier command without any pre-configured scope.","commands":{"allow":["identifier"],"deny":[]}},"allow-name":{"identifier":"allow-name","description":"Enables the name command without any pre-configured scope.","commands":{"allow":["name"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-data-store":{"identifier":"allow-remove-data-store","description":"Enables the remove_data_store command without any pre-configured scope.","commands":{"allow":["remove_data_store"],"deny":[]}},"allow-remove-listener":{"identifier":"allow-remove-listener","description":"Enables the remove_listener command without any pre-configured scope.","commands":{"allow":["remove_listener"],"deny":[]}},"allow-set-app-theme":{"identifier":"allow-set-app-theme","description":"Enables the set_app_theme command without any pre-configured scope.","commands":{"allow":["set_app_theme"],"deny":[]}},"allow-set-dock-visibility":{"identifier":"allow-set-dock-visibility","description":"Enables the set_dock_visibility command without any pre-configured scope.","commands":{"allow":["set_dock_visibility"],"deny":[]}},"allow-supports-multiple-windows":{"identifier":"allow-supports-multiple-windows","description":"Enables the supports_multiple_windows command without any pre-configured scope.","commands":{"allow":["supports_multiple_windows"],"deny":[]}},"allow-tauri-version":{"identifier":"allow-tauri-version","description":"Enables the tauri_version command without any pre-configured scope.","commands":{"allow":["tauri_version"],"deny":[]}},"allow-version":{"identifier":"allow-version","description":"Enables the version command without any pre-configured scope.","commands":{"allow":["version"],"deny":[]}},"deny-app-hide":{"identifier":"deny-app-hide","description":"Denies the app_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["app_hide"]}},"deny-app-show":{"identifier":"deny-app-show","description":"Denies the app_show command without any pre-configured scope.","commands":{"allow":[],"deny":["app_show"]}},"deny-bundle-type":{"identifier":"deny-bundle-type","description":"Denies the bundle_type command without any pre-configured scope.","commands":{"allow":[],"deny":["bundle_type"]}},"deny-default-window-icon":{"identifier":"deny-default-window-icon","description":"Denies the default_window_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["default_window_icon"]}},"deny-fetch-data-store-identifiers":{"identifier":"deny-fetch-data-store-identifiers","description":"Denies the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":[],"deny":["fetch_data_store_identifiers"]}},"deny-identifier":{"identifier":"deny-identifier","description":"Denies the identifier command without any pre-configured scope.","commands":{"allow":[],"deny":["identifier"]}},"deny-name":{"identifier":"deny-name","description":"Denies the name command without any pre-configured scope.","commands":{"allow":[],"deny":["name"]}},"deny-register-listener":{"identifier":"deny-reLine truncated
|
||||
@@ -1 +1 @@
|
||||
{"default":{"identifier":"default","description":"Default capabilities for YTDescGen","local":true,"windows":["main"],"permissions":["core:default","dialog:default","dialog:allow-save","dialog:allow-open","fs:default","fs:allow-read-text-file","fs:allow-write-text-file","shell:default"]}}
|
||||
{"default":{"identifier":"default","description":"Default capabilities for YTDescGen","local":true,"windows":["main"],"permissions":["core:default","dialog:default","dialog:allow-save","dialog:allow-open","fs:default","fs:allow-read-text-file","fs:allow-write-text-file","shell:default","opener:default",{"identifier":"opener:allow-open-path","allow":[{"path":"$APPDATA"},{"path":"$APPDATA/**"}]},{"identifier":"opener:allow-reveal-item-in-dir","allow":[{"path":"$APPDATA"},{"path":"$APPDATA/**"}]}]}}
|
||||
@@ -1958,6 +1958,174 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"identifier": {
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer\n#### This default permission set includes:\n\n- `allow-open-url`\n- `allow-reveal-item-in-dir`\n- `allow-default-urls`",
|
||||
"type": "string",
|
||||
"const": "opener:default",
|
||||
"markdownDescription": "This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer\n#### This default permission set includes:\n\n- `allow-open-url`\n- `allow-reveal-item-in-dir`\n- `allow-default-urls`"
|
||||
},
|
||||
{
|
||||
"description": "This enables opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-default-urls",
|
||||
"markdownDescription": "This enables opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application."
|
||||
},
|
||||
{
|
||||
"description": "Enables the open_path command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-open-path",
|
||||
"markdownDescription": "Enables the open_path command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the open_url command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-open-url",
|
||||
"markdownDescription": "Enables the open_url command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the reveal_item_in_dir command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-reveal-item-in-dir",
|
||||
"markdownDescription": "Enables the reveal_item_in_dir command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the open_path command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:deny-open-path",
|
||||
"markdownDescription": "Denies the open_path command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the open_url command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:deny-open-url",
|
||||
"markdownDescription": "Denies the open_url command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the reveal_item_in_dir command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:deny-reveal-item-in-dir",
|
||||
"markdownDescription": "Denies the reveal_item_in_dir command without any pre-configured scope."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"allow": {
|
||||
"items": {
|
||||
"title": "OpenerScopeEntry",
|
||||
"description": "Opener scope entry.",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"url"
|
||||
],
|
||||
"properties": {
|
||||
"app": {
|
||||
"description": "An application to open this url with, for example: firefox.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Application"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url": {
|
||||
"description": "A URL that can be opened by the webview when using the Opener APIs.\n\nWildcards can be used following the UNIX glob pattern.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"path"
|
||||
],
|
||||
"properties": {
|
||||
"app": {
|
||||
"description": "An application to open this path with, for example: xdg-open.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Application"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": {
|
||||
"description": "A path that can be opened by the webview when using the Opener APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"deny": {
|
||||
"items": {
|
||||
"title": "OpenerScopeEntry",
|
||||
"description": "Opener scope entry.",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"url"
|
||||
],
|
||||
"properties": {
|
||||
"app": {
|
||||
"description": "An application to open this url with, for example: firefox.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Application"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url": {
|
||||
"description": "A URL that can be opened by the webview when using the Opener APIs.\n\nWildcards can be used following the UNIX glob pattern.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"path"
|
||||
],
|
||||
"properties": {
|
||||
"app": {
|
||||
"description": "An application to open this path with, for example: xdg-open.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Application"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": {
|
||||
"description": "A path that can be opened by the webview when using the Opener APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"identifier": {
|
||||
"description": "Identifier of the permission or permission set.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Identifier"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
@@ -2217,10 +2385,10 @@
|
||||
"markdownDescription": "Default core plugins set.\n#### This default permission set includes:\n\n- `core:path:default`\n- `core:event:default`\n- `core:window:default`\n- `core:webview:default`\n- `core:app:default`\n- `core:image:default`\n- `core:resources:default`\n- `core:menu:default`\n- `core:tray:default`"
|
||||
},
|
||||
{
|
||||
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`",
|
||||
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-supports-multiple-windows`",
|
||||
"type": "string",
|
||||
"const": "core:app:default",
|
||||
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`"
|
||||
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-supports-multiple-windows`"
|
||||
},
|
||||
{
|
||||
"description": "Enables the app_hide command without any pre-configured scope.",
|
||||
@@ -2294,6 +2462,12 @@
|
||||
"const": "core:app:allow-set-dock-visibility",
|
||||
"markdownDescription": "Enables the set_dock_visibility command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the supports_multiple_windows command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:app:allow-supports-multiple-windows",
|
||||
"markdownDescription": "Enables the supports_multiple_windows command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the tauri_version command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -2378,6 +2552,12 @@
|
||||
"const": "core:app:deny-set-dock-visibility",
|
||||
"markdownDescription": "Denies the set_dock_visibility command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the supports_multiple_windows command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:app:deny-supports-multiple-windows",
|
||||
"markdownDescription": "Denies the supports_multiple_windows command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the tauri_version command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -2901,10 +3081,10 @@
|
||||
"markdownDescription": "Denies the close command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-show-menu-on-left-click`",
|
||||
"description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-icon-with-as-template`\n- `allow-set-show-menu-on-left-click`",
|
||||
"type": "string",
|
||||
"const": "core:tray:default",
|
||||
"markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-show-menu-on-left-click`"
|
||||
"markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-icon-with-as-template`\n- `allow-set-show-menu-on-left-click`"
|
||||
},
|
||||
{
|
||||
"description": "Enables the get_by_id command without any pre-configured scope.",
|
||||
@@ -2936,6 +3116,12 @@
|
||||
"const": "core:tray:allow-set-icon-as-template",
|
||||
"markdownDescription": "Enables the set_icon_as_template command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the set_icon_with_as_template command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:tray:allow-set-icon-with-as-template",
|
||||
"markdownDescription": "Enables the set_icon_with_as_template command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the set_menu command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -3002,6 +3188,12 @@
|
||||
"const": "core:tray:deny-set-icon-as-template",
|
||||
"markdownDescription": "Denies the set_icon_as_template command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the set_icon_with_as_template command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:tray:deny-set-icon-with-as-template",
|
||||
"markdownDescription": "Denies the set_icon_with_as_template command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the set_menu command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -3261,10 +3453,16 @@
|
||||
"markdownDescription": "Denies the webview_size command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-internal-toggle-maximize`",
|
||||
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-activity-name`\n- `allow-scene-identifier`\n- `allow-internal-toggle-maximize`",
|
||||
"type": "string",
|
||||
"const": "core:window:default",
|
||||
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-internal-toggle-maximize`"
|
||||
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-activity-name`\n- `allow-scene-identifier`\n- `allow-internal-toggle-maximize`"
|
||||
},
|
||||
{
|
||||
"description": "Enables the activity_name command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:window:allow-activity-name",
|
||||
"markdownDescription": "Enables the activity_name command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the available_monitors command without any pre-configured scope.",
|
||||
@@ -3458,6 +3656,12 @@
|
||||
"const": "core:window:allow-scale-factor",
|
||||
"markdownDescription": "Enables the scale_factor command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the scene_identifier command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:window:allow-scene-identifier",
|
||||
"markdownDescription": "Enables the scene_identifier command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the set_always_on_bottom command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -3722,6 +3926,12 @@
|
||||
"const": "core:window:allow-unminimize",
|
||||
"markdownDescription": "Enables the unminimize command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the activity_name command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:window:deny-activity-name",
|
||||
"markdownDescription": "Denies the activity_name command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the available_monitors command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -3914,6 +4124,12 @@
|
||||
"const": "core:window:deny-scale-factor",
|
||||
"markdownDescription": "Denies the scale_factor command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the scene_identifier command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:window:deny-scene-identifier",
|
||||
"markdownDescription": "Denies the scene_identifier command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the set_always_on_bottom command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -5996,6 +6212,54 @@
|
||||
"const": "fs:write-files",
|
||||
"markdownDescription": "This enables all file write related commands without any pre-configured accessible paths."
|
||||
},
|
||||
{
|
||||
"description": "This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer\n#### This default permission set includes:\n\n- `allow-open-url`\n- `allow-reveal-item-in-dir`\n- `allow-default-urls`",
|
||||
"type": "string",
|
||||
"const": "opener:default",
|
||||
"markdownDescription": "This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer\n#### This default permission set includes:\n\n- `allow-open-url`\n- `allow-reveal-item-in-dir`\n- `allow-default-urls`"
|
||||
},
|
||||
{
|
||||
"description": "This enables opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-default-urls",
|
||||
"markdownDescription": "This enables opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application."
|
||||
},
|
||||
{
|
||||
"description": "Enables the open_path command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-open-path",
|
||||
"markdownDescription": "Enables the open_path command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the open_url command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-open-url",
|
||||
"markdownDescription": "Enables the open_url command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the reveal_item_in_dir command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-reveal-item-in-dir",
|
||||
"markdownDescription": "Enables the reveal_item_in_dir command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the open_path command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:deny-open-path",
|
||||
"markdownDescription": "Denies the open_path command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the open_url command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:deny-open-url",
|
||||
"markdownDescription": "Denies the open_url command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the reveal_item_in_dir command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:deny-reveal-item-in-dir",
|
||||
"markdownDescription": "Denies the reveal_item_in_dir command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n\n#### This default permission set includes:\n\n- `allow-open`",
|
||||
"type": "string",
|
||||
@@ -6158,6 +6422,23 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"Application": {
|
||||
"description": "Opener scope application.",
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "Open in default application.",
|
||||
"type": "null"
|
||||
},
|
||||
{
|
||||
"description": "If true, allow open with any application.",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"description": "Allow specific application to open with.",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ShellScopeEntryAllowedArg": {
|
||||
"description": "A command argument allowed to be executed by the webview API.",
|
||||
"anyOf": [
|
||||
|
||||
@@ -1958,6 +1958,174 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
"identifier": {
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer\n#### This default permission set includes:\n\n- `allow-open-url`\n- `allow-reveal-item-in-dir`\n- `allow-default-urls`",
|
||||
"type": "string",
|
||||
"const": "opener:default",
|
||||
"markdownDescription": "This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer\n#### This default permission set includes:\n\n- `allow-open-url`\n- `allow-reveal-item-in-dir`\n- `allow-default-urls`"
|
||||
},
|
||||
{
|
||||
"description": "This enables opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-default-urls",
|
||||
"markdownDescription": "This enables opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application."
|
||||
},
|
||||
{
|
||||
"description": "Enables the open_path command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-open-path",
|
||||
"markdownDescription": "Enables the open_path command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the open_url command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-open-url",
|
||||
"markdownDescription": "Enables the open_url command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the reveal_item_in_dir command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-reveal-item-in-dir",
|
||||
"markdownDescription": "Enables the reveal_item_in_dir command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the open_path command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:deny-open-path",
|
||||
"markdownDescription": "Denies the open_path command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the open_url command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:deny-open-url",
|
||||
"markdownDescription": "Denies the open_url command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the reveal_item_in_dir command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:deny-reveal-item-in-dir",
|
||||
"markdownDescription": "Denies the reveal_item_in_dir command without any pre-configured scope."
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"then": {
|
||||
"properties": {
|
||||
"allow": {
|
||||
"items": {
|
||||
"title": "OpenerScopeEntry",
|
||||
"description": "Opener scope entry.",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"url"
|
||||
],
|
||||
"properties": {
|
||||
"app": {
|
||||
"description": "An application to open this url with, for example: firefox.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Application"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url": {
|
||||
"description": "A URL that can be opened by the webview when using the Opener APIs.\n\nWildcards can be used following the UNIX glob pattern.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"path"
|
||||
],
|
||||
"properties": {
|
||||
"app": {
|
||||
"description": "An application to open this path with, for example: xdg-open.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Application"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": {
|
||||
"description": "A path that can be opened by the webview when using the Opener APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"deny": {
|
||||
"items": {
|
||||
"title": "OpenerScopeEntry",
|
||||
"description": "Opener scope entry.",
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"url"
|
||||
],
|
||||
"properties": {
|
||||
"app": {
|
||||
"description": "An application to open this url with, for example: firefox.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Application"
|
||||
}
|
||||
]
|
||||
},
|
||||
"url": {
|
||||
"description": "A URL that can be opened by the webview when using the Opener APIs.\n\nWildcards can be used following the UNIX glob pattern.\n\nExamples:\n\n- \"https://*\" : allows all HTTPS origin\n\n- \"https://*.github.com/tauri-apps/tauri\": allows any subdomain of \"github.com\" with the \"tauri-apps/api\" path\n\n- \"https://myapi.service.com/users/*\": allows access to any URLs that begins with \"https://myapi.service.com/users/\"",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"path"
|
||||
],
|
||||
"properties": {
|
||||
"app": {
|
||||
"description": "An application to open this path with, for example: xdg-open.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Application"
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": {
|
||||
"description": "A path that can be opened by the webview when using the Opener APIs.\n\nThe pattern can start with a variable that resolves to a system base directory. The variables are: `$AUDIO`, `$CACHE`, `$CONFIG`, `$DATA`, `$LOCALDATA`, `$DESKTOP`, `$DOCUMENT`, `$DOWNLOAD`, `$EXE`, `$FONT`, `$HOME`, `$PICTURE`, `$PUBLIC`, `$RUNTIME`, `$TEMPLATE`, `$VIDEO`, `$RESOURCE`, `$APP`, `$LOG`, `$TEMP`, `$APPCONFIG`, `$APPDATA`, `$APPLOCALDATA`, `$APPCACHE`, `$APPLOG`.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"identifier": {
|
||||
"description": "Identifier of the permission or permission set.",
|
||||
"allOf": [
|
||||
{
|
||||
"$ref": "#/definitions/Identifier"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"if": {
|
||||
"properties": {
|
||||
@@ -2217,10 +2385,10 @@
|
||||
"markdownDescription": "Default core plugins set.\n#### This default permission set includes:\n\n- `core:path:default`\n- `core:event:default`\n- `core:window:default`\n- `core:webview:default`\n- `core:app:default`\n- `core:image:default`\n- `core:resources:default`\n- `core:menu:default`\n- `core:tray:default`"
|
||||
},
|
||||
{
|
||||
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`",
|
||||
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-supports-multiple-windows`",
|
||||
"type": "string",
|
||||
"const": "core:app:default",
|
||||
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`"
|
||||
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-supports-multiple-windows`"
|
||||
},
|
||||
{
|
||||
"description": "Enables the app_hide command without any pre-configured scope.",
|
||||
@@ -2294,6 +2462,12 @@
|
||||
"const": "core:app:allow-set-dock-visibility",
|
||||
"markdownDescription": "Enables the set_dock_visibility command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the supports_multiple_windows command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:app:allow-supports-multiple-windows",
|
||||
"markdownDescription": "Enables the supports_multiple_windows command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the tauri_version command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -2378,6 +2552,12 @@
|
||||
"const": "core:app:deny-set-dock-visibility",
|
||||
"markdownDescription": "Denies the set_dock_visibility command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the supports_multiple_windows command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:app:deny-supports-multiple-windows",
|
||||
"markdownDescription": "Denies the supports_multiple_windows command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the tauri_version command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -2901,10 +3081,10 @@
|
||||
"markdownDescription": "Denies the close command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-show-menu-on-left-click`",
|
||||
"description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-icon-with-as-template`\n- `allow-set-show-menu-on-left-click`",
|
||||
"type": "string",
|
||||
"const": "core:tray:default",
|
||||
"markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-show-menu-on-left-click`"
|
||||
"markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-icon-with-as-template`\n- `allow-set-show-menu-on-left-click`"
|
||||
},
|
||||
{
|
||||
"description": "Enables the get_by_id command without any pre-configured scope.",
|
||||
@@ -2936,6 +3116,12 @@
|
||||
"const": "core:tray:allow-set-icon-as-template",
|
||||
"markdownDescription": "Enables the set_icon_as_template command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the set_icon_with_as_template command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:tray:allow-set-icon-with-as-template",
|
||||
"markdownDescription": "Enables the set_icon_with_as_template command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the set_menu command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -3002,6 +3188,12 @@
|
||||
"const": "core:tray:deny-set-icon-as-template",
|
||||
"markdownDescription": "Denies the set_icon_as_template command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the set_icon_with_as_template command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:tray:deny-set-icon-with-as-template",
|
||||
"markdownDescription": "Denies the set_icon_with_as_template command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the set_menu command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -3261,10 +3453,16 @@
|
||||
"markdownDescription": "Denies the webview_size command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-internal-toggle-maximize`",
|
||||
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-activity-name`\n- `allow-scene-identifier`\n- `allow-internal-toggle-maximize`",
|
||||
"type": "string",
|
||||
"const": "core:window:default",
|
||||
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-internal-toggle-maximize`"
|
||||
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-activity-name`\n- `allow-scene-identifier`\n- `allow-internal-toggle-maximize`"
|
||||
},
|
||||
{
|
||||
"description": "Enables the activity_name command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:window:allow-activity-name",
|
||||
"markdownDescription": "Enables the activity_name command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the available_monitors command without any pre-configured scope.",
|
||||
@@ -3458,6 +3656,12 @@
|
||||
"const": "core:window:allow-scale-factor",
|
||||
"markdownDescription": "Enables the scale_factor command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the scene_identifier command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:window:allow-scene-identifier",
|
||||
"markdownDescription": "Enables the scene_identifier command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the set_always_on_bottom command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -3722,6 +3926,12 @@
|
||||
"const": "core:window:allow-unminimize",
|
||||
"markdownDescription": "Enables the unminimize command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the activity_name command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:window:deny-activity-name",
|
||||
"markdownDescription": "Denies the activity_name command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the available_monitors command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -3914,6 +4124,12 @@
|
||||
"const": "core:window:deny-scale-factor",
|
||||
"markdownDescription": "Denies the scale_factor command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the scene_identifier command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "core:window:deny-scene-identifier",
|
||||
"markdownDescription": "Denies the scene_identifier command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the set_always_on_bottom command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
@@ -5996,6 +6212,54 @@
|
||||
"const": "fs:write-files",
|
||||
"markdownDescription": "This enables all file write related commands without any pre-configured accessible paths."
|
||||
},
|
||||
{
|
||||
"description": "This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer\n#### This default permission set includes:\n\n- `allow-open-url`\n- `allow-reveal-item-in-dir`\n- `allow-default-urls`",
|
||||
"type": "string",
|
||||
"const": "opener:default",
|
||||
"markdownDescription": "This permission set allows opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application\nas well as reveal file in directories using default file explorer\n#### This default permission set includes:\n\n- `allow-open-url`\n- `allow-reveal-item-in-dir`\n- `allow-default-urls`"
|
||||
},
|
||||
{
|
||||
"description": "This enables opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-default-urls",
|
||||
"markdownDescription": "This enables opening `mailto:`, `tel:`, `https://` and `http://` urls using their default application."
|
||||
},
|
||||
{
|
||||
"description": "Enables the open_path command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-open-path",
|
||||
"markdownDescription": "Enables the open_path command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the open_url command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-open-url",
|
||||
"markdownDescription": "Enables the open_url command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Enables the reveal_item_in_dir command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:allow-reveal-item-in-dir",
|
||||
"markdownDescription": "Enables the reveal_item_in_dir command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the open_path command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:deny-open-path",
|
||||
"markdownDescription": "Denies the open_path command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the open_url command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:deny-open-url",
|
||||
"markdownDescription": "Denies the open_url command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "Denies the reveal_item_in_dir command without any pre-configured scope.",
|
||||
"type": "string",
|
||||
"const": "opener:deny-reveal-item-in-dir",
|
||||
"markdownDescription": "Denies the reveal_item_in_dir command without any pre-configured scope."
|
||||
},
|
||||
{
|
||||
"description": "This permission set configures which\nshell functionality is exposed by default.\n\n#### Granted Permissions\n\nIt allows to use the `open` functionality with a reasonable\nscope pre-configured. It will allow opening `http(s)://`,\n`tel:` and `mailto:` links.\n\n#### This default permission set includes:\n\n- `allow-open`",
|
||||
"type": "string",
|
||||
@@ -6158,6 +6422,23 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"Application": {
|
||||
"description": "Opener scope application.",
|
||||
"anyOf": [
|
||||
{
|
||||
"description": "Open in default application.",
|
||||
"type": "null"
|
||||
},
|
||||
{
|
||||
"description": "If true, allow open with any application.",
|
||||
"type": "boolean"
|
||||
},
|
||||
{
|
||||
"description": "Allow specific application to open with.",
|
||||
"type": "string"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ShellScopeEntryAllowedArg": {
|
||||
"description": "A command argument allowed to be executed by the webview API.",
|
||||
"anyOf": [
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
YTDescGen — Installation & Terms Notice
|
||||
=======================================
|
||||
|
||||
By installing and using YTDescGen, you confirm that you have read and agree
|
||||
to the following documents:
|
||||
|
||||
Terms of Use: https://github.com/poli0981/youtube-generator/blob/main/TERMS.md
|
||||
Privacy Policy: https://github.com/poli0981/youtube-generator/blob/main/PRIVACY.md
|
||||
Disclaimer: https://github.com/poli0981/youtube-generator/blob/main/DISCLAIMER.md
|
||||
License: https://github.com/poli0981/youtube-generator/blob/main/LICENSE
|
||||
|
||||
In short:
|
||||
|
||||
* YTDescGen is free, open-source software, provided AS IS, WITHOUT WARRANTY
|
||||
OF ANY KIND. You use it at your own risk (see the Disclaimer and License
|
||||
sections 7-8).
|
||||
* It works fully offline. It does not collect, transmit, or sell any
|
||||
personal data; your profiles, history, and generated text stay on your
|
||||
device (see the Privacy Policy).
|
||||
* You are responsible for ensuring the titles, descriptions, and tags you
|
||||
generate comply with YouTube's policies and applicable law (see the
|
||||
Terms of Use).
|
||||
* YTDescGen is an independent project and is not affiliated with, endorsed
|
||||
by, or sponsored by YouTube, Google, or any game publisher.
|
||||
|
||||
The software itself is licensed under the Apache License, Version 2.0. The
|
||||
full license text is included with this distribution and is available at the
|
||||
License URL above.
|
||||
|
||||
If you do not agree to these terms, do not install or use the software.
|
||||
@@ -1,6 +1,13 @@
|
||||
// The tray icon, single-instance enforcement, hide-to-tray and
|
||||
// exit-prevention machinery below are desktop-only. None of these APIs exist
|
||||
// (or make sense) on mobile, so gate the imports too — otherwise the Android
|
||||
// build fails with unresolved imports / unused-import warnings.
|
||||
#[cfg(desktop)]
|
||||
use std::sync::atomic::{AtomicBool, Ordering};
|
||||
#[cfg(desktop)]
|
||||
use std::sync::Arc;
|
||||
|
||||
#[cfg(desktop)]
|
||||
use tauri::{
|
||||
menu::{Menu, MenuItem},
|
||||
tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent},
|
||||
@@ -20,81 +27,186 @@ fn read_from_file(path: String) -> Result<String, String> {
|
||||
std::fs::read_to_string(&path).map_err(|e| e.to_string())
|
||||
}
|
||||
|
||||
/// Ensure a directory exists on disk, creating it (and any missing
|
||||
/// parents) if necessary. No-op when the path already exists as a
|
||||
/// directory. Fixes the "Windows cannot find ... AppData\Roaming\
|
||||
/// com.skullmute.ytdescgen" Explorer error on first launch — see
|
||||
/// `openSettingsFolder()` in `SettingsPage.tsx`, where this is called
|
||||
/// before `openPath(dir)` so the OS shell never sees a non-existent
|
||||
/// path. Returns the OS error string on failure (e.g. permission
|
||||
/// denied) so the caller can surface it via the in-app log.
|
||||
#[tauri::command]
|
||||
fn ensure_dir(path: String) -> Result<(), String> {
|
||||
std::fs::create_dir_all(&path).map_err(|e| e.to_string())
|
||||
}
|
||||
|
||||
/// Append `content` to the file at `path`, creating the file (and any
|
||||
/// missing parent directories) if necessary. Used by the v0.17.0 log
|
||||
/// persistence pipeline to write JSONL entries one line at a time,
|
||||
/// rather than rewriting the whole file on every log call. Cheap
|
||||
/// enough that we can call it on every `addEntry` without batching.
|
||||
/// The caller is responsible for newline termination — this is a raw
|
||||
/// byte append, not a line writer.
|
||||
#[tauri::command]
|
||||
fn append_to_file(path: String, content: String) -> Result<(), String> {
|
||||
use std::fs::OpenOptions;
|
||||
use std::io::Write;
|
||||
if let Some(parent) = std::path::Path::new(&path).parent() {
|
||||
std::fs::create_dir_all(parent).map_err(|e| e.to_string())?;
|
||||
}
|
||||
let mut file = OpenOptions::new()
|
||||
.append(true)
|
||||
.create(true)
|
||||
.open(&path)
|
||||
.map_err(|e| e.to_string())?;
|
||||
file.write_all(content.as_bytes()).map_err(|e| e.to_string())
|
||||
}
|
||||
|
||||
/// List entries in a directory, returning their file names (not full
|
||||
/// paths). Used by the v0.17.0 log retention sweep to find
|
||||
/// `ytdescgen-*.jsonl` files older than the configured retention
|
||||
/// window. Returns an empty vec if the directory doesn't exist
|
||||
/// (i.e. no logs have been written yet) — first-run safe.
|
||||
#[tauri::command]
|
||||
fn list_dir(path: String) -> Result<Vec<String>, String> {
|
||||
let dir = std::path::Path::new(&path);
|
||||
if !dir.exists() {
|
||||
return Ok(Vec::new());
|
||||
}
|
||||
let entries = std::fs::read_dir(dir).map_err(|e| e.to_string())?;
|
||||
let mut names = Vec::new();
|
||||
for entry in entries.flatten() {
|
||||
if let Some(name) = entry.file_name().to_str() {
|
||||
names.push(name.to_string());
|
||||
}
|
||||
}
|
||||
Ok(names)
|
||||
}
|
||||
|
||||
/// Delete a file at `path` if it exists. No-op when the file is
|
||||
/// missing (used by log retention sweep — racing with another sweep
|
||||
/// or a manual cleanup shouldn't error). Returns the OS error string
|
||||
/// on permission failures.
|
||||
#[tauri::command]
|
||||
fn delete_file(path: String) -> Result<(), String> {
|
||||
let p = std::path::Path::new(&path);
|
||||
if !p.exists() {
|
||||
return Ok(());
|
||||
}
|
||||
std::fs::remove_file(p).map_err(|e| e.to_string())
|
||||
}
|
||||
|
||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||
pub fn run() {
|
||||
// Flag that signals the user has requested a full quit (via tray menu).
|
||||
// When false, closing the window hides it to the tray; when true,
|
||||
// the app is allowed to exit.
|
||||
let quitting = Arc::new(AtomicBool::new(false));
|
||||
let quitting_menu = quitting.clone();
|
||||
let quitting_window = quitting.clone();
|
||||
let quitting_run = quitting.clone();
|
||||
|
||||
tauri::Builder::default()
|
||||
// Plugins and commands shared by every platform (desktop + Android). The
|
||||
// dialog/fs/opener/shell plugins all support mobile, and the six file
|
||||
// commands use std::fs which works against the app's private data dir on
|
||||
// Android. Desktop-only pieces (single-instance, tray, hide-to-tray,
|
||||
// exit-prevention) are layered on below behind #[cfg(desktop)].
|
||||
let builder = tauri::Builder::default()
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_fs::init())
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.plugin(tauri_plugin_shell::init())
|
||||
.setup(move |app| {
|
||||
let show = MenuItem::with_id(app, "show", "Show YTDescGen", true, None::<&str>)?;
|
||||
let quit = MenuItem::with_id(app, "quit", "Quit", true, None::<&str>)?;
|
||||
let menu = Menu::with_items(app, &[&show, &quit])?;
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
save_to_file,
|
||||
read_from_file,
|
||||
ensure_dir,
|
||||
append_to_file,
|
||||
list_dir,
|
||||
delete_file
|
||||
]);
|
||||
|
||||
let _tray = TrayIconBuilder::with_id("ytdescgen-tray")
|
||||
.tooltip("YTDescGen — YouTube Description Generator")
|
||||
.menu(&menu)
|
||||
.on_menu_event(move |app, event| match event.id.as_ref() {
|
||||
"show" => {
|
||||
if let Some(window) = app.get_webview_window("main") {
|
||||
let _ = window.show();
|
||||
let _ = window.unminimize();
|
||||
let _ = window.set_focus();
|
||||
}
|
||||
}
|
||||
"quit" => {
|
||||
quitting_menu.store(true, Ordering::SeqCst);
|
||||
app.exit(0);
|
||||
}
|
||||
_ => {}
|
||||
})
|
||||
.on_tray_icon_event(|tray, event| {
|
||||
if let TrayIconEvent::Click {
|
||||
button: MouseButton::Left,
|
||||
button_state: MouseButtonState::Up,
|
||||
..
|
||||
} = event
|
||||
{
|
||||
let app = tray.app_handle();
|
||||
if let Some(window) = app.get_webview_window("main") {
|
||||
let _ = window.show();
|
||||
let _ = window.unminimize();
|
||||
let _ = window.set_focus();
|
||||
}
|
||||
}
|
||||
})
|
||||
.build(app)?;
|
||||
#[cfg(desktop)]
|
||||
{
|
||||
// Flag that signals the user has requested a full quit (via tray menu).
|
||||
// When false, closing the window hides it to the tray; when true,
|
||||
// the app is allowed to exit.
|
||||
let quitting = Arc::new(AtomicBool::new(false));
|
||||
let quitting_menu = quitting.clone();
|
||||
let quitting_window = quitting.clone();
|
||||
let quitting_run = quitting.clone();
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.on_window_event(move |window, event| {
|
||||
if let WindowEvent::CloseRequested { api, .. } = event {
|
||||
// If the user asked to quit via the tray menu, let the
|
||||
// window close normally so the app can exit.
|
||||
if !quitting_window.load(Ordering::SeqCst) {
|
||||
let _ = window.hide();
|
||||
api.prevent_close();
|
||||
builder
|
||||
// Single-instance MUST be the first desktop plugin registered (v0.12).
|
||||
// Without it, every launch spawns a fresh process — which then builds
|
||||
// its own tray icon in `setup()`, stacking duplicates in the system
|
||||
// tray and leaving orphan processes in Task Manager. The callback runs
|
||||
// in the *first* (already-running) instance when a second launch is
|
||||
// attempted: we surface its window instead of letting the second boot.
|
||||
.plugin(tauri_plugin_single_instance::init(|app, _argv, _cwd| {
|
||||
if let Some(window) = app.get_webview_window("main") {
|
||||
let _ = window.show();
|
||||
let _ = window.unminimize();
|
||||
let _ = window.set_focus();
|
||||
}
|
||||
}
|
||||
})
|
||||
.invoke_handler(tauri::generate_handler![save_to_file, read_from_file])
|
||||
.build(tauri::generate_context!())
|
||||
.expect("error while building tauri application")
|
||||
.run(move |_app_handle, event| {
|
||||
if let RunEvent::ExitRequested { api, .. } = event {
|
||||
// Only prevent exit when the user hasn't explicitly asked to quit.
|
||||
if !quitting_run.load(Ordering::SeqCst) {
|
||||
api.prevent_exit();
|
||||
}))
|
||||
.setup(move |app| {
|
||||
let show = MenuItem::with_id(app, "show", "Show YTDescGen", true, None::<&str>)?;
|
||||
let quit = MenuItem::with_id(app, "quit", "Quit", true, None::<&str>)?;
|
||||
let menu = Menu::with_items(app, &[&show, &quit])?;
|
||||
|
||||
let _tray = TrayIconBuilder::with_id("ytdescgen-tray")
|
||||
.tooltip("YTDescGen — YouTube Description Generator")
|
||||
.menu(&menu)
|
||||
.on_menu_event(move |app, event| match event.id.as_ref() {
|
||||
"show" => {
|
||||
if let Some(window) = app.get_webview_window("main") {
|
||||
let _ = window.show();
|
||||
let _ = window.unminimize();
|
||||
let _ = window.set_focus();
|
||||
}
|
||||
}
|
||||
"quit" => {
|
||||
quitting_menu.store(true, Ordering::SeqCst);
|
||||
app.exit(0);
|
||||
}
|
||||
_ => {}
|
||||
})
|
||||
.on_tray_icon_event(|tray, event| {
|
||||
if let TrayIconEvent::Click {
|
||||
button: MouseButton::Left,
|
||||
button_state: MouseButtonState::Up,
|
||||
..
|
||||
} = event
|
||||
{
|
||||
let app = tray.app_handle();
|
||||
if let Some(window) = app.get_webview_window("main") {
|
||||
let _ = window.show();
|
||||
let _ = window.unminimize();
|
||||
let _ = window.set_focus();
|
||||
}
|
||||
}
|
||||
})
|
||||
.build(app)?;
|
||||
|
||||
Ok(())
|
||||
})
|
||||
.on_window_event(move |window, event| {
|
||||
if let WindowEvent::CloseRequested { api, .. } = event {
|
||||
// If the user asked to quit via the tray menu, let the
|
||||
// window close normally so the app can exit.
|
||||
if !quitting_window.load(Ordering::SeqCst) {
|
||||
let _ = window.hide();
|
||||
api.prevent_close();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
.build(tauri::generate_context!())
|
||||
.expect("error while building tauri application")
|
||||
.run(move |_app_handle, event| {
|
||||
if let RunEvent::ExitRequested { api, .. } = event {
|
||||
// Only prevent exit when the user hasn't explicitly asked to quit.
|
||||
if !quitting_run.load(Ordering::SeqCst) {
|
||||
api.prevent_exit();
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
// Mobile (Android): no tray, single-instance, or hide-to-tray — just run.
|
||||
#[cfg(not(desktop))]
|
||||
builder
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while building tauri application");
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/tauri-apps/tauri/dev/crates/tauri-cli/schema.json",
|
||||
"productName": "YTDescGen",
|
||||
"version": "0.5.0",
|
||||
"version": "0.30.0",
|
||||
"identifier": "com.skullmute.ytdescgen",
|
||||
"build": {
|
||||
"beforeBuildCommand": "npm run build",
|
||||
@@ -15,9 +15,12 @@
|
||||
"title": "YTDescGen",
|
||||
"width": 1100,
|
||||
"height": 750,
|
||||
"minWidth": 800,
|
||||
"minHeight": 600,
|
||||
"resizable": true,
|
||||
"minWidth": 1100,
|
||||
"minHeight": 750,
|
||||
"maxWidth": 1100,
|
||||
"maxHeight": 750,
|
||||
"resizable": false,
|
||||
"maximizable": false,
|
||||
"fullscreen": false,
|
||||
"center": true
|
||||
}
|
||||
@@ -32,6 +35,7 @@
|
||||
},
|
||||
"bundle": {
|
||||
"active": true,
|
||||
"licenseFile": "installer-license.txt",
|
||||
"icon": [
|
||||
"icons/32x32.png",
|
||||
"icons/128x128.png",
|
||||
@@ -40,6 +44,9 @@
|
||||
"icons/icon.ico"
|
||||
],
|
||||
"targets": "all",
|
||||
"android": {
|
||||
"minSdkVersion": 30
|
||||
},
|
||||
"windows": {
|
||||
"webviewInstallMode": {
|
||||
"type": "downloadBootstrapper"
|
||||
|
||||