reposeek 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.
- reposeek-0.1.0/PKG-INFO +36 -0
- reposeek-0.1.0/README.md +28 -0
- reposeek-0.1.0/pyproject.toml +16 -0
- reposeek-0.1.0/reposeek/__init__.py +0 -0
- reposeek-0.1.0/reposeek/cli.py +36 -0
- reposeek-0.1.0/reposeek/search.py +70 -0
- reposeek-0.1.0/reposeek.egg-info/PKG-INFO +36 -0
- reposeek-0.1.0/reposeek.egg-info/SOURCES.txt +10 -0
- reposeek-0.1.0/reposeek.egg-info/dependency_links.txt +1 -0
- reposeek-0.1.0/reposeek.egg-info/entry_points.txt +2 -0
- reposeek-0.1.0/reposeek.egg-info/top_level.txt +1 -0
- reposeek-0.1.0/setup.cfg +4 -0
reposeek-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: reposeek
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Quickly open local repositories in VS Code
|
|
5
|
+
Author: Grifin McManus
|
|
6
|
+
Requires-Python: >=3.9
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
|
|
9
|
+
# reposeek
|
|
10
|
+
|
|
11
|
+
Quickly open local repositories in VS Code.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
### Search and open a repo
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Search by partial name and open in VS Code
|
|
19
|
+
reposeek search auth
|
|
20
|
+
|
|
21
|
+
# Shortcut (assumes search)
|
|
22
|
+
reposeek auth
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### List all Git repos on Desktop
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
reposeek list
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Show help
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
reposeek help
|
|
35
|
+
```
|
|
36
|
+
|
reposeek-0.1.0/README.md
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# reposeek
|
|
2
|
+
|
|
3
|
+
Quickly open local repositories in VS Code.
|
|
4
|
+
|
|
5
|
+
## Usage
|
|
6
|
+
|
|
7
|
+
### Search and open a repo
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
# Search by partial name and open in VS Code
|
|
11
|
+
reposeek search auth
|
|
12
|
+
|
|
13
|
+
# Shortcut (assumes search)
|
|
14
|
+
reposeek auth
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
### List all Git repos on Desktop
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
reposeek list
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Show help
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
reposeek help
|
|
27
|
+
```
|
|
28
|
+
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "reposeek"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
description = "Quickly open local repositories in VS Code"
|
|
5
|
+
authors = [
|
|
6
|
+
{name = "Grifin McManus"}
|
|
7
|
+
]
|
|
8
|
+
readme = "README.md"
|
|
9
|
+
requires-python = ">=3.9"
|
|
10
|
+
|
|
11
|
+
[project.scripts]
|
|
12
|
+
seek = "reposeek.cli:main"
|
|
13
|
+
|
|
14
|
+
[build-system]
|
|
15
|
+
requires = ["setuptools"]
|
|
16
|
+
build-backend = "setuptools.build_meta"
|
|
File without changes
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
from .search import search_and_open, list_git_repos
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def show_help():
|
|
6
|
+
help_text = """
|
|
7
|
+
Usage: reposeek <command> [arguments]
|
|
8
|
+
|
|
9
|
+
Commands:
|
|
10
|
+
help Show this help message
|
|
11
|
+
list List all git repositories located within your Desktop folder
|
|
12
|
+
search <query> Search and open git repositories located within your Desktop folder
|
|
13
|
+
|
|
14
|
+
"""
|
|
15
|
+
print(help_text)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
def main():
|
|
19
|
+
if len(sys.argv) < 2:
|
|
20
|
+
show_help()
|
|
21
|
+
sys.exit(0)
|
|
22
|
+
|
|
23
|
+
cmd = sys.argv[1].lower()
|
|
24
|
+
|
|
25
|
+
if cmd == "list":
|
|
26
|
+
list_git_repos()
|
|
27
|
+
|
|
28
|
+
elif cmd == "help":
|
|
29
|
+
show_help()
|
|
30
|
+
else:
|
|
31
|
+
query = " ".join(sys.argv[1:])
|
|
32
|
+
search_and_open(query)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
if __name__ == "__main__":
|
|
36
|
+
main()
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
from pathlib import Path
|
|
2
|
+
import subprocess
|
|
3
|
+
import sys
|
|
4
|
+
|
|
5
|
+
SEARCH_ROOT = Path.home() / "Desktop"
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def find_git_repos():
|
|
9
|
+
"""
|
|
10
|
+
Recursively find all git repositories under SEARCH_ROOT.
|
|
11
|
+
Returns a list of Path objects.
|
|
12
|
+
"""
|
|
13
|
+
if not SEARCH_ROOT.exists():
|
|
14
|
+
sys.exit(f"Search root does not exist: {SEARCH_ROOT}")
|
|
15
|
+
|
|
16
|
+
repos = []
|
|
17
|
+
|
|
18
|
+
for path in SEARCH_ROOT.rglob("*"):
|
|
19
|
+
if path.is_dir() and (path / ".git").exists():
|
|
20
|
+
repos.append(path)
|
|
21
|
+
|
|
22
|
+
return sorted(repos)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def search_and_open(query: str):
|
|
26
|
+
"""
|
|
27
|
+
Search for matching git repositories by name and open in VS Code.
|
|
28
|
+
"""
|
|
29
|
+
repos = find_git_repos()
|
|
30
|
+
|
|
31
|
+
# Filter by query (case-insensitive substring match)
|
|
32
|
+
matches = [r for r in repos if query.lower() in r.name.lower()]
|
|
33
|
+
|
|
34
|
+
if not matches:
|
|
35
|
+
sys.exit(f"No git repositories found matching '{query}'")
|
|
36
|
+
|
|
37
|
+
# One match → open immediately
|
|
38
|
+
if len(matches) == 1:
|
|
39
|
+
subprocess.run(["code", str(matches[0])])
|
|
40
|
+
return
|
|
41
|
+
|
|
42
|
+
# Multiple matches → prompt user
|
|
43
|
+
print("\nMultiple matches found:\n")
|
|
44
|
+
for i, repo in enumerate(matches, start=1):
|
|
45
|
+
print(f"{i}. {repo.name}") # Display only folder name
|
|
46
|
+
|
|
47
|
+
choice = input("\nSelect a repo number: ").strip()
|
|
48
|
+
try:
|
|
49
|
+
index = int(choice) - 1
|
|
50
|
+
selected = matches[index]
|
|
51
|
+
except (ValueError, IndexError):
|
|
52
|
+
sys.exit("Invalid selection.")
|
|
53
|
+
|
|
54
|
+
subprocess.run(["code", str(selected)])
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def list_git_repos():
|
|
58
|
+
"""
|
|
59
|
+
List all git repositories recursively under SEARCH_ROOT.
|
|
60
|
+
Only shows folder names.
|
|
61
|
+
"""
|
|
62
|
+
repos = find_git_repos()
|
|
63
|
+
|
|
64
|
+
if not repos:
|
|
65
|
+
print(f"No git repositories found under {SEARCH_ROOT}")
|
|
66
|
+
return
|
|
67
|
+
|
|
68
|
+
print(f"Git repositories under {SEARCH_ROOT}:\n")
|
|
69
|
+
for repo in repos:
|
|
70
|
+
print(f" {repo.name}") # Display only folder name
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: reposeek
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Quickly open local repositories in VS Code
|
|
5
|
+
Author: Grifin McManus
|
|
6
|
+
Requires-Python: >=3.9
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
|
|
9
|
+
# reposeek
|
|
10
|
+
|
|
11
|
+
Quickly open local repositories in VS Code.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
### Search and open a repo
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
# Search by partial name and open in VS Code
|
|
19
|
+
reposeek search auth
|
|
20
|
+
|
|
21
|
+
# Shortcut (assumes search)
|
|
22
|
+
reposeek auth
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### List all Git repos on Desktop
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
reposeek list
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Show help
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
reposeek help
|
|
35
|
+
```
|
|
36
|
+
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
README.md
|
|
2
|
+
pyproject.toml
|
|
3
|
+
reposeek/__init__.py
|
|
4
|
+
reposeek/cli.py
|
|
5
|
+
reposeek/search.py
|
|
6
|
+
reposeek.egg-info/PKG-INFO
|
|
7
|
+
reposeek.egg-info/SOURCES.txt
|
|
8
|
+
reposeek.egg-info/dependency_links.txt
|
|
9
|
+
reposeek.egg-info/entry_points.txt
|
|
10
|
+
reposeek.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
reposeek
|
reposeek-0.1.0/setup.cfg
ADDED