diff --git a/offpunk.py b/offpunk.py new file mode 100755 index 0000000..020e9bf --- /dev/null +++ b/offpunk.py @@ -0,0 +1,3 @@ +#!/usr/bin/env python3 +from offpunk import main +main() diff --git a/offpunk/__init__.py b/offpunk/__init__.py index 962c9e6..363dfc4 100644 --- a/offpunk/__init__.py +++ b/offpunk/__init__.py @@ -21,9 +21,9 @@ import sys import time import urllib.parse import subprocess -from . import ansicat, netcache, opnk, themes -from .utils import run,term_width,is_local,mode_url,unmode_url -from .utils import _CONFIG_DIR,_DATA_DIR,_CACHE_PATH +from offpunk import ansicat, netcache, opnk, themes +from offpunk.utils import run,term_width,is_local,mode_url,unmode_url +from offpunk.utils import _CONFIG_DIR,_DATA_DIR,_CACHE_PATH try: import setproctitle setproctitle.setproctitle("offpunk") @@ -138,7 +138,7 @@ class GeminiClient(cmd.Cmd): # type sensitivie information. os.umask(0o077) self.opencache = opnk.opencache() - self.theme = offthemes.default + self.theme = themes.default self.prompt = self.set_prompt("ON") self.current_url = None self.hist_index = 0 @@ -205,8 +205,8 @@ class GeminiClient(cmd.Cmd): open_color = "" close_color = "" for c in colors: - if c in offthemes.colors: - ansi = offthemes.colors[c] + if c in themes.colors: + ansi = themes.colors[c] else: ansi = ["32","39"] open_color += "%s;"%ansi[0] diff --git a/offpunk/__main__.py b/offpunk/__main__.py index 69141b8..f984c47 100644 --- a/offpunk/__main__.py +++ b/offpunk/__main__.py @@ -1,3 +1,3 @@ -from . import main +from offpunk import main main() diff --git a/offpunk/ansicat.py b/offpunk/ansicat.py index 0b3b8aa..5530e16 100644 --- a/offpunk/ansicat.py +++ b/offpunk/ansicat.py @@ -10,9 +10,9 @@ import urllib import argparse import mimetypes import fnmatch -from . import netcache, themes -from .utils import run,term_width,is_local,looks_like_base64 -from .utils import _DATA_DIR +from offpunk import netcache, themes +from offpunk.utils import run,term_width,is_local,looks_like_base64 +from offpunk.utils import _DATA_DIR try: from readability import Document _HAS_READABILITY = True diff --git a/offpunk/netcache.py b/offpunk/netcache.py index 6270a47..1c61f81 100644 --- a/offpunk/netcache.py +++ b/offpunk/netcache.py @@ -13,8 +13,8 @@ import datetime import hashlib import sqlite3 from ssl import CertificateError -from . import ansicat, utils -from .utils import _CACHE_PATH,_DATA_DIR,_CONFIG_DIR +from offpunk import ansicat, utils +from offpunk.utils import _CACHE_PATH,_DATA_DIR,_CONFIG_DIR import time try: import chardet diff --git a/offpunk/opnk.py b/offpunk/opnk.py index 45c695c..a7f4f6c 100644 --- a/offpunk/opnk.py +++ b/offpunk/opnk.py @@ -10,8 +10,8 @@ import argparse import shutil import time import fnmatch -from . import ansicat, netcache, utils -from .utils import run,term_width,mode_url,unmode_url,is_local +from offpunk import ansicat, netcache, utils +from offpunk.utils import run,term_width,mode_url,unmode_url,is_local _HAS_XDGOPEN = shutil.which('xdg-open') _GREP = "grep --color=auto" diff --git a/offpunk/utils.py b/offpunk/utils.py index 413f5db..c039916 100644 --- a/offpunk/utils.py +++ b/offpunk/utils.py @@ -13,7 +13,7 @@ import shutil import shlex import urllib.parse import urllib.parse -from . import cache_migration +from offpunk import cache_migration CACHE_VERSION = 1