31 lines
874 B
Python
31 lines
874 B
Python
from __future__ import annotations
|
|
|
|
import argparse
|
|
from pathlib import Path
|
|
|
|
from copienator_gui.app import CopienatorApp
|
|
|
|
|
|
def personal_steps_enabled() -> bool:
|
|
try:
|
|
from copienator.configuration import SHOW_PERSONAL_STEPS
|
|
except (ImportError, AttributeError):
|
|
return False
|
|
return bool(SHOW_PERSONAL_STEPS)
|
|
|
|
|
|
def main(argv=None) -> int:
|
|
parser = argparse.ArgumentParser(description="Interface graphique du workflow Copienator")
|
|
parser.add_argument("evaluation", nargs="?", type=Path, help="Dossier d’évaluation à ouvrir")
|
|
args = parser.parse_args(argv)
|
|
|
|
repository = Path.cwd().resolve()
|
|
evaluation = args.evaluation.resolve() if args.evaluation else None
|
|
app = CopienatorApp(repository, personal_steps_enabled(), evaluation)
|
|
app.mainloop()
|
|
return 0
|
|
|
|
|
|
if __name__ == "__main__":
|
|
raise SystemExit(main())
|