added cli interface for metadata download. Now just need to... really download the metadata
This commit is contained in:
parent
713949d35f
commit
7e07d798b3
Binary file not shown.
31
src/main.py
Normal file
31
src/main.py
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
import metadata
|
||||||
|
|
||||||
|
|
||||||
|
def search_for_metadata(query: str):
|
||||||
|
search = metadata.Search(query=query)
|
||||||
|
|
||||||
|
print(search.options)
|
||||||
|
while True:
|
||||||
|
input_ = input("q to quit, ok to download, .. for previous options, . for current options, int for this element: ").lower()
|
||||||
|
input_.strip()
|
||||||
|
if input_ == "q":
|
||||||
|
exit(0)
|
||||||
|
if input_ == "ok":
|
||||||
|
return search
|
||||||
|
if input_ == ".":
|
||||||
|
print(search.options)
|
||||||
|
continue
|
||||||
|
if input_ == "..":
|
||||||
|
print(search.get_previous_options())
|
||||||
|
continue
|
||||||
|
if input_.isdigit():
|
||||||
|
print(search.choose(int(input_)))
|
||||||
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
def cli():
|
||||||
|
search = search_for_metadata(query=input("initial query: "))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
cli()
|
@ -180,6 +180,7 @@ def automated_demo():
|
|||||||
print(search.get_previous_options())
|
print(search.get_previous_options())
|
||||||
print(search.choose(6))
|
print(search.choose(6))
|
||||||
|
|
||||||
|
|
||||||
def interactive_demo():
|
def interactive_demo():
|
||||||
search = Search(query=input("initial query: "))
|
search = Search(query=input("initial query: "))
|
||||||
print(search.options)
|
print(search.options)
|
||||||
|
Loading…
Reference in New Issue
Block a user