mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-04 12:41:50 +02:00
Convert relative imports to absolute
This commit is contained in:
parent
4fd233e72b
commit
52e5154ee7
4 changed files with 15 additions and 16 deletions
|
@ -5,9 +5,8 @@ import click
|
|||
import colorama
|
||||
from colorama import Fore, Style # type: ignore
|
||||
|
||||
from .util import install_container, display_banner
|
||||
from .common import Common
|
||||
from .container import convert
|
||||
from dangerzone import container
|
||||
from dangerzone.common import Common
|
||||
import dangerzone.util as dzutil
|
||||
|
||||
|
||||
|
@ -23,7 +22,7 @@ def print_header(s):
|
|||
def cli_main(output_filename, ocr_lang, filename):
|
||||
colorama.init(autoreset=True)
|
||||
common = Common()
|
||||
display_banner()
|
||||
dzutil.display_banner()
|
||||
|
||||
# Validate filename
|
||||
valid = True
|
||||
|
@ -85,7 +84,7 @@ def cli_main(output_filename, ocr_lang, filename):
|
|||
return
|
||||
|
||||
# Ensure container is installed
|
||||
install_container()
|
||||
dzutil.install_container()
|
||||
|
||||
# Convert the document
|
||||
print_header("Converting document to safe PDF")
|
||||
|
@ -102,7 +101,7 @@ def cli_main(output_filename, ocr_lang, filename):
|
|||
except:
|
||||
click.echo(f"Invalid JSON returned from container: {line}")
|
||||
|
||||
if convert(
|
||||
if container.convert(
|
||||
common.input_filename,
|
||||
common.output_filename,
|
||||
ocr_lang,
|
||||
|
|
|
@ -9,10 +9,10 @@ import uuid
|
|||
|
||||
import colorama
|
||||
|
||||
from .application import Application
|
||||
from .gui_common import GuiCommon
|
||||
from .main_window import MainWindow
|
||||
from .systray import SysTray
|
||||
from dangerzone.gui.application import Application
|
||||
from dangerzone.gui.gui_common import GuiCommon
|
||||
from dangerzone.gui.main_window import MainWindow
|
||||
from dangerzone.gui.systray import SysTray
|
||||
|
||||
|
||||
@click.command()
|
||||
|
|
|
@ -6,8 +6,8 @@ import pipes
|
|||
from PySide6 import QtGui
|
||||
from colorama import Fore
|
||||
|
||||
from . import Application
|
||||
from .settings import Settings
|
||||
from dangerzone.gui import Application
|
||||
from dangerzone.gui.settings import Settings
|
||||
|
||||
if platform.system() == "Linux":
|
||||
from xdg.DesktopEntry import DesktopEntry # type: ignore
|
||||
|
|
|
@ -9,10 +9,10 @@ from PySide6.QtGui import QIcon
|
|||
from colorama import Style, Fore
|
||||
|
||||
import dangerzone.util as dzutil
|
||||
from . import GuiCommon
|
||||
from ..common import Common
|
||||
from ..container import convert
|
||||
from ..util import install_container
|
||||
from dangerzone.gui import GuiCommon
|
||||
from dangerzone.common import Common
|
||||
from dangerzone.container import convert
|
||||
from dangerzone.util import install_container
|
||||
|
||||
|
||||
class MainWindow(QtWidgets.QMainWindow):
|
||||
|
|
Loading…
Reference in a new issue