forked from solderpunk/AV-98
Use relative imports when importing offpunk's own modules
This should allow running offpunk locally from any directory.
This commit is contained in:
parent
370e7e4dc5
commit
6e215c0512
|
@ -21,9 +21,9 @@ import sys
|
|||
import time
|
||||
import urllib.parse
|
||||
import subprocess
|
||||
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
|
||||
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
|
||||
try:
|
||||
import setproctitle
|
||||
setproctitle.setproctitle("offpunk")
|
||||
|
|
|
@ -10,9 +10,9 @@ import urllib
|
|||
import argparse
|
||||
import mimetypes
|
||||
import fnmatch
|
||||
from offpunk import netcache, themes
|
||||
from offpunk.utils import run,term_width,is_local,looks_like_base64
|
||||
from offpunk.utils import _DATA_DIR
|
||||
from . import netcache, themes
|
||||
from .utils import run,term_width,is_local,looks_like_base64
|
||||
from .utils import _DATA_DIR
|
||||
try:
|
||||
from readability import Document
|
||||
_HAS_READABILITY = True
|
||||
|
|
|
@ -13,8 +13,8 @@ import datetime
|
|||
import hashlib
|
||||
import sqlite3
|
||||
from ssl import CertificateError
|
||||
from offpunk import ansicat, utils
|
||||
from offpunk.utils import _CACHE_PATH,_DATA_DIR,_CONFIG_DIR
|
||||
from . import ansicat, utils
|
||||
from .utils import _CACHE_PATH,_DATA_DIR,_CONFIG_DIR
|
||||
import time
|
||||
try:
|
||||
import chardet
|
||||
|
|
|
@ -10,8 +10,8 @@ import argparse
|
|||
import shutil
|
||||
import time
|
||||
import fnmatch
|
||||
from offpunk import ansicat, netcache, utils
|
||||
from offpunk.utils import run,term_width,mode_url,unmode_url,is_local
|
||||
from . import ansicat, netcache, utils
|
||||
from .utils import run,term_width,mode_url,unmode_url,is_local
|
||||
|
||||
_HAS_XDGOPEN = shutil.which('xdg-open')
|
||||
_GREP = "grep --color=auto"
|
||||
|
|
|
@ -13,7 +13,7 @@ import shutil
|
|||
import shlex
|
||||
import urllib.parse
|
||||
import urllib.parse
|
||||
from offpunk import cache_migration
|
||||
from . import cache_migration
|
||||
|
||||
CACHE_VERSION = 1
|
||||
|
||||
|
|
Loading…
Reference in New Issue