gitraze 0.2.5__tar.gz → 0.2.6__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.
- {gitraze-0.2.5 → gitraze-0.2.6}/PKG-INFO +1 -1
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/__init__.py +1 -1
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/cli.py +1 -1
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/modules/search.py +0 -2
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/utils/helpers.py +18 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze.egg-info/PKG-INFO +1 -1
- {gitraze-0.2.5 → gitraze-0.2.6}/pyproject.toml +1 -1
- {gitraze-0.2.5 → gitraze-0.2.6}/LICENSE +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/README.md +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/config.py +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/core/__init__.py +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/core/api_graphql.py +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/core/api_rest.py +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/handlers/__init__.py +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/handlers/analyze.py +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/handlers/repo.py +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/handlers/search.py +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/handlers/user.py +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/modules/__init__.py +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/modules/analytics.py +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/modules/repo.py +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/modules/user.py +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/utils/__init__.py +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze.egg-info/SOURCES.txt +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze.egg-info/dependency_links.txt +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze.egg-info/entry_points.txt +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze.egg-info/requires.txt +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/gitraze.egg-info/top_level.txt +0 -0
- {gitraze-0.2.5 → gitraze-0.2.6}/setup.cfg +0 -0
|
@@ -2,7 +2,7 @@ from .modules.user import get_user_rest as user
|
|
|
2
2
|
from .modules.repo import get_repo_rest as repo
|
|
3
3
|
from .modules.search import get_search_rest as search
|
|
4
4
|
|
|
5
|
-
from .utils.helpers import
|
|
5
|
+
from .utils.helpers import display
|
|
6
6
|
|
|
7
7
|
__version__ = "0.2.5"
|
|
8
8
|
|
|
@@ -41,7 +41,6 @@ def get_search_rest(category, query, limit=1):
|
|
|
41
41
|
"visibility": item.get("visibility"),
|
|
42
42
|
"default_branch": item.get("default_branch"),
|
|
43
43
|
"owner": item.get("owner", {}).get("login"),
|
|
44
|
-
"For More, use": "$ gitraze repo <owner/repo>"
|
|
45
44
|
})
|
|
46
45
|
|
|
47
46
|
case "users":
|
|
@@ -55,7 +54,6 @@ def get_search_rest(category, query, limit=1):
|
|
|
55
54
|
"followers_url": item.get("followers_url"),
|
|
56
55
|
"following_url": item.get("following_url"),
|
|
57
56
|
"organizations_url": item.get("organizations_url"),
|
|
58
|
-
"For More, use": "$ gitraze user <username>"
|
|
59
57
|
})
|
|
60
58
|
|
|
61
59
|
case "issues":
|
|
@@ -30,6 +30,24 @@ def pretty_print(data, title=None):
|
|
|
30
30
|
|
|
31
31
|
print() # spacing
|
|
32
32
|
|
|
33
|
+
def display(data, title=None):
|
|
34
|
+
|
|
35
|
+
if isinstance(data, list):
|
|
36
|
+
|
|
37
|
+
if not data:
|
|
38
|
+
print(Fore.RED + "No results found")
|
|
39
|
+
return
|
|
40
|
+
|
|
41
|
+
for i, item in enumerate(data, 1):
|
|
42
|
+
|
|
43
|
+
item_title = f"{title} [{i}]" if title else f"Result [{i}]"
|
|
44
|
+
|
|
45
|
+
pretty_print(item, title=item_title)
|
|
46
|
+
|
|
47
|
+
return
|
|
48
|
+
|
|
49
|
+
pretty_print(data, title=f"Result: ")
|
|
50
|
+
|
|
33
51
|
def format_date(date_str):
|
|
34
52
|
if not date_str:
|
|
35
53
|
return None
|
|
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
|
|
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
|