feat(config): surface optional anki/jimaku keys in example config

Add ankiConnect.deck, jimaku.apiKey, and jimaku.apiKeyCommand to the
defaults so they appear in the generated config.example.jsonc, and
change the static/animated image maxima (imageMaxWidth, imageMaxHeight,
animatedMaxHeight) from undefined to 0 so they render too. The resize
paths already treat 0 as "no limit", so this is behavior-neutral and
just improves discoverability of these previously-undocumented keys.
This commit is contained in:
2026-05-23 21:21:07 -07:00
parent 7e86c4ea3d
commit 4d1a20d69b
4 changed files with 42 additions and 6 deletions
+24 -3
View File
@@ -58,6 +58,13 @@ export function buildIntegrationConfigOptionRegistry(
description:
'Tags to add to cards mined or updated by SubMiner. Provide an empty array to disable automatic tagging.',
},
{
path: 'ankiConnect.deck',
kind: 'string',
defaultValue: defaultConfig.ankiConnect.deck,
description:
'Restrict duplicate detection and card enrichment to this Anki deck. Leave empty to search all decks.',
},
{
path: 'ankiConnect.fields.word',
kind: 'string',
@@ -200,14 +207,14 @@ export function buildIntegrationConfigOptionRegistry(
kind: 'number',
defaultValue: defaultConfig.ankiConnect.media.imageMaxWidth,
description:
'Optional maximum width for static images. Leave unset to preserve the source resolution.',
'Maximum width for static images, in pixels. Set to 0 to preserve the source resolution.',
},
{
path: 'ankiConnect.media.imageMaxHeight',
kind: 'number',
defaultValue: defaultConfig.ankiConnect.media.imageMaxHeight,
description:
'Optional maximum height for static images. Leave unset to preserve the source resolution.',
'Maximum height for static images, in pixels. Set to 0 to preserve the source resolution.',
},
{
path: 'ankiConnect.media.animatedFps',
@@ -226,7 +233,7 @@ export function buildIntegrationConfigOptionRegistry(
kind: 'number',
defaultValue: defaultConfig.ankiConnect.media.animatedMaxHeight,
description:
'Optional maximum height for animated AVIF captures. Leave unset to preserve aspect ratio.',
'Maximum height for animated AVIF captures, in pixels. Set to 0 to preserve aspect ratio.',
},
{
path: 'ankiConnect.media.animatedCrf',
@@ -344,6 +351,20 @@ export function buildIntegrationConfigOptionRegistry(
defaultValue: defaultConfig.jimaku.apiBaseUrl,
description: 'Base URL of the Jimaku subtitle search API.',
},
{
path: 'jimaku.apiKey',
kind: 'string',
defaultValue: defaultConfig.jimaku.apiKey,
description:
'Jimaku API key. Optional but recommended for higher rate limits. Get one for free at https://jimaku.cc.',
},
{
path: 'jimaku.apiKeyCommand',
kind: 'string',
defaultValue: defaultConfig.jimaku.apiKeyCommand,
description:
'Shell command that prints the Jimaku API key to stdout. Used instead of apiKey to avoid storing the key in plain text.',
},
{
path: 'jimaku.languagePreference',
kind: 'enum',