feat: Add new GUI effects view and numerous image assets.
This commit is contained in:
34
main.py
34
main.py
@@ -1,32 +1,36 @@
|
||||
"""
|
||||
Umamusume Support Card Manager
|
||||
Main entry point for the application
|
||||
"""
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
import os
|
||||
import logging
|
||||
|
||||
# Configure logging
|
||||
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
||||
|
||||
# Add project root to path
|
||||
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
def run_scraper():
|
||||
"""Run the web scraper to fetch card data"""
|
||||
from scraper.gametora_scraper import run_scraper as scrape
|
||||
scrape()
|
||||
try:
|
||||
from scraper.gametora_scraper import run_scraper as scrape
|
||||
scrape()
|
||||
except Exception as e:
|
||||
logging.error(f"An error occurred while running the scraper: {e}")
|
||||
sys.exit(1)
|
||||
|
||||
def run_gui():
|
||||
"""Launch the Tkinter GUI application"""
|
||||
from gui.main_window import MainWindow
|
||||
app = MainWindow()
|
||||
app.run()
|
||||
try:
|
||||
from gui.main_window import MainWindow
|
||||
app = MainWindow()
|
||||
app.run()
|
||||
except Exception as e:
|
||||
logging.error(f"An error occurred while launching the GUI: {e}")
|
||||
sys.exit(1)
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Umamusume Support Card Manager",
|
||||
formatter_class=argparse.RawDescriptionHelpFormatter,
|
||||
epilog="""
|
||||
Examples:
|
||||
epilog="""Examples:
|
||||
python main.py # Launch the GUI (default)
|
||||
python main.py --gui # Launch the GUI
|
||||
python main.py --scrape # Run the web scraper
|
||||
@@ -55,4 +59,4 @@ Examples:
|
||||
run_gui()
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
main()
|
||||
Reference in New Issue
Block a user