mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-06-13 15:13:32 -07:00
docs: remove legacy option refs and modernize config docs (#89)
This commit is contained in:
@@ -18,6 +18,17 @@ const TOP_LEVEL_SECTION_DESCRIPTION_BY_KEY = new Map(
|
||||
CONFIG_TEMPLATE_SECTIONS.map((section) => [String(section.key), section.description[0] ?? '']),
|
||||
);
|
||||
const SUBTITLE_CSS_SCOPES: SubtitleCssScope[] = ['primary', 'secondary', 'sidebar'];
|
||||
const HIDDEN_TEMPLATE_PATHS = [
|
||||
'anilist.characterDictionary.evictionPolicy',
|
||||
'anilist.characterDictionary.refreshTtlHours',
|
||||
'youtubeSubgen.ai.model',
|
||||
'youtubeSubgen.ai.systemPrompt',
|
||||
'youtubeSubgen.fixWithAi',
|
||||
'youtubeSubgen.whisperBin',
|
||||
'youtubeSubgen.whisperModel',
|
||||
'youtubeSubgen.whisperThreads',
|
||||
'youtubeSubgen.whisperVadModel',
|
||||
];
|
||||
|
||||
function normalizeCommentText(value: string): string {
|
||||
return value.replace(/\s+/g, ' ').replace(/\*\//g, '*\\/').trim();
|
||||
@@ -172,6 +183,9 @@ function renderSection(
|
||||
function createTemplateConfig(config: ResolvedConfig): ResolvedConfig {
|
||||
const templateConfig = deepCloneConfig(config);
|
||||
foldSubtitleCssManagedDefaults(templateConfig);
|
||||
for (const hiddenPath of HIDDEN_TEMPLATE_PATHS) {
|
||||
deleteValueAtPath(templateConfig, hiddenPath);
|
||||
}
|
||||
if (templateConfig.keybindings.length === 0) {
|
||||
templateConfig.keybindings = DEFAULT_KEYBINDINGS.map((binding) => ({
|
||||
key: binding.key,
|
||||
|
||||
Reference in New Issue
Block a user