Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

__main__.py 1009 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  1. import argparse
  2. import sys
  3. parser = argparse.ArgumentParser()
  4. parser.add_argument("command")
  5. parser.add_argument("args", nargs="*")
  6. def main():
  7. args = parser.parse_args()
  8. if args.command == "version":
  9. from deadtrees.version import __version__
  10. print(__version__)
  11. sys.exit(0)
  12. # if args.command == "search":
  13. # from mtg_search.api import search
  14. # query = " ".join(args.args)
  15. # print(f"query is: {query}")
  16. # print()
  17. # for c in search(query):
  18. # print(c.name)
  19. # print(c.text)
  20. # print()
  21. # sys.exit(0)
  22. # if args.command == "index":
  23. # from mtg_search.api import create_index
  24. # create_index()
  25. # sys.exit(0)
  26. # if args.command == "checkpoint":
  27. # from mtg_search.checkpoint import CHECKPOINT
  28. # print(CHECKPOINT)
  29. # sys.exit(0)
  30. # else:
  31. # print("unknown command")
  32. # sys.exit(1)
  33. if __name__ == "__main__":
  34. main()
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...