git-ripper 1.4.4 → 1.4.5
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.
- package/README.md +87 -4
- package/package.json +2 -4
package/README.md
CHANGED
|
@@ -32,10 +32,14 @@ Have you ever needed just a single component from a massive repository? Or wante
|
|
|
32
32
|
## Features
|
|
33
33
|
|
|
34
34
|
- **Selective Downloads**: Fetch specific folders instead of entire repositories
|
|
35
|
+
- **Resume Interrupted Downloads**: Automatically resume downloads that were interrupted or failed
|
|
36
|
+
- **Progress Tracking**: Visual progress indicators with file-by-file download status
|
|
37
|
+
- **File Integrity Verification**: Ensures downloaded files are complete and uncorrupted
|
|
35
38
|
- **Directory Structure**: Preserves complete folder structure
|
|
36
39
|
- **Custom Output**: Specify your preferred output directory
|
|
37
40
|
- **Branch Support**: Works with any branch, not just the default one
|
|
38
41
|
- **Archive Export**: Create ZIP archives of downloaded content
|
|
42
|
+
- **Checkpoint Management**: View and manage saved download progress
|
|
39
43
|
- **Simple Interface**: Clean, intuitive command-line experience
|
|
40
44
|
- **Lightweight**: Minimal dependencies and fast execution
|
|
41
45
|
- **No Authentication**: Works with public repositories without requiring credentials
|
|
@@ -94,6 +98,9 @@ git-ripper https://github.com/username/repository/tree/branch/folder --zip="my-a
|
|
|
94
98
|
| -------------------------- | ---------------------------------------- | ----------------- |
|
|
95
99
|
| `-o, --output <directory>` | Specify output directory | Current directory |
|
|
96
100
|
| `--zip [filename]` | Create ZIP archive of downloaded content | - |
|
|
101
|
+
| `--no-resume` | Disable resume functionality | - |
|
|
102
|
+
| `--force-restart` | Ignore existing checkpoints and restart | - |
|
|
103
|
+
| `--list-checkpoints` | List all saved download checkpoints | - |
|
|
97
104
|
| `-V, --version` | Show version number | - |
|
|
98
105
|
| `-h, --help` | Show help | - |
|
|
99
106
|
|
|
@@ -137,14 +144,67 @@ git-ripper https://github.com/facebook/react/tree/main/packages/react-dom --zip
|
|
|
137
144
|
git-ripper https://github.com/microsoft/vscode/tree/main/build --zip="vscode-build.zip"
|
|
138
145
|
```
|
|
139
146
|
|
|
147
|
+
## Resume Downloads
|
|
148
|
+
|
|
149
|
+
Git-ripper now supports resuming interrupted downloads, making it perfect for large folders or unstable network connections.
|
|
150
|
+
|
|
151
|
+
### Automatic Resume (Default Behavior)
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
# Start a download
|
|
155
|
+
git-ripper https://github.com/microsoft/vscode/tree/main/src/vs/workbench
|
|
156
|
+
|
|
157
|
+
# If interrupted (Ctrl+C, network issues, etc.), simply run the same command again
|
|
158
|
+
git-ripper https://github.com/microsoft/vscode/tree/main/src/vs/workbench
|
|
159
|
+
# It will automatically resume from where it left off
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Force Restart
|
|
163
|
+
|
|
164
|
+
```bash
|
|
165
|
+
# Ignore any existing progress and start fresh
|
|
166
|
+
git-ripper https://github.com/microsoft/vscode/tree/main/src/vs/workbench --force-restart
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Disable Resume
|
|
170
|
+
|
|
171
|
+
```bash
|
|
172
|
+
# Use traditional behavior without resume functionality
|
|
173
|
+
git-ripper https://github.com/microsoft/vscode/tree/main/src/vs/workbench --no-resume
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Manage Checkpoints
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
# List all saved download progress
|
|
180
|
+
git-ripper --list-checkpoints
|
|
181
|
+
|
|
182
|
+
# Output shows:
|
|
183
|
+
# 1. ID: a1b2c3d4
|
|
184
|
+
# URL: https://github.com/microsoft/vscode/tree/main/src/vs/workbench
|
|
185
|
+
# Progress: 45/120 files
|
|
186
|
+
# Last Updated: 2025-06-04T10:30:00Z
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Resume Features
|
|
190
|
+
|
|
191
|
+
- **Automatic Progress Saving**: Downloads are checkpointed every few files
|
|
192
|
+
- **File Integrity Verification**: Ensures existing files are complete and valid
|
|
193
|
+
- **Smart Recovery**: Detects corrupted or incomplete files and re-downloads them
|
|
194
|
+
- **Multi-Download Support**: Manage multiple concurrent download projects
|
|
195
|
+
- **Progress Indicators**: Visual feedback showing completed vs remaining files
|
|
196
|
+
|
|
140
197
|
## How It Works
|
|
141
198
|
|
|
142
|
-
Git-ripper operates in
|
|
199
|
+
Git-ripper operates in five stages:
|
|
143
200
|
|
|
144
201
|
1. **URL Parsing**: Extracts repository owner, name, branch, and target folder path
|
|
145
|
-
2. **
|
|
146
|
-
3. **
|
|
147
|
-
4. **
|
|
202
|
+
2. **Resume Check**: Looks for existing download progress and validates already downloaded files
|
|
203
|
+
3. **API Request**: Uses GitHub's API to fetch the folder structure
|
|
204
|
+
4. **Content Download**: Retrieves each file individually while maintaining directory structure and saving progress
|
|
205
|
+
5. **Local Storage or Archiving**: Saves files to your specified output directory or creates an archive
|
|
206
|
+
|
|
207
|
+
The resume functionality uses checkpoint files stored in `.git_ripper_checkpoints/` to track download progress, file integrity hashes, and metadata for each download session.
|
|
148
208
|
|
|
149
209
|
## Configuration
|
|
150
210
|
|
|
@@ -178,6 +238,29 @@ Error: Path not found in repository
|
|
|
178
238
|
|
|
179
239
|
**Solution**: Verify the folder path exists in the specified branch and repository.
|
|
180
240
|
|
|
241
|
+
#### Resume Issues
|
|
242
|
+
|
|
243
|
+
If you encounter problems with resume functionality:
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
# Clear all checkpoints and start fresh
|
|
247
|
+
git-ripper https://github.com/owner/repo/tree/branch/folder --force-restart
|
|
248
|
+
|
|
249
|
+
# Or disable resume entirely
|
|
250
|
+
git-ripper https://github.com/owner/repo/tree/branch/folder --no-resume
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
#### Corrupted Download
|
|
254
|
+
|
|
255
|
+
If files appear corrupted after resume:
|
|
256
|
+
|
|
257
|
+
```bash
|
|
258
|
+
# Force restart will re-download everything
|
|
259
|
+
git-ripper https://github.com/owner/repo/tree/branch/folder --force-restart
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
The resume feature automatically detects and re-downloads corrupted files, but `--force-restart` ensures a completely clean download.
|
|
263
|
+
|
|
181
264
|
## Contributing
|
|
182
265
|
|
|
183
266
|
Contributions make the open-source community an amazing place to learn, inspire, and create. Any contributions to Git-ripper are **greatly appreciated**.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "git-ripper",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.5",
|
|
4
4
|
"description": "CLI tool that lets you download specific folders from GitHub repositories without cloning the entire repo.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -29,15 +29,13 @@
|
|
|
29
29
|
"author": "sairajb",
|
|
30
30
|
"license": "MIT",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"ansi-styles": "^6.2.1",
|
|
33
32
|
"archiver": "^6.0.1",
|
|
34
33
|
"axios": "^1.6.7",
|
|
35
34
|
"chalk": "^5.3.0",
|
|
36
35
|
"cli-progress": "^3.12.0",
|
|
37
36
|
"commander": "^12.0.0",
|
|
38
37
|
"p-limit": "^6.2.0",
|
|
39
|
-
"pretty-bytes": "^6.1.1"
|
|
40
|
-
"supports-color": "^9.4.0"
|
|
38
|
+
"pretty-bytes": "^6.1.1"
|
|
41
39
|
},
|
|
42
40
|
"repository": {
|
|
43
41
|
"type": "git",
|