[新規追加] ドキュメントのエンドポイントとマッピングの検証スクリプトを追加
This commit is contained in:
22
src-python/scripts/find_doc_tokens.py
Normal file
22
src-python/scripts/find_doc_tokens.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from pathlib import Path
|
||||
|
||||
ROOT = Path(__file__).resolve().parents[1]
|
||||
DOC_DIR = ROOT / 'docs'
|
||||
|
||||
tokens = [
|
||||
'transcription_mic',
|
||||
'transcription_speaker',
|
||||
'selected_translation_compute_device',
|
||||
'/run/selected_translation_compute_device',
|
||||
'/run/transcription_mic',
|
||||
'/run/transcription_speaker',
|
||||
]
|
||||
|
||||
for p in DOC_DIR.rglob('*.md'):
|
||||
text = p.read_text(encoding='utf-8')
|
||||
for i, line in enumerate(text.splitlines(), start=1):
|
||||
for t in tokens:
|
||||
if t in line:
|
||||
print(f"{p}:{i}:{line.strip()}")
|
||||
|
||||
print('done')
|
||||
Reference in New Issue
Block a user