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
|
import colorama
|
||||||
from colorama import Fore, Style # type: ignore
|
from colorama import Fore, Style # type: ignore
|
||||||
|
|
||||||
from .util import install_container, display_banner
|
from dangerzone import container
|
||||||
from .common import Common
|
from dangerzone.common import Common
|
||||||
from .container import convert
|
|
||||||
import dangerzone.util as dzutil
|
import dangerzone.util as dzutil
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,7 +22,7 @@ def print_header(s):
|
||||||
def cli_main(output_filename, ocr_lang, filename):
|
def cli_main(output_filename, ocr_lang, filename):
|
||||||
colorama.init(autoreset=True)
|
colorama.init(autoreset=True)
|
||||||
common = Common()
|
common = Common()
|
||||||
display_banner()
|
dzutil.display_banner()
|
||||||
|
|
||||||
# Validate filename
|
# Validate filename
|
||||||
valid = True
|
valid = True
|
||||||
|
@ -85,7 +84,7 @@ def cli_main(output_filename, ocr_lang, filename):
|
||||||
return
|
return
|
||||||
|
|
||||||
# Ensure container is installed
|
# Ensure container is installed
|
||||||
install_container()
|
dzutil.install_container()
|
||||||
|
|
||||||
# Convert the document
|
# Convert the document
|
||||||
print_header("Converting document to safe PDF")
|
print_header("Converting document to safe PDF")
|
||||||
|
@ -102,7 +101,7 @@ def cli_main(output_filename, ocr_lang, filename):
|
||||||
except:
|
except:
|
||||||
click.echo(f"Invalid JSON returned from container: {line}")
|
click.echo(f"Invalid JSON returned from container: {line}")
|
||||||
|
|
||||||
if convert(
|
if container.convert(
|
||||||
common.input_filename,
|
common.input_filename,
|
||||||
common.output_filename,
|
common.output_filename,
|
||||||
ocr_lang,
|
ocr_lang,
|
||||||
|
|
|
@ -9,10 +9,10 @@ import uuid
|
||||||
|
|
||||||
import colorama
|
import colorama
|
||||||
|
|
||||||
from .application import Application
|
from dangerzone.gui.application import Application
|
||||||
from .gui_common import GuiCommon
|
from dangerzone.gui.gui_common import GuiCommon
|
||||||
from .main_window import MainWindow
|
from dangerzone.gui.main_window import MainWindow
|
||||||
from .systray import SysTray
|
from dangerzone.gui.systray import SysTray
|
||||||
|
|
||||||
|
|
||||||
@click.command()
|
@click.command()
|
||||||
|
|
|
@ -6,8 +6,8 @@ import pipes
|
||||||
from PySide6 import QtGui
|
from PySide6 import QtGui
|
||||||
from colorama import Fore
|
from colorama import Fore
|
||||||
|
|
||||||
from . import Application
|
from dangerzone.gui import Application
|
||||||
from .settings import Settings
|
from dangerzone.gui.settings import Settings
|
||||||
|
|
||||||
if platform.system() == "Linux":
|
if platform.system() == "Linux":
|
||||||
from xdg.DesktopEntry import DesktopEntry # type: ignore
|
from xdg.DesktopEntry import DesktopEntry # type: ignore
|
||||||
|
|
|
@ -9,10 +9,10 @@ from PySide6.QtGui import QIcon
|
||||||
from colorama import Style, Fore
|
from colorama import Style, Fore
|
||||||
|
|
||||||
import dangerzone.util as dzutil
|
import dangerzone.util as dzutil
|
||||||
from . import GuiCommon
|
from dangerzone.gui import GuiCommon
|
||||||
from ..common import Common
|
from dangerzone.common import Common
|
||||||
from ..container import convert
|
from dangerzone.container import convert
|
||||||
from ..util import install_container
|
from dangerzone.util import install_container
|
||||||
|
|
||||||
|
|
||||||
class MainWindow(QtWidgets.QMainWindow):
|
class MainWindow(QtWidgets.QMainWindow):
|
||||||
|
|
Loading…
Reference in a new issue