Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,8 @@ When the plugin is installed and the model weights are downloaded, you can launc
capture details (input source, dimensions, crop). Handy when detection isn't behaving.
- **Enable remote decklist** — lets each player load its deck from an HTTP(S) URL or a YDKE code instead of
a local `.ydk` file; see the note below the `Draw Display` source.
- **Export detected card info to files** — write the detected cards (JSON / JSONL / plain text) to a per-user
folder, for OBS Text sources, bots or overlays; see the note below the `Draw Display` source.
3. The plugin provide a new source called `Draw Display`. You can add it to your scene like any other source.
This source will display the detected cards on the screen. You can choose what source/scene to detect cards from.
With two-player mode enabled, use the **Detector / Player** property on the source to pick which detector it reads from (**Player 1** or **Player 2**); add one `Draw Display` per player to show both at once.
Expand All @@ -255,6 +257,26 @@ When the plugin is installed and the model weights are downloaded, you can launc
>
> ⚠️ URLs and the header value are stored in plain text in QSettings, like all other plugin settings —
> avoid placing long-lived secrets there.

> 💡 The plugin can also **export detected card info to files** so you can show it anywhere — an OBS Text source
> the streamer reads on stream, bots, or HTML/browser overlays. It is **off by default** — enable *Export
> detected card info to files* in the Draw 2 settings (*Feature flags*) and restart DRAW. While running, each
> detector writes to `plugin_config/draw2-plugin/state/` (per player `N`):
> - `current_pN.json` — cards currently on screen:
> `{ "updated_at", "channel", "cards": [ { "id", "name", "type", "attribute", "race", "atk", "def", "desc" } ] }`
> (rich fields come from YGOPRODeck; missing fields are omitted).
> - `events_pN.jsonl` — append-only log, one JSON per line:
> `{ "ts", "event": "appeared" | "disappeared", "card": { … } }`.
> - `current_card_pN.txt` — plain text, names of the cards on screen (newline-separated). Point an OBS **Text**
> source at this file (*Read from file*) to show the current card live.
>
> Metadata language defaults to English; set the `card_info_lang` key in the Draw 2 settings store to one of
> `en` / `fr` / `de` / `it` / `pt` (YGOPRODeck does not provide Spanish). The backend half lives in the `draw2`
> backend; the plugin only points it at the output folder.
>
> By default the backend downloads the full card database once (in the background) so metadata is resolved
> **offline**, with no per-card requests. Untick **Download full card database for offline use** to skip the
> download and resolve lazily, one card at a time, instead.
4. Click the `Start DRAW` button to start the detection process. The plugin will start detecting cards in real time
and display them on the screen using the `Draw Display` source. The plugin start detecting from the moment you see
the
Expand Down
2 changes: 2 additions & 0 deletions data/locale/en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ browse="Browse"
ok="&OK"
cancel="&Cancel"
feature_remote_deck="Enable remote decklist (per player: deck files, a URL or a YDKE code)"
feature_card_info="Export detected card info to files (restart DRAW to apply)"
feature_card_info_db="Download full card database for offline use (restart DRAW to apply)"
remote_deck_section="Remote decklist (auth header is sent with URL requests):"
remote_header_name_ph="Header name (e.g. Authorization) — optional"
remote_header_value_ph="Header value (e.g. Bearer …) — optional"
Expand Down
2 changes: 2 additions & 0 deletions data/locale/fr-FR.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ player_2="Joueur 2"
channel="Détecteur / Joueur"
feature_channel="Activer deux joueurs (un détecteur par joueur)"
feature_remote_deck="Activer la decklist distante (par joueur : fichiers, une URL ou un code YDKE)"
feature_card_info="Exporter les infos des cartes détectées vers des fichiers (redémarrer DRAW pour appliquer)"
feature_card_info_db="Télécharger la base de cartes complète pour une utilisation hors ligne (redémarrer DRAW pour appliquer)"
remote_deck_section="Decklist distante (l'en-tête d'authentification est envoyé avec les requêtes URL) :"
remote_header_name_ph="Nom d'en-tête (ex. Authorization) — facultatif"
remote_header_value_ph="Valeur d'en-tête (ex. Bearer …) — facultatif"
Expand Down
2 changes: 2 additions & 0 deletions data/locale/ja-JP.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ player_2="プレイヤー 2"
channel="ディテクター / プレイヤー"
feature_channel="2人プレイを有効にする(プレイヤーごとにディテクターを割り当て)"
feature_remote_deck="リモートデックリストを有効にする(プレイヤーごと:デッキファイル、URL、またはYDKEコード)"
feature_card_info="検出したカード情報をファイルに書き出す(DRAW を再起動して適用)"
feature_card_info_db="オフライン用にカードデータベース全体をダウンロード(DRAW を再起動して適用)"
remote_deck_section="リモートデックリスト(認証ヘッダーはURLリクエストで送信されます):"
remote_header_name_ph="ヘッダー名(例:Authorization)— 任意"
remote_header_value_ph="ヘッダー値(例:Bearer …)— 任意"
Expand Down
23 changes: 23 additions & 0 deletions readmes/README_es.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ Cuando el plugin está instalado y los pesos del modelo están descargados, pued
filtrar, y el log de OBS recibe los detalles de captura (fuente de entrada, dimensiones, recorte).
Útil cuando la detección no funciona como se espera.
- **Enable remote decklist** — permite que cada jugador cargue su deck desde una URL HTTP(S) o un código YDKE en lugar de un archivo `.ydk` local; mira la nota debajo de la fuente `Draw Display`.
- **Export detected card info to files** — escribe las cartas detectadas (JSON / JSONL / texto plano) en una carpeta por usuario, para fuentes de texto de OBS, bots u overlays; mira la nota debajo de la fuente `Draw Display`.
3. El plugin proporciona una nueva fuente llamada `Draw Display`. Puedes añadirla a tu escena como cualquier otra
fuente. Esta fuente mostrará las cartas detectadas en pantalla. Puedes elegir de qué fuente/escena detectar las
cartas. Con el modo de dos jugadores activado, usa la propiedad **Detector / Player** de la fuente para seleccionar de qué detector leer (**Player 1** o **Player 2**); añade un `Draw Display` por jugador para mostrar ambos a la vez.
Expand Down Expand Up @@ -258,6 +259,28 @@ Cuando el plugin está instalado y los pesos del modelo están descargados, pued
>
> ⚠️ Las URLs y el valor de la cabecera se almacenan en texto plano en QSettings, igual que el resto de ajustes
> del plugin — evita guardar secretos de larga duración ahí.

