mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 02:12:36 +02:00
Add --version flag
This commit is contained in:
parent
0ab9f42dd9
commit
fb3cb98793
2 changed files with 3 additions and 1 deletions
|
@ -38,6 +38,7 @@ def print_header(s: str) -> None:
|
||||||
type=click.UNPROCESSED,
|
type=click.UNPROCESSED,
|
||||||
callback=args.validate_input_filenames,
|
callback=args.validate_input_filenames,
|
||||||
)
|
)
|
||||||
|
@click.version_option(version=get_version(), message="%(version)s")
|
||||||
@errors.handle_document_errors
|
@errors.handle_document_errors
|
||||||
def cli_main(
|
def cli_main(
|
||||||
output_filename: Optional[str],
|
output_filename: Optional[str],
|
||||||
|
|
|
@ -13,7 +13,7 @@ from PySide2 import QtCore, QtGui, QtWidgets
|
||||||
|
|
||||||
from .. import args, errors
|
from .. import args, errors
|
||||||
from ..document import Document
|
from ..document import Document
|
||||||
from ..util import get_resource_path
|
from ..util import get_resource_path, get_version
|
||||||
from .logic import DangerzoneGui
|
from .logic import DangerzoneGui
|
||||||
from .main_window import MainWindow
|
from .main_window import MainWindow
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ class Application(QtWidgets.QApplication):
|
||||||
type=click.UNPROCESSED,
|
type=click.UNPROCESSED,
|
||||||
callback=args.validate_input_filenames,
|
callback=args.validate_input_filenames,
|
||||||
)
|
)
|
||||||
|
@click.version_option(version=get_version(), message="%(version)s")
|
||||||
@errors.handle_document_errors
|
@errors.handle_document_errors
|
||||||
def gui_main(filenames: Optional[List[str]]) -> bool:
|
def gui_main(filenames: Optional[List[str]]) -> bool:
|
||||||
setup_logging()
|
setup_logging()
|
||||||
|
|
Loading…
Reference in a new issue