From e64e8ce1064159691595cfd60ffa5ff2dfd9a778 Mon Sep 17 00:00:00 2001 From: frjcomp Date: Tue, 5 Mar 2024 14:13:43 +0100 Subject: [PATCH] package static folder --- conkeyscan.py | 3 ++- setup.py | 2 +- dict.txt => static/dict.txt | 0 3 files changed, 3 insertions(+), 2 deletions(-) rename dict.txt => static/dict.txt (100%) diff --git a/conkeyscan.py b/conkeyscan.py index 8ad5071..a3a1f7b 100644 --- a/conkeyscan.py +++ b/conkeyscan.py @@ -7,6 +7,7 @@ import readchar import json import os +import pkg_resources from clize import run from loguru import logger @@ -132,7 +133,7 @@ def main( url: "u", username: "usr", password: "pwd", - dict_path: "d" = os.path.join(os.path.dirname(__file__), "dict.txt"), + dict_path: "d" = pkg_resources.resource_filename("conkeyscan", "static/dict.txt"), disable_ssl_checks: "k" = True, rate_limit: "r" = 100, proxy: "p" = "", diff --git a/setup.py b/setup.py index 0484a4d..509082f 100644 --- a/setup.py +++ b/setup.py @@ -17,6 +17,6 @@ "PySocks>=1", ], entry_points={"console_scripts": ["conkeyscan = conkeyscan:entry_point"]}, - package_data={"texts": ["dict.txt"]}, + package_data={"": ["static/*"]}, include_package_data=True, ) diff --git a/dict.txt b/static/dict.txt similarity index 100% rename from dict.txt rename to static/dict.txt