Filesystem tools
This commit is contained in:
parent
7e7b46c36b
commit
c339f1ea08
2 changed files with 42 additions and 3 deletions
|
@ -1,18 +1,18 @@
|
|||
import argparse
|
||||
import api
|
||||
#import urllib.request
|
||||
import mcfs
|
||||
|
||||
def validate():
|
||||
pass
|
||||
|
||||
def install(projects:list):
|
||||
to_install = []
|
||||
for project in projects:
|
||||
project_data = api.project(project=project)
|
||||
version = api.version(version=project_data.versions[0])
|
||||
file = version.files[0].get("url", "NO URL")
|
||||
print(file)
|
||||
api.download(file, version.files[0].get("size", 0))
|
||||
#urllib.request.urlretrieve(file)
|
||||
|
||||
def search():
|
||||
pass
|
||||
|
@ -29,7 +29,7 @@ validate - validate mods installation\n search - search mods'''
|
|||
args = parser.parse_args()
|
||||
match args.method:
|
||||
case "install":
|
||||
install(args.method_args)
|
||||
pass
|
||||
case "search":
|
||||
search()
|
||||
case "validate":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue