gitseek 0.1.0__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.
gitseek-0.1.0/LICENSE ADDED
File without changes
gitseek-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,8 @@
1
+ Metadata-Version: 2.4
2
+ Name: gitseek
3
+ Version: 0.1.0
4
+ Summary: Search GitHub projects from the terminal
5
+ Author: Ashish Des
6
+ License-File: LICENSE
7
+ Requires-Dist: requests
8
+ Dynamic: license-file
@@ -0,0 +1,13 @@
1
+ # gitseek
2
+
3
+ Search GitHub projects directly from the terminal.
4
+
5
+ Install:
6
+
7
+ pip install gitseek
8
+
9
+ Usage:
10
+
11
+ gitseek ai tools
12
+ gitseek browser automation
13
+ gitseek python cli --stars 5000
File without changes
@@ -0,0 +1,39 @@
1
+ import argparse
2
+ import webbrowser
3
+ import subprocess
4
+
5
+ from .github_api import search_repositories
6
+
7
+
8
+ def main():
9
+ parser = argparse.ArgumentParser(description="Search GitHub projects")
10
+
11
+ parser.add_argument("query", nargs="+")
12
+ parser.add_argument("--stars", type=int)
13
+ parser.add_argument("--limit", type=int, default=5)
14
+ parser.add_argument("--open", type=int)
15
+ parser.add_argument("--clone", type=int)
16
+
17
+ args = parser.parse_args()
18
+
19
+ query = " ".join(args.query)
20
+
21
+ repos = search_repositories(query, args.stars, args.limit)
22
+
23
+ if not repos:
24
+ print("No repositories found.")
25
+ return
26
+
27
+ for i, repo in enumerate(repos, start=1):
28
+ print(f"\n[{i}] {repo['name']}")
29
+ print(f"⭐ {repo['stargazers_count']}")
30
+ print(repo["description"])
31
+ print(repo["html_url"])
32
+
33
+ if args.open:
34
+ repo = repos[args.open - 1]
35
+ webbrowser.open(repo["html_url"])
36
+
37
+ if args.clone:
38
+ repo = repos[args.clone - 1]
39
+ subprocess.run(["git", "clone", repo["html_url"]])
@@ -0,0 +1,21 @@
1
+ import requests
2
+
3
+ GITHUB_API = "https://api.github.com/search/repositories"
4
+
5
+ def search_repositories(query, stars=None, limit=5):
6
+ q = query
7
+
8
+ if stars:
9
+ q += f" stars:>{stars}"
10
+
11
+ params = {
12
+ "q": q,
13
+ "sort": "stars",
14
+ "order": "desc",
15
+ "per_page": limit
16
+ }
17
+
18
+ response = requests.get(GITHUB_API, params=params)
19
+ data = response.json()
20
+
21
+ return data.get("items", [])
@@ -0,0 +1,8 @@
1
+ Metadata-Version: 2.4
2
+ Name: gitseek
3
+ Version: 0.1.0
4
+ Summary: Search GitHub projects from the terminal
5
+ Author: Ashish Des
6
+ License-File: LICENSE
7
+ Requires-Dist: requests
8
+ Dynamic: license-file
@@ -0,0 +1,12 @@
1
+ LICENSE
2
+ README.md
3
+ pyproject.toml
4
+ gitseek/__init__.py
5
+ gitseek/cli.py
6
+ gitseek/github_api.py
7
+ gitseek.egg-info/PKG-INFO
8
+ gitseek.egg-info/SOURCES.txt
9
+ gitseek.egg-info/dependency_links.txt
10
+ gitseek.egg-info/entry_points.txt
11
+ gitseek.egg-info/requires.txt
12
+ gitseek.egg-info/top_level.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ gitseek = gitseek.cli:main
@@ -0,0 +1 @@
1
+ requests
@@ -0,0 +1 @@
1
+ gitseek
@@ -0,0 +1,17 @@
1
+ [build-system]
2
+ requires = ["setuptools", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "gitseek"
7
+ version = "0.1.0"
8
+ description = "Search GitHub projects from the terminal"
9
+ authors = [
10
+ {name="Ashish Des"}
11
+ ]
12
+ dependencies = [
13
+ "requests"
14
+ ]
15
+
16
+ [project.scripts]
17
+ gitseek = "gitseek.cli:main"
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+