> 💡 El plugin también puede **exportar la información de las cartas detectadas a archivos** para que puedas
> mostrarla en cualquier lugar — una fuente de texto de OBS que el streamer lee en directo, bots, u overlays
> HTML/navegador. Está **desactivado por defecto** — activa *Export detected card info to files* en los ajustes
> de Draw 2 (*Feature flags*) y reinicia DRAW. Mientras está en marcha, cada detector escribe en
> `plugin_config/draw2-plugin/state/` (por jugador `N`):
> - `current_pN.json` — cartas actualmente en pantalla:
> `{ "updated_at", "channel", "cards": [ { "id", "name", "type", "attribute", "race", "atk", "def", "desc" } ] }`
> (los campos enriquecidos provienen de YGOPRODeck; los campos ausentes se omiten).
> - `events_pN.jsonl` — registro de solo adición, un JSON por línea:
> `{ "ts", "event": "appeared" | "disappeared", "card": { … } }`.
> - `current_card_pN.txt` — texto plano, los nombres de las cartas en pantalla (separados por saltos de línea).
> Apunta una fuente **Text** de OBS a este archivo (*Read from file*) para mostrar la carta actual en directo.
>
> El idioma de los metadatos es inglés por defecto; establece la clave `card_info_lang` en el almacén de ajustes
> de Draw 2 a uno de `en` / `fr` / `de` / `it` / `pt` (YGOPRODeck no proporciona español). La mitad del backend
> vive en el backend `draw2`; el plugin solo lo apunta a la carpeta de salida.
>
> De forma predeterminada, el backend descarga la base de datos completa de cartas una vez (en segundo plano) para
> que los metadatos se resuelvan **sin conexión**, sin peticiones por carta. Desmarca
> **Download full card database for offline use** para omitir la descarga y resolverlas de forma diferida, una carta
> a la vez.
4. Haz clic en el botón `Start DRAW` para iniciar el proceso de detección. El plugin empezará a detectar cartas en
tiempo real y a mostrarlas en pantalla mediante la fuente `Draw Display`. El plugin comienza a detectar en el
momento en que ves el botón `Stop DRAW`. Si no lo ves, algo salió mal.
Expand Down
23 changes: 23 additions & 0 deletions readmes/README_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ Une fois le plugin installé et les poids du modèle téléchargés, vous pouvez
sans filtrage, et le journal OBS reçoit les détails de capture (source d'entrée, dimensions,
recadrage). Pratique quand la détection ne se comporte pas comme prévu.
- **Activer la decklist distante** — permet à chaque joueur de charger son deck depuis une URL HTTP(S) ou un code YDKE au lieu d'un fichier `.ydk` local ; voir la note sous la source `Affichage Draw`.
- **Exporter les infos des cartes détectées vers des fichiers** — écrit les cartes détectées (JSON / JSONL / texte brut) dans un dossier par utilisateur, pour des sources Texte OBS, des bots ou des overlays ; voir la note sous la source `Affichage Draw`.
3. Le plugin fournit une nouvelle source appelée `Affichage DRAW`. Vous pouvez l'ajouter à votre scène comme n'importe
quelle autre source.
Cette source affichera les cartes détectées à l'écran. Vous pouvez choisir la source/scène à partir de laquelle
Expand Down Expand Up @@ -266,6 +267,28 @@ Une fois le plugin installé et les poids du modèle téléchargés, vous pouvez
>
> ⚠️ Les URLs et la valeur de l'en-tête sont stockées en texte brut dans QSettings, comme tous les autres paramètres
> du plugin — évitez d'y placer des secrets à longue durée de vie.

