torbot 3.0.7__tar.gz → 3.0.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. {torbot-3.0.7 → torbot-3.0.9}/PKG-INFO +1 -1
  2. {torbot-3.0.7 → torbot-3.0.9}/pyproject.toml +1 -1
  3. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/config.py +8 -7
  4. {torbot-3.0.7 → torbot-3.0.9}/.env +0 -0
  5. {torbot-3.0.7 → torbot-3.0.9}/LICENSE.md +0 -0
  6. {torbot-3.0.7 → torbot-3.0.9}/torbot/__init__.py +0 -0
  7. {torbot-3.0.7 → torbot-3.0.9}/torbot/__main__.py +0 -0
  8. {torbot-3.0.7 → torbot-3.0.9}/torbot/main.py +0 -0
  9. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/__init__.py +0 -0
  10. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/api.py +0 -0
  11. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/collect_data.py +0 -0
  12. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/color.py +0 -0
  13. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/info.py +0 -0
  14. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/link_io.py +0 -0
  15. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/linktree.py +0 -0
  16. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/log.py +0 -0
  17. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/nlp/README.md +0 -0
  18. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/nlp/__init__.py +0 -0
  19. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/nlp/gather_data.py +0 -0
  20. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/nlp/main.py +0 -0
  21. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/nlp/website_classification.csv +0 -0
  22. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/savefile.py +0 -0
  23. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/tests/TESTING.md +0 -0
  24. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/tests/__init__.py +0 -0
  25. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/tests/test_pagereader.py +0 -0
  26. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/tests/test_savetofile.py +0 -0
  27. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/updater.py +0 -0
  28. {torbot-3.0.7 → torbot-3.0.9}/torbot/modules/validators.py +0 -0
  29. {torbot-3.0.7 → torbot-3.0.9}/torbot/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: torbot
3
- Version: 3.0.7
3
+ Version: 3.0.9
4
4
  Summary: OSINT for the dark web
5
5
  License: GNU GPL
6
6
  Author: Akeem King
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "torbot"
3
- version = "3.0.7"
3
+ version = "3.0.9"
4
4
  description = "OSINT for the dark web"
5
5
  authors = ["Akeem King <akeemtlking@gmail.com>"]
6
6
  license = "GNU GPL"
@@ -1,16 +1,16 @@
1
1
  import os
2
2
  import logging
3
- import sys
4
3
 
5
4
  from dotenv import load_dotenv
6
5
  from inspect import getsourcefile
6
+ from unipath import Path
7
7
 
8
- script_directory = os.path.dirname(os.path.abspath(sys.argv[0]))
9
- print(script_directory)
10
8
 
11
- print(os.path.abspath(getsourcefile(lambda:0)))
9
+ config_file_path = (os.path.abspath(getsourcefile(lambda:0)))
10
+ parent_directory = Path(config_file_path).parent
11
+ load_dotenv(parent_directory, verbose=True)
12
+ print(parent_directory)
12
13
 
13
- load_dotenv(verbose=True)
14
14
  port = os.getenv("PORT")
15
15
  host = os.getenv("HOST")
16
16
 
@@ -27,11 +27,12 @@ def get_log_level() -> int:
27
27
 
28
28
  def get_data_directory():
29
29
  data_directory = os.getenv('TORBOT_DATA_DIR')
30
+ # if a path is not set, write data to the config directory
30
31
  if not data_directory:
31
- data_directory = 'data'
32
+ data_directory = parent_directory
32
33
 
33
34
  if data_directory.strip() == "":
34
- data_directory = 'data'
35
+ data_directory = parent_directory
35
36
 
36
37
  # create directory if it doesn't exist
37
38
  if not os.path.exists(data_directory):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes