ghgrab 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.
- ghgrab-0.1.0/LICENSE +21 -0
- ghgrab-0.1.0/PKG-INFO +24 -0
- ghgrab-0.1.0/README.md +6 -0
- ghgrab-0.1.0/ghgrab/__init__.py +22 -0
- ghgrab-0.1.0/ghgrab.egg-info/PKG-INFO +24 -0
- ghgrab-0.1.0/ghgrab.egg-info/SOURCES.txt +11 -0
- ghgrab-0.1.0/ghgrab.egg-info/dependency_links.txt +1 -0
- ghgrab-0.1.0/ghgrab.egg-info/entry_points.txt +2 -0
- ghgrab-0.1.0/ghgrab.egg-info/not-zip-safe +1 -0
- ghgrab-0.1.0/ghgrab.egg-info/top_level.txt +1 -0
- ghgrab-0.1.0/pyproject.toml +26 -0
- ghgrab-0.1.0/setup.cfg +4 -0
- ghgrab-0.1.0/setup.py +52 -0
ghgrab-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Abhinav A
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
ghgrab-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ghgrab
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Download specific files and folders from GitHub repositories without cloning
|
|
5
|
+
Author: Abhinav A
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/abhixdd/ghgrab
|
|
8
|
+
Project-URL: Repository, https://github.com/abhixdd/ghgrab
|
|
9
|
+
Keywords: github,download,cli,tui
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Requires-Python: >=3.7
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
# ghgrab
|
|
20
|
+
|
|
21
|
+
Download specific files and folders from GitHub repositories without cloning.
|
|
22
|
+
|
|
23
|
+
> [!WARNING]
|
|
24
|
+
> WIP 🚧
|
ghgrab-0.1.0/README.md
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/usr/bin/env python3
|
|
2
|
+
import os
|
|
3
|
+
import sys
|
|
4
|
+
import subprocess
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
def main():
|
|
8
|
+
# Get the directory where the binary is installed
|
|
9
|
+
bin_dir = Path(__file__).parent
|
|
10
|
+
binary_name = "ghgrab.exe" if sys.platform == "win32" else "ghgrab"
|
|
11
|
+
binary_path = bin_dir / binary_name
|
|
12
|
+
|
|
13
|
+
# Execute the Rust binary
|
|
14
|
+
try:
|
|
15
|
+
result = subprocess.run([str(binary_path)] + sys.argv[1:])
|
|
16
|
+
sys.exit(result.returncode)
|
|
17
|
+
except FileNotFoundError:
|
|
18
|
+
print(f"Error: Binary not found at {binary_path}", file=sys.stderr)
|
|
19
|
+
sys.exit(1)
|
|
20
|
+
|
|
21
|
+
if __name__ == "__main__":
|
|
22
|
+
main()
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ghgrab
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Download specific files and folders from GitHub repositories without cloning
|
|
5
|
+
Author: Abhinav A
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/abhixdd/ghgrab
|
|
8
|
+
Project-URL: Repository, https://github.com/abhixdd/ghgrab
|
|
9
|
+
Keywords: github,download,cli,tui
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Requires-Python: >=3.7
|
|
15
|
+
Description-Content-Type: text/markdown
|
|
16
|
+
License-File: LICENSE
|
|
17
|
+
Dynamic: license-file
|
|
18
|
+
|
|
19
|
+
# ghgrab
|
|
20
|
+
|
|
21
|
+
Download specific files and folders from GitHub repositories without cloning.
|
|
22
|
+
|
|
23
|
+
> [!WARNING]
|
|
24
|
+
> WIP 🚧
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
setup.py
|
|
5
|
+
ghgrab/__init__.py
|
|
6
|
+
ghgrab.egg-info/PKG-INFO
|
|
7
|
+
ghgrab.egg-info/SOURCES.txt
|
|
8
|
+
ghgrab.egg-info/dependency_links.txt
|
|
9
|
+
ghgrab.egg-info/entry_points.txt
|
|
10
|
+
ghgrab.egg-info/not-zip-safe
|
|
11
|
+
ghgrab.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ghgrab
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=45", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "ghgrab"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Download specific files and folders from GitHub repositories without cloning"
|
|
9
|
+
authors = [{name = "Abhinav A"}]
|
|
10
|
+
license = {text = "MIT"}
|
|
11
|
+
readme = "README.md"
|
|
12
|
+
requires-python = ">=3.7"
|
|
13
|
+
keywords = ["github", "download", "cli", "tui"]
|
|
14
|
+
classifiers = [
|
|
15
|
+
"Development Status :: 4 - Beta",
|
|
16
|
+
"Intended Audience :: Developers",
|
|
17
|
+
"License :: OSI Approved :: MIT License",
|
|
18
|
+
"Programming Language :: Python :: 3",
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
[project.urls]
|
|
22
|
+
Homepage = "https://github.com/abhixdd/ghgrab"
|
|
23
|
+
Repository = "https://github.com/abhixdd/ghgrab"
|
|
24
|
+
|
|
25
|
+
[project.scripts]
|
|
26
|
+
ghgrab = "ghgrab:main"
|
ghgrab-0.1.0/setup.cfg
ADDED
ghgrab-0.1.0/setup.py
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
from setuptools import setup, find_packages
|
|
2
|
+
from setuptools.command.install import install
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
import urllib.request
|
|
6
|
+
import platform
|
|
7
|
+
|
|
8
|
+
class PostInstallCommand(install):
|
|
9
|
+
def run(self):
|
|
10
|
+
install.run(self)
|
|
11
|
+
self.download_binary()
|
|
12
|
+
|
|
13
|
+
def download_binary(self):
|
|
14
|
+
version = "0.1.0"
|
|
15
|
+
system = platform.system().lower()
|
|
16
|
+
|
|
17
|
+
if system == "windows":
|
|
18
|
+
platform_name = "win32"
|
|
19
|
+
binary_name = "ghgrab.exe"
|
|
20
|
+
elif system == "darwin":
|
|
21
|
+
arch = platform.machine()
|
|
22
|
+
platform_name = "darwin-arm64" if arch == "arm64" else "darwin"
|
|
23
|
+
binary_name = "ghgrab"
|
|
24
|
+
elif system == "linux":
|
|
25
|
+
platform_name = "linux"
|
|
26
|
+
binary_name = "ghgrab"
|
|
27
|
+
else:
|
|
28
|
+
print(f"Unsupported platform: {system}")
|
|
29
|
+
return
|
|
30
|
+
|
|
31
|
+
url = f"https://github.com/abhixdd/ghgrab/releases/download/v{version}/ghgrab-{platform_name}"
|
|
32
|
+
bin_dir = os.path.join(os.path.dirname(__file__), "ghgrab")
|
|
33
|
+
bin_path = os.path.join(bin_dir, binary_name)
|
|
34
|
+
|
|
35
|
+
try:
|
|
36
|
+
print(f"Downloading ghgrab binary for {platform_name}...")
|
|
37
|
+
urllib.request.urlretrieve(url, bin_path)
|
|
38
|
+
if system != "windows":
|
|
39
|
+
os.chmod(bin_path, 0o755)
|
|
40
|
+
print("Binary downloaded successfully!")
|
|
41
|
+
except Exception as e:
|
|
42
|
+
print(f"Failed to download binary: {e}")
|
|
43
|
+
|
|
44
|
+
setup(
|
|
45
|
+
name="ghgrab",
|
|
46
|
+
version="0.1.0",
|
|
47
|
+
packages=find_packages(),
|
|
48
|
+
cmdclass={
|
|
49
|
+
'install': PostInstallCommand,
|
|
50
|
+
},
|
|
51
|
+
zip_safe=False,
|
|
52
|
+
)
|