> 💡 Le plugin peut également **exporter les informations des cartes détectées vers des fichiers** afin que vous
> puissiez les afficher n'importe où — une source Texte OBS que le streamer lit en direct, des bots ou des overlays
> HTML/navigateur. C'est **désactivé par défaut** — activez *Exporter les infos des cartes détectées vers des fichiers*
> dans les paramètres de Draw 2 (onglet *Fonctionnalités*) et redémarrez DRAW. Pendant l'exécution, chaque détecteur
> écrit dans `plugin_config/draw2-plugin/state/` (par joueur `N`) :
> - `current_pN.json` — cartes actuellement à l'écran :
> `{ "updated_at", "channel", "cards": [ { "id", "name", "type", "attribute", "race", "atk", "def", "desc" } ] }`
> (les champs enrichis proviennent de YGOPRODeck ; les champs manquants sont omis).
> - `events_pN.jsonl` — journal en ajout seul, un JSON par ligne :
> `{ "ts", "event": "appeared" | "disappeared", "card": { … } }`.
> - `current_card_pN.txt` — texte brut, les noms des cartes à l'écran (séparés par des sauts de ligne). Pointez une
> source **Text** OBS vers ce fichier (*Read from file*) pour afficher la carte actuelle en direct.
>
> La langue des métadonnées est l'anglais par défaut ; définissez la clé `card_info_lang` dans le magasin de
> paramètres de Draw 2 sur l'une des valeurs `en` / `fr` / `de` / `it` / `pt` (YGOPRODeck ne fournit pas l'espagnol).
> La moitié backend vit dans le backend `draw2` ; le plugin se contente de la pointer vers le dossier de sortie.
>
> Par défaut, le backend télécharge une fois la base de données complète des cartes (en arrière-plan) afin que les
> métadonnées soient résolues **hors ligne**, sans requête par carte. Décochez
> **Télécharger la base de cartes complète pour une utilisation hors ligne** pour ignorer le téléchargement et les
> résoudre paresseusement, une carte à la fois.
4. Cliquez sur le bouton `Lancer DRAW` pour lancer le processus de détection. Le plugin commencera à détecter les cartes
en temps réel
et les affichera à l'écran à l'aide de la source `Affichage Draw`. Le plugin commence la détection dès que le bouton
Expand Down
13 changes: 13 additions & 0 deletions readmes/README_jp.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ OSに応じた手順に従ってセットアップしてください。
OBSログにはキャプチャの詳細(入力ソース、サイズ、クロップ)が記録されます。
検出が期待通りに動作しない場合に役立ちます。
* **Enable remote decklist** — 各プレイヤーがローカルの `.ydk` ファイルの代わりに HTTP(S) URL または YDKE コードからデッキを読み込めるようにします。`Draw Display` ソースの下の注記を参照してください。
* **Export detected card info to files** — 検出されたカード(JSON / JSONL / プレーンテキスト)をユーザーごとのフォルダに書き出します。OBS のテキストソース、ボット、オーバーレイ向けです。`Draw Display` ソースの下の注記を参照してください。
3. プラグインは `Draw Display` という新しいソースを提供します。シーンに追加すると、検出されたカードが画面上に表示されます。どのソースやシーンからカードを検出するか選択できます。2人プレイモードが有効な場合、ソースの **Detector / Player** プロパティで、どのディテクターから読み取るか(**Player 1** または **Player 2**)を選択できます。両方を表示するには、プレイヤーごとに1つの `Draw Display` を追加してください。

