diff --git a/README.md b/README.md index 88db42a..356f748 100644 --- a/README.md +++ b/README.md @@ -43,8 +43,9 @@ pip3 install -r requirements.txt --user ./convey.py [filename] ``` -### Dependencies -You'll be asked to install `dialog` library at the first run if not already present in the system. +### Dependencies and troubleshooting +* You'll be asked to install `dialog` library at the first run if not already present in the system. +* If something is missing on your system, maybe you may find help in this command: `sudo apt install python3-pip git python3-tk && pip3 install setuptools` ### Customisation * A file `config.ini` is automatically created in user config folder. This file may be edited for further customisation. @@ -86,4 +87,4 @@ It can bear ##.##.##.##.port format for ip address. If there is invalid lines, they will come to dedicated file to be reprocessed again. It connects to all whois servers I know. -I've tried a file with 3,6* 10^6 lines (300 MB). First 600 000 took around 6 minutes to analyze, the rest around two minutes. It asked 369× arin server and 709× ripe server. There were only 960 of unique IPs in 702 different IP prefixes. \ No newline at end of file +I've tried a file with 3,6* 10^6 lines (300 MB). First 600 000 took around 6 minutes to analyze, the rest around two minutes. It asked 369× arin server and 709× ripe server. There were only 960 of unique IPs in 702 different IP prefixes. diff --git a/convey/config.py b/convey/config.py index 67bd68e..f400a09 100644 --- a/convey/config.py +++ b/convey/config.py @@ -24,10 +24,10 @@ def get_path(file): file = path.join(config_dir, file) else: # create INI file at user config folder or at program directory - import ipdb; ipdb.set_trace() default_path = "{}/defaults/".format(path.dirname(path.realpath(__file__))) - if input("It seems this is a first run, since file {} haven't been found.\nShould we create a default config files at user config folder ({})? " - "Otherwise, they'll be created at program folder ({}). [Y/n] ".format(file, config_dir, path.dirname(sys.argv[0]))) \ + if input("It seems this is a first run, since file {} haven't been found." + "\nShould we create a default config files at user config folder ({})? " + "Otherwise, they'll be created at program folder: {} [Y/n] ".format(file, config_dir, path.dirname(sys.argv[0]))) \ in ["", "Y", "y"]: makedirs(config_dir, exist_ok=True) else: @@ -89,7 +89,7 @@ def get(key, section='CONVEY'): try: Config.cache[key] = Config.config[section][key] except: - input("The key {} is not in the config file {}. The program ends now.".format(key,Config.path)) + input("The key {} is not in the config file {}. The program ends now.".format(key, Config.path)) quit() return Config.cache[key] # return Config.config[section][key] diff --git a/setup.py b/setup.py index b5b165a..6b108ce 100644 --- a/setup.py +++ b/setup.py @@ -6,11 +6,10 @@ setup( name='convey', - version='0.8.2', + version='1.0.0', packages=['convey'], author='Edvard Rejthar', author_email='edvard.rejthar@nic.cz', - # summary = 'Just another Python package for the cheese shop', url='https://github.com/CZ-NIC/convey', license='GNU GPLv3', description='CSV swiss knife brought by CSIRT.cz. Convenable way to process large files that might freeze your spreadsheet processor.', @@ -20,6 +19,6 @@ 'convey = convey.__main__:main', ], }, - package_data={'convey': ['defaults/config.ini', 'defaults/mail_partner.txt', 'defaults/mail_basic.txt']}, + package_data={'convey': ['defaults/*']}, include_package_data=True )