move cli and api into wrapper

This commit is contained in:
Ftps
2024-03-07 21:50:15 +09:00
parent 0c3c512396
commit 785abd7830
12 changed files with 75 additions and 19 deletions

View File

@@ -0,0 +1,9 @@
import urllib
import click
@click.command()
def dlmodel() -> None:
# Download models [harvest, uvr5, and more ]
pass

View File

@@ -0,0 +1,40 @@
"""
setup or cleanup enviroment file
usage: rvc env [create / cleanup]
Default: [nowDir/.env]
"""
import os
import click
@click.group()
def env():
pass
@env.command()
def create():
env_file_path = os.path.join(os.getcwd(), ".env")
if not os.path.exists(env_file_path):
default_values = {
"weight_root": "",
"weight_uvr5_root": "",
"index_root": "",
"rmvpe_root": "",
"hubert_path": "",
"save_uvr_path": "",
"TEMP": "",
"pretrained": "",
}
with open(env_file_path, "w") as env_file:
for key, value in default_values.items():
env_file.write(f"{key}={value}\n")
click.echo(f"{env_file_path} created successfully.")
else:
click.echo(f"{env_file_path} already exists, no change")

View File

@@ -0,0 +1,11 @@
"""
Uage: rvc init
download model and setup environmmnt file
"""
import click
@click.command()
def init():
pass