> 💡 プラグインはローカルの `.ydk` ファイルの代わりに **HTTP(S) URL** または **YDKE コード**(`ydke://…`)からデッキリストを読み込むこともできます。リモート API やトーナメント管理システムがデッキリストを提供している場合や、YDKE リンクで共有されている場合に便利です。この機能は**デフォルトでは無効**です。Draw 2 の設定(*高度な機能*)で **Enable remote decklist** を有効にしてください。ソースはその後、専用の **Decklist** タブで設定します。
Expand All @@ -157,6 +158,18 @@ OSに応じた手順に従ってセットアップしてください。
> 任意の認証ヘッダー(名前 + 値、例:`Authorization` / `Bearer …`)を設定でき、すべてのリクエストに付与されます。
>
> ⚠️ URL とヘッダーの値は、他のすべてのプラグイン設定と同様に QSettings にプレーンテキストで保存されます。長期間有効なシークレットをここに保存しないように注意してください。

> 💡 プラグインは**検出されたカード情報をファイルにエクスポート**することもできるので、どこにでも表示できます — ストリーマーが配信で読み上げる OBS のテキストソース、ボット、または HTML/ブラウザのオーバーレイなど。**デフォルトでは無効**です。Draw 2 の設定(*Feature flags*)で *Export detected card info to files* を有効にして DRAW を再起動してください。実行中、各ディテクターは `plugin_config/draw2-plugin/state/` に書き込みます(プレイヤー `N` ごと):
> - `current_pN.json` — 現在画面上にあるカード:
> `{ "updated_at", "channel", "cards": [ { "id", "name", "type", "attribute", "race", "atk", "def", "desc" } ] }`
> (リッチなフィールドは YGOPRODeck から取得され、欠落しているフィールドは省略されます)。
> - `events_pN.jsonl` — 追記専用のログ、1行につき1つの JSON:
> `{ "ts", "event": "appeared" | "disappeared", "card": { … } }`。
> - `current_card_pN.txt` — プレーンテキスト、画面上のカードの名前(改行区切り)。OBS の **Text** ソースをこのファイルに向ければ(*Read from file*)、現在のカードをライブで表示できます。
>
> メタデータの言語はデフォルトで英語です。Draw 2 の設定ストアの `card_info_lang` キーを `en` / `fr` / `de` / `it` / `pt` のいずれかに設定してください(YGOPRODeck はスペイン語を提供していません)。バックエンド側は `draw2` バックエンドにあり、プラグインはそれを出力フォルダに向けるだけです。
>
> デフォルトでは、バックエンドはカードデータベース全体を一度(バックグラウンドで)ダウンロードするため、メタデータはカードごとのリクエストなしで**オフライン**で解決されます。**Download full card database for offline use** のチェックを外すと、ダウンロードを省略し、代わりに1枚ずつ遅延的に解決します。
4. `Start DRAW` ボタンをクリックして検出を開始します。プラグインはリアルタイムでカードを検出し、`Draw Display` ソースを使って画面に表示します。`Stop DRAW` ボタンが表示された時点から検出が始まります。表示されない場合は、何か問題が発生しています。
5. 問題がなければ、プラグインをお楽しみください!

Expand Down
Loading
Loading