Skip to content
Draft
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
3 changes: 1 addition & 2 deletions env.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
{
"VOICEVOX_RESOURCE_VERSION": "0.25.0",
"VOICEVOX_NEMO_RESOURCE_VERSION": "0.25.0"
"VOICEVOX_RESOURCE_VERSION": "0.25.0"
}
13 changes: 2 additions & 11 deletions scripts/make_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
@dataclass
class Args:
voicevox_resource_ref: str
voicevox_nemo_resource_ref: str


@dataclass
Expand Down Expand Up @@ -67,15 +66,9 @@ def parse_args() -> Args:
default=env["VOICEVOX_RESOURCE_VERSION"],
help=f"voicevox_resourceのタグ名またはブランチ名(デフォルト: {env['VOICEVOX_RESOURCE_VERSION']})",
)
parser.add_argument(
"--voicevox-nemo-resource-ref",
default=env["VOICEVOX_NEMO_RESOURCE_VERSION"],
help=f"voicevox_nemo_resourceのタグ名またはブランチ名(デフォルト: {env['VOICEVOX_NEMO_RESOURCE_VERSION']})",
)
args = parser.parse_args()
return Args(
voicevox_resource_ref=args.voicevox_resource_ref,
voicevox_nemo_resource_ref=args.voicevox_nemo_resource_ref,
)


Expand All @@ -89,7 +82,7 @@ def load_env() -> dict[str, str]:
def fetch_and_generate_terms(refs: Args) -> Terms:
"""VOICEVOXとVOICEVOX Nemoの利用規約を取得し、利用規約を生成"""
voicevox_terms = fetch_voicevox_terms(refs.voicevox_resource_ref)
nemo_terms = fetch_and_extract_nemo_terms(refs.voicevox_nemo_resource_ref)
nemo_terms = fetch_and_extract_nemo_terms(refs.voicevox_resource_ref)

combined_markdown = voicevox_terms.markdown.rstrip() + "\n\n" + nemo_terms.markdown
combined_text = voicevox_terms.text.rstrip() + "\n\n" + nemo_terms.text
Expand All @@ -114,9 +107,7 @@ def fetch_voicevox_terms(ref: str) -> Terms:

def fetch_and_extract_nemo_terms(ref: str) -> Terms:
"""VOICEVOX Nemoの音声ライブラリ利用規約部分を抽出"""
base_url = (
f"https://raw.githubusercontent.com/VOICEVOX/voicevox_nemo_resource/{ref}/"
)
base_url = f"https://raw.githubusercontent.com/VOICEVOX/voicevox_resource/{ref}/"

markdown_url = base_url + "voicevox_nemo/vvm/README.md"
with request.urlopen(markdown_url) as response:
Expand Down
Loading