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.
Files changed (29) hide show
  1. {gitraze-0.2.5 → gitraze-0.2.6}/PKG-INFO +1 -1
  2. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/__init__.py +1 -1
  3. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/cli.py +1 -1
  4. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/modules/search.py +0 -2
  5. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/utils/helpers.py +18 -0
  6. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze.egg-info/PKG-INFO +1 -1
  7. {gitraze-0.2.5 → gitraze-0.2.6}/pyproject.toml +1 -1
  8. {gitraze-0.2.5 → gitraze-0.2.6}/LICENSE +0 -0
  9. {gitraze-0.2.5 → gitraze-0.2.6}/README.md +0 -0
  10. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/config.py +0 -0
  11. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/core/__init__.py +0 -0
  12. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/core/api_graphql.py +0 -0
  13. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/core/api_rest.py +0 -0
  14. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/handlers/__init__.py +0 -0
  15. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/handlers/analyze.py +0 -0
  16. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/handlers/repo.py +0 -0
  17. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/handlers/search.py +0 -0
  18. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/handlers/user.py +0 -0
  19. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/modules/__init__.py +0 -0
  20. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/modules/analytics.py +0 -0
  21. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/modules/repo.py +0 -0
  22. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/modules/user.py +0 -0
  23. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze/utils/__init__.py +0 -0
  24. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze.egg-info/SOURCES.txt +0 -0
  25. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze.egg-info/dependency_links.txt +0 -0
  26. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze.egg-info/entry_points.txt +0 -0
  27. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze.egg-info/requires.txt +0 -0
  28. {gitraze-0.2.5 → gitraze-0.2.6}/gitraze.egg-info/top_level.txt +0 -0
  29. {gitraze-0.2.5 → gitraze-0.2.6}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitraze
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: A CLI and Python library for GitHub reconnaissance, search, and analysis
5
5
  Author: AK Pandey
6
6
  License-Expression: MIT
@@ -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 pretty_print as display
5
+ from .utils.helpers import display
6
6
 
7
7
  __version__ = "0.2.5"
8
8
 
@@ -15,7 +15,7 @@ def main():
15
15
  parser.add_argument(
16
16
  "--version",
17
17
  action="version",
18
- version="gitraze 0.2.5"
18
+ version="gitraze 0.2.6"
19
19
  )
20
20
 
21
21
  subparsers = parser.add_subparsers(dest="command", required=True)
@@ -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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gitraze
3
- Version: 0.2.5
3
+ Version: 0.2.6
4
4
  Summary: A CLI and Python library for GitHub reconnaissance, search, and analysis
5
5
  Author: AK Pandey
6
6
  License-Expression: MIT
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "gitraze"
3
- version = "0.2.5"
3
+ version = "0.2.6"
4
4
  description = "A CLI and Python library for GitHub reconnaissance, search, and analysis"
5
5
  authors = [{ name = "AK Pandey" }]
6
6
  dependencies = ["requests", "colorama"]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes