change backup tool name to 'reaper'
This commit is contained in:
parent
9bf4b89e00
commit
fea2f8f573
4 changed files with 11 additions and 11 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import sys
|
||||
import asyncio
|
||||
import logging
|
||||
from src.ui.exodus_app import run_exodus
|
||||
from src.ui.disco_reaper_app import run_disco_reaper
|
||||
from src.core.configuration import load_config
|
||||
|
||||
def setup_logging():
|
||||
|
|
@ -12,7 +12,7 @@ def setup_logging():
|
|||
except Exception:
|
||||
level = logging.INFO
|
||||
|
||||
handlers = [logging.FileHandler('exodus.log', mode='a')]
|
||||
handlers = [logging.FileHandler('disco-reaper.log', mode='a')]
|
||||
logging.basicConfig(
|
||||
format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s',
|
||||
datefmt='%H:%M:%S',
|
||||
|
|
@ -31,7 +31,7 @@ def relaunch_in_terminal():
|
|||
return
|
||||
|
||||
is_tty = sys.stdin.isatty() or sys.stdout.isatty()
|
||||
if is_tty or os.environ.get("EXODUS_RELAUNCHED"):
|
||||
if is_tty or os.environ.get("DISCO_REAPER_RELAUNCHED"):
|
||||
return
|
||||
|
||||
terminals = [
|
||||
|
|
@ -48,7 +48,7 @@ def relaunch_in_terminal():
|
|||
args = [executable] + sys.argv[1:]
|
||||
|
||||
env = os.environ.copy()
|
||||
env["EXODUS_RELAUNCHED"] = "1"
|
||||
env["DISCO_REAPER_RELAUNCHED"] = "1"
|
||||
|
||||
for term, cmd_args in terminals:
|
||||
if shutil.which(term):
|
||||
|
|
@ -62,7 +62,7 @@ async def main():
|
|||
relaunch_in_terminal()
|
||||
setup_logging()
|
||||
try:
|
||||
await run_exodus()
|
||||
await run_disco_reaper()
|
||||
except KeyboardInterrupt:
|
||||
print("\nExiting...")
|
||||
except Exception as e:
|
||||
|
|
@ -30,4 +30,4 @@ else
|
|||
fi
|
||||
|
||||
# Run the application
|
||||
python3 discord-exodus.py "$@"
|
||||
python3 disco-reaper.py "$@"
|
||||
|
|
@ -11,11 +11,11 @@ from rich.progress import Progress, SpinnerColumn, TextColumn, BarColumn, TaskPr
|
|||
|
||||
from src.core.configuration import load_config, save_config
|
||||
from src.core.base import MigrationContext
|
||||
from src.exodus.exporter import DiscordExporter
|
||||
from src.disco_reaper.exporter import DiscordExporter
|
||||
|
||||
console = Console()
|
||||
|
||||
class ExodusCLI:
|
||||
class DiscoReaperCLI:
|
||||
"""CLI app to manage Discord server data export."""
|
||||
|
||||
def __init__(self, config_path="config.yaml"):
|
||||
|
|
@ -71,7 +71,7 @@ class ExodusCLI:
|
|||
|
||||
while True:
|
||||
console.print("")
|
||||
console.print(Panel.fit("Discord Exodus - Server Exporter", style="bold green"))
|
||||
console.print(Panel.fit("Disco Reaper - Server Backup Tool", style="bold green"))
|
||||
|
||||
d_name = self.validation_results.get("discord_server_name")
|
||||
d_display = f"[bold green]\"{d_name}\"[/bold green]" if d_name else "[bold red]NOT CONNECTED[/bold red]"
|
||||
|
|
@ -239,6 +239,6 @@ class ExodusCLI:
|
|||
else:
|
||||
console.print("[yellow]No changes.[/yellow]")
|
||||
|
||||
async def run_exodus(config_path="config.yaml"):
|
||||
app = ExodusCLI(config_path)
|
||||
async def run_disco_reaper(config_path="config.yaml"):
|
||||
app = DiscoReaperCLI(config_path)
|
||||
await app.run()
|
||||
Loading…
Add table
Reference in a new issue