advdbg 0.2.6__tar.gz → 0.2.7__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.
- {advdbg-0.2.6 → advdbg-0.2.7}/PKG-INFO +5 -3
- {advdbg-0.2.6 → advdbg-0.2.7}/README.md +4 -2
- advdbg-0.2.7/advdbg/__init__.py +24 -0
- {advdbg-0.2.6 → advdbg-0.2.7}/advdbg/core.py +15 -8
- advdbg-0.2.7/advdbg/exceptions.py +13 -0
- advdbg-0.2.7/advdbg/update.py +30 -0
- {advdbg-0.2.6 → advdbg-0.2.7}/advdbg.egg-info/PKG-INFO +5 -3
- {advdbg-0.2.6 → advdbg-0.2.7}/advdbg.egg-info/SOURCES.txt +2 -0
- {advdbg-0.2.6 → advdbg-0.2.7}/pyproject.toml +1 -1
- advdbg-0.2.6/advdbg/__init__.py +0 -19
- {advdbg-0.2.6 → advdbg-0.2.7}/LICENSE +0 -0
- {advdbg-0.2.6 → advdbg-0.2.7}/advdbg/analyze.py +0 -0
- {advdbg-0.2.6 → advdbg-0.2.7}/advdbg/colors.py +0 -0
- {advdbg-0.2.6 → advdbg-0.2.7}/advdbg.egg-info/dependency_links.txt +0 -0
- {advdbg-0.2.6 → advdbg-0.2.7}/advdbg.egg-info/top_level.txt +0 -0
- {advdbg-0.2.6 → advdbg-0.2.7}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: advdbg
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: Minimalist colorful debug logger
|
|
5
5
|
Author-email: Darkey <weplayok3@gmail.com>, WinFun <placeholder@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -48,9 +48,11 @@ dbgVar.cfg(title='REQUEST')
|
|
|
48
48
|
BEFORE: title of your debug
|
|
49
49
|
AFTER: REQUEST
|
|
50
50
|
|
|
51
|
-
## Change Log: v0.2.
|
|
51
|
+
## Change Log: v0.2.7
|
|
52
52
|
|
|
53
|
-
- Added
|
|
53
|
+
- Added custom exceptions
|
|
54
|
+
- Added about() method
|
|
55
|
+
- Added checker for updates
|
|
54
56
|
|
|
55
57
|
## Requirements
|
|
56
58
|
|
|
@@ -33,9 +33,11 @@ dbgVar.cfg(title='REQUEST')
|
|
|
33
33
|
BEFORE: title of your debug
|
|
34
34
|
AFTER: REQUEST
|
|
35
35
|
|
|
36
|
-
## Change Log: v0.2.
|
|
36
|
+
## Change Log: v0.2.7
|
|
37
37
|
|
|
38
|
-
- Added
|
|
38
|
+
- Added custom exceptions
|
|
39
|
+
- Added about() method
|
|
40
|
+
- Added checker for updates
|
|
39
41
|
|
|
40
42
|
## Requirements
|
|
41
43
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'''
|
|
2
|
+
Welcome to Advanced Debug.
|
|
3
|
+
Licensed with MIT
|
|
4
|
+
|
|
5
|
+
Change Logs:
|
|
6
|
+
- Added .about()
|
|
7
|
+
- Added custom exception
|
|
8
|
+
- Added checker for updates
|
|
9
|
+
'''
|
|
10
|
+
|
|
11
|
+
__version__ = '0.2.7'
|
|
12
|
+
|
|
13
|
+
from .core import AdvDBG
|
|
14
|
+
|
|
15
|
+
from .analyze import Breakpoint
|
|
16
|
+
import requests
|
|
17
|
+
from .update import Update
|
|
18
|
+
|
|
19
|
+
__all__ = ['AdvDBG', 'Breakpoint']
|
|
20
|
+
if Update.check_for_updates() == "Not latest!":
|
|
21
|
+
print('Available new update\n{Colors.INFO}{Update.return_installed()} → {Update.return_latest()}')
|
|
22
|
+
|
|
23
|
+
# For easy access, you can create a default instance
|
|
24
|
+
DebuGGer = AdvDBG()
|
|
@@ -7,13 +7,16 @@ import os
|
|
|
7
7
|
from datetime import datetime
|
|
8
8
|
import random
|
|
9
9
|
from typing import Dict, Any, Optional, List
|
|
10
|
+
import requests
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
from .update import Update
|
|
13
|
+
from .colors import Colors
|
|
14
|
+
from .exceptions import OutputListError
|
|
15
|
+
# class Colors:
|
|
16
|
+
# WARN = ""
|
|
17
|
+
# ERROR = ""
|
|
18
|
+
# INFO = ""
|
|
19
|
+
# SUCCESS = ""
|
|
17
20
|
|
|
18
21
|
listPhrases = ['Writting some lines.', "Don't forgot to define!", 'Waiting for your command.']
|
|
19
22
|
randomPhrase = random.choice(listPhrases)
|
|
@@ -51,7 +54,7 @@ class AdvDBG:
|
|
|
51
54
|
for output_type in output_list:
|
|
52
55
|
if output_type not in allowed:
|
|
53
56
|
print(f"{Colors.ERROR} Error - AdvDBG | Error when reading the output type: Detected disallowed output. Please use console or file.\033[0m")
|
|
54
|
-
raise
|
|
57
|
+
raise OutputListError(f"Disallowed output type: {output_type}")
|
|
55
58
|
|
|
56
59
|
# Проверка на повторяющиеся значения
|
|
57
60
|
if len(output_list) != len(set(output_list)):
|
|
@@ -65,7 +68,7 @@ class AdvDBG:
|
|
|
65
68
|
seen.add(item)
|
|
66
69
|
|
|
67
70
|
print(f"{Colors.ERROR} Error - AdvDBG | {len(duplicates)} repeating output types were found. Please, delete repeating types and try again.\033[0m")
|
|
68
|
-
raise
|
|
71
|
+
raise OutputListError(f"Repeating output types: {', '.join(duplicates)}")
|
|
69
72
|
|
|
70
73
|
@classmethod
|
|
71
74
|
def define(cls, title: str = 'Debug', activated: bool = True, notify: bool = False, output: Optional[List[str]] = None, legacy: bool = False):
|
|
@@ -275,6 +278,10 @@ class AdvDBG:
|
|
|
275
278
|
self._category_store[self.title]["output"] = self.output
|
|
276
279
|
|
|
277
280
|
return self
|
|
281
|
+
|
|
282
|
+
def about():
|
|
283
|
+
print(f'Advanced Debugger\nfrom Darkey Labs\n\nVersion v{Update.return_installed()}\nLicensed with MIT')
|
|
284
|
+
|
|
278
285
|
|
|
279
286
|
def __call__(self, text):
|
|
280
287
|
if not isinstance(text, str):
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
import importlib.metadata
|
|
3
|
+
|
|
4
|
+
class Update:
|
|
5
|
+
"""Class for AdvDBG to interact with Update"""
|
|
6
|
+
def return_latest():
|
|
7
|
+
"""Get latest version of AdvDBG.
|
|
8
|
+
|
|
9
|
+
Returns:
|
|
10
|
+
Actual version from PyPi."""
|
|
11
|
+
url = 'https://pypi.org/pypi/advdbg/json'
|
|
12
|
+
response = requests.get(url)
|
|
13
|
+
response.raise_for_status()
|
|
14
|
+
|
|
15
|
+
data = response.json()
|
|
16
|
+
return data['info']['version']
|
|
17
|
+
|
|
18
|
+
def return_installed():
|
|
19
|
+
try:
|
|
20
|
+
return importlib.metadata.version('advdbg')
|
|
21
|
+
except importlib.metadata.PackageNotFoundError:
|
|
22
|
+
return None
|
|
23
|
+
|
|
24
|
+
def check_for_updates():
|
|
25
|
+
if Update.return_installed() != Update.return_latest():
|
|
26
|
+
return f"Not latest!"
|
|
27
|
+
|
|
28
|
+
return "Latest"
|
|
29
|
+
|
|
30
|
+
print(Update.check_for_updates())
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: advdbg
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.7
|
|
4
4
|
Summary: Minimalist colorful debug logger
|
|
5
5
|
Author-email: Darkey <weplayok3@gmail.com>, WinFun <placeholder@gmail.com>
|
|
6
6
|
License: MIT
|
|
@@ -48,9 +48,11 @@ dbgVar.cfg(title='REQUEST')
|
|
|
48
48
|
BEFORE: title of your debug
|
|
49
49
|
AFTER: REQUEST
|
|
50
50
|
|
|
51
|
-
## Change Log: v0.2.
|
|
51
|
+
## Change Log: v0.2.7
|
|
52
52
|
|
|
53
|
-
- Added
|
|
53
|
+
- Added custom exceptions
|
|
54
|
+
- Added about() method
|
|
55
|
+
- Added checker for updates
|
|
54
56
|
|
|
55
57
|
## Requirements
|
|
56
58
|
|
advdbg-0.2.6/advdbg/__init__.py
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
'''
|
|
2
|
-
Welcome to Advanced Debug.
|
|
3
|
-
Licensed with MIT
|
|
4
|
-
|
|
5
|
-
Change Logs:
|
|
6
|
-
- Hotfix 0.2.3
|
|
7
|
-
'''
|
|
8
|
-
|
|
9
|
-
__version__ = '0.2.4'
|
|
10
|
-
|
|
11
|
-
from .core import AdvDBG
|
|
12
|
-
|
|
13
|
-
from .analyze import Breakpoint
|
|
14
|
-
import requests
|
|
15
|
-
|
|
16
|
-
__all__ = ['AdvDBG', 'Breakpoint']
|
|
17
|
-
|
|
18
|
-
# For easy access, you can create a default instance
|
|
19
|
-
DebuGGer = AdvDBG()
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|