torbot 3.0.6__tar.gz → 3.0.8__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.6 → torbot-3.0.8}/PKG-INFO +1 -1
  2. {torbot-3.0.6 → torbot-3.0.8}/pyproject.toml +1 -1
  3. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/config.py +8 -5
  4. {torbot-3.0.6 → torbot-3.0.8}/.env +0 -0
  5. {torbot-3.0.6 → torbot-3.0.8}/LICENSE.md +0 -0
  6. {torbot-3.0.6 → torbot-3.0.8}/torbot/__init__.py +0 -0
  7. {torbot-3.0.6 → torbot-3.0.8}/torbot/__main__.py +0 -0
  8. {torbot-3.0.6 → torbot-3.0.8}/torbot/main.py +0 -0
  9. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/__init__.py +0 -0
  10. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/api.py +0 -0
  11. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/collect_data.py +0 -0
  12. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/color.py +0 -0
  13. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/info.py +0 -0
  14. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/link_io.py +0 -0
  15. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/linktree.py +0 -0
  16. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/log.py +0 -0
  17. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/nlp/README.md +0 -0
  18. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/nlp/__init__.py +0 -0
  19. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/nlp/gather_data.py +0 -0
  20. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/nlp/main.py +0 -0
  21. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/nlp/website_classification.csv +0 -0
  22. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/savefile.py +0 -0
  23. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/tests/TESTING.md +0 -0
  24. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/tests/__init__.py +0 -0
  25. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/tests/test_pagereader.py +0 -0
  26. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/tests/test_savetofile.py +0 -0
  27. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/updater.py +0 -0
  28. {torbot-3.0.6 → torbot-3.0.8}/torbot/modules/validators.py +0 -0
  29. {torbot-3.0.6 → torbot-3.0.8}/torbot/version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: torbot
3
- Version: 3.0.6
3
+ Version: 3.0.8
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.6"
3
+ version = "3.0.8"
4
4
  description = "OSINT for the dark web"
5
5
  authors = ["Akeem King <akeemtlking@gmail.com>"]
6
6
  license = "GNU GPL"
@@ -3,11 +3,11 @@ import logging
3
3
  import sys
4
4
 
5
5
  from dotenv import load_dotenv
6
+ from inspect import getsourcefile
6
7
 
7
- script_directory = os.path.dirname(os.path.abspath(sys.argv[0]))
8
- print(script_directory)
9
8
 
10
- load_dotenv(verbose=True)
9
+ config_file_path = (os.path.abspath(getsourcefile(lambda:0)))
10
+ load_dotenv(config_file_path, verbose=True)
11
11
  port = os.getenv("PORT")
12
12
  host = os.getenv("HOST")
13
13
 
@@ -24,11 +24,14 @@ def get_log_level() -> int:
24
24
 
25
25
  def get_data_directory():
26
26
  data_directory = os.getenv('TORBOT_DATA_DIR')
27
+
28
+ # if a path is not set, write data to the config directory
29
+ config_directory = os.path.dirname(config_file_path)
27
30
  if not data_directory:
28
- data_directory = 'data'
31
+ data_directory = config_directory
29
32
 
30
33
  if data_directory.strip() == "":
31
- data_directory = 'data'
34
+ data_directory = config_directory
32
35
 
33
36
  # create directory if it doesn't exist
34
37
  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