batchfetch 1.0.1__tar.gz → 1.0.3__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.
- {batchfetch-1.0.1/batchfetch.egg-info → batchfetch-1.0.3}/PKG-INFO +35 -5
- batchfetch-1.0.3/README.md +84 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/batchfetch/batchfetch_cli.py +28 -13
- {batchfetch-1.0.1 → batchfetch-1.0.3/batchfetch.egg-info}/PKG-INFO +35 -5
- {batchfetch-1.0.1 → batchfetch-1.0.3}/setup.py +1 -1
- batchfetch-1.0.1/README.md +0 -54
- {batchfetch-1.0.1 → batchfetch-1.0.3}/.gitignore +0 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/LICENSE +0 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/batchfetch/__init__.py +0 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/batchfetch/batchfetch_base.py +0 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/batchfetch/batchfetch_git.py +0 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/batchfetch/helpers.py +0 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/batchfetch.egg-info/SOURCES.txt +0 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/batchfetch.egg-info/dependency_links.txt +0 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/batchfetch.egg-info/entry_points.txt +0 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/batchfetch.egg-info/requires.txt +0 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/batchfetch.egg-info/top_level.txt +0 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/run_tests.sh +0 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/setup.cfg +0 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/tests/data/test-md5sum.txt +0 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/tests/data/test-run_simple.sh +0 -0
- {batchfetch-1.0.1 → batchfetch-1.0.3}/tests/test_helpers.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: batchfetch
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: Efficiently clone and pull multiple Git repositories.
|
|
5
5
|
Home-page: https://github.com/jamescherti/batchfetch
|
|
6
6
|
Author: James Cherti
|
|
@@ -22,18 +22,30 @@ Requires-Dist: schema
|
|
|
22
22
|
Requires-Dist: setproctitle
|
|
23
23
|
Requires-Dist: PyYAML
|
|
24
24
|
|
|
25
|
-
# Batchfetch - Efficiently clone or pull multiple Git repositories
|
|
25
|
+
# Batchfetch - Efficiently clone or pull multiple Git repositories in parallel
|
|
26
26
|
|
|
27
27
|
## Introduction
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Batchfetch is a command-line tool designed to clone, fetch, and merge multiple Git repositories simultaneously.
|
|
30
|
+
|
|
31
|
+
With Batchfetch, you no longer need to manually manage each repository one by one. It automates the tedious aspects of repository management, freeing you up to focus on what truly matters: your workflow.
|
|
32
|
+
|
|
33
|
+
Batchfetch is ideal for quickly cloning or pulling multiple Git repositories. It is also useful for cloning various addons, such as Vim plugins, Emacs packages, Ansible roles, Ansible collections, and other addons available on websites like GitHub, Codeberg, and GitLab.
|
|
34
|
+
|
|
35
|
+
## Features:
|
|
36
|
+
- Git Clone and Fetch/Merge: Clones the repositories and their submodules, ensuring that all the repositories are always up-to-date by fetching and merging changes.
|
|
37
|
+
- Parallel Operations: Utilizes threads to simultaneously Git clone or pull multiple repositories, dramatically reducing wait times.
|
|
38
|
+
- User-Friendly Interface: Provides simple and straightforward command-line options that make it easy to get started and effectively manage your repositories.
|
|
39
|
+
- Custom Configuration: Allows the use of a YAML configuration file to specify and manage the repositories you interact with, enabling repeatable setups and consistent environments.
|
|
30
40
|
|
|
31
41
|
## Installation
|
|
32
42
|
|
|
33
43
|
```
|
|
34
|
-
|
|
44
|
+
pip install --user batchfetch
|
|
35
45
|
```
|
|
36
46
|
|
|
47
|
+
The pip command above will install the `batchfetch` executable in the directory `~/.local/bin/`.
|
|
48
|
+
|
|
37
49
|
## Example
|
|
38
50
|
|
|
39
51
|
Here is an example of a `batchfetch.yaml` file:
|
|
@@ -63,6 +75,23 @@ tasks:
|
|
|
63
75
|
|
|
64
76
|
Execute the `batchfetch` command from the same directory as `batchfetch.yml` to make it clone or update the local copies of the repositories above.
|
|
65
77
|
|
|
78
|
+
## Usage
|
|
79
|
+
|
|
80
|
+
Here are the various options that `batchfetch` provides, along with descriptions of their usage:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
usage: batchfetch [--option] [args]
|
|
84
|
+
|
|
85
|
+
Command line interface.
|
|
86
|
+
|
|
87
|
+
options:
|
|
88
|
+
-h, --help show this help message and exit
|
|
89
|
+
-j JOBS, --jobs JOBS
|
|
90
|
+
Run up to N Number of parallel git processes (Default: 5).
|
|
91
|
+
-v, --verbose Enable verbose mode.
|
|
92
|
+
-f BATCHFETCH_FILE, --batchfetch-file BATCHFETCH_FILE
|
|
93
|
+
Specify the batchfetch YAML file (default: './batchfetch.yaml').
|
|
94
|
+
```
|
|
66
95
|
## License
|
|
67
96
|
|
|
68
97
|
Copyright (c) [James Cherti](https://www.jamescherti.com)
|
|
@@ -75,4 +104,5 @@ You should have received a copy of the GNU General Public License along with thi
|
|
|
75
104
|
|
|
76
105
|
## Links
|
|
77
106
|
|
|
78
|
-
- [
|
|
107
|
+
- [batchfetch @GitHub](https://github.com/jamescherti/batchfetch)
|
|
108
|
+
- [batchfetch @Pypi](https://pypi.org/project/batchfetch/)
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Batchfetch - Efficiently clone or pull multiple Git repositories in parallel
|
|
2
|
+
|
|
3
|
+
## Introduction
|
|
4
|
+
|
|
5
|
+
Batchfetch is a command-line tool designed to clone, fetch, and merge multiple Git repositories simultaneously.
|
|
6
|
+
|
|
7
|
+
With Batchfetch, you no longer need to manually manage each repository one by one. It automates the tedious aspects of repository management, freeing you up to focus on what truly matters: your workflow.
|
|
8
|
+
|
|
9
|
+
Batchfetch is ideal for quickly cloning or pulling multiple Git repositories. It is also useful for cloning various addons, such as Vim plugins, Emacs packages, Ansible roles, Ansible collections, and other addons available on websites like GitHub, Codeberg, and GitLab.
|
|
10
|
+
|
|
11
|
+
## Features:
|
|
12
|
+
- Git Clone and Fetch/Merge: Clones the repositories and their submodules, ensuring that all the repositories are always up-to-date by fetching and merging changes.
|
|
13
|
+
- Parallel Operations: Utilizes threads to simultaneously Git clone or pull multiple repositories, dramatically reducing wait times.
|
|
14
|
+
- User-Friendly Interface: Provides simple and straightforward command-line options that make it easy to get started and effectively manage your repositories.
|
|
15
|
+
- Custom Configuration: Allows the use of a YAML configuration file to specify and manage the repositories you interact with, enabling repeatable setups and consistent environments.
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
pip install --user batchfetch
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The pip command above will install the `batchfetch` executable in the directory `~/.local/bin/`.
|
|
24
|
+
|
|
25
|
+
## Example
|
|
26
|
+
|
|
27
|
+
Here is an example of a `batchfetch.yaml` file:
|
|
28
|
+
|
|
29
|
+
```yaml
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
tasks:
|
|
33
|
+
# Clone the default branch of the general.el repository to the
|
|
34
|
+
# './general.el' directory
|
|
35
|
+
- git: https://github.com/noctuid/general.el
|
|
36
|
+
|
|
37
|
+
# Clone the tag 1.5 of the consult repository to the './consult'
|
|
38
|
+
# directory
|
|
39
|
+
- git: https://github.com/minad/consult
|
|
40
|
+
branch: "1.5"
|
|
41
|
+
|
|
42
|
+
# Clone the s.el repository to the './another-name.el' directory
|
|
43
|
+
- git: https://github.com/magnars/s.el
|
|
44
|
+
path: another-name.el
|
|
45
|
+
branch: dda84d38fffdaf0c9b12837b504b402af910d01d
|
|
46
|
+
|
|
47
|
+
# Delete './impatient-mode'
|
|
48
|
+
- git: https://github.com/skeeto/impatient-mode
|
|
49
|
+
delete: true
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Execute the `batchfetch` command from the same directory as `batchfetch.yml` to make it clone or update the local copies of the repositories above.
|
|
53
|
+
|
|
54
|
+
## Usage
|
|
55
|
+
|
|
56
|
+
Here are the various options that `batchfetch` provides, along with descriptions of their usage:
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
usage: batchfetch [--option] [args]
|
|
60
|
+
|
|
61
|
+
Command line interface.
|
|
62
|
+
|
|
63
|
+
options:
|
|
64
|
+
-h, --help show this help message and exit
|
|
65
|
+
-j JOBS, --jobs JOBS
|
|
66
|
+
Run up to N Number of parallel git processes (Default: 5).
|
|
67
|
+
-v, --verbose Enable verbose mode.
|
|
68
|
+
-f BATCHFETCH_FILE, --batchfetch-file BATCHFETCH_FILE
|
|
69
|
+
Specify the batchfetch YAML file (default: './batchfetch.yaml').
|
|
70
|
+
```
|
|
71
|
+
## License
|
|
72
|
+
|
|
73
|
+
Copyright (c) [James Cherti](https://www.jamescherti.com)
|
|
74
|
+
|
|
75
|
+
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
|
76
|
+
|
|
77
|
+
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
78
|
+
|
|
79
|
+
You should have received a copy of the GNU General Public License along with this program.
|
|
80
|
+
|
|
81
|
+
## Links
|
|
82
|
+
|
|
83
|
+
- [batchfetch @GitHub](https://github.com/jamescherti/batchfetch)
|
|
84
|
+
- [batchfetch @Pypi](https://pypi.org/project/batchfetch/)
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
import argparse
|
|
21
21
|
import logging
|
|
22
|
+
import os
|
|
22
23
|
import subprocess
|
|
23
24
|
import sys
|
|
24
25
|
from concurrent.futures import ThreadPoolExecutor, as_completed
|
|
@@ -183,7 +184,7 @@ class BatchFetchCli:
|
|
|
183
184
|
else:
|
|
184
185
|
if num_success == 0:
|
|
185
186
|
print("Already up to date.")
|
|
186
|
-
|
|
187
|
+
elif not self.verbose:
|
|
187
188
|
print("Success.")
|
|
188
189
|
|
|
189
190
|
return True
|
|
@@ -201,19 +202,33 @@ def parse_args():
|
|
|
201
202
|
"""Parse the command line arguments."""
|
|
202
203
|
desc = __doc__
|
|
203
204
|
usage = "%(prog)s [--option] [args]"
|
|
204
|
-
parser = argparse.ArgumentParser(description=desc,
|
|
205
|
-
|
|
205
|
+
parser = argparse.ArgumentParser(description=desc, usage=usage)
|
|
206
|
+
|
|
206
207
|
parser.add_argument(
|
|
207
|
-
"-
|
|
208
|
-
help="Run up to N Number of parallel git
|
|
208
|
+
"-j", "--jobs", default="5", required=False,
|
|
209
|
+
help="Run up to N Number of parallel git processes (Default: 5).",
|
|
209
210
|
)
|
|
210
211
|
|
|
211
212
|
parser.add_argument(
|
|
212
213
|
"-v", "--verbose", action="store_true", default=False,
|
|
213
|
-
help="
|
|
214
|
+
help="Enable verbose mode.",
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
parser.add_argument(
|
|
218
|
+
"-f",
|
|
219
|
+
"--batchfetch-file",
|
|
220
|
+
default="./batchfetch.yaml",
|
|
221
|
+
required=False,
|
|
222
|
+
help="Specify the batchfetch YAML file (default: './batchfetch.yaml').",
|
|
214
223
|
)
|
|
215
224
|
|
|
216
225
|
args = parser.parse_args()
|
|
226
|
+
|
|
227
|
+
if not Path(args.batchfetch_file).is_file():
|
|
228
|
+
print(f"Error: File not found: {args.batchfetch_file}",
|
|
229
|
+
file=sys.stderr)
|
|
230
|
+
sys.exit(1)
|
|
231
|
+
|
|
217
232
|
return args
|
|
218
233
|
|
|
219
234
|
|
|
@@ -224,16 +239,16 @@ def command_line_interface():
|
|
|
224
239
|
format="%(asctime)s %(name)s: %(message)s")
|
|
225
240
|
|
|
226
241
|
colorama.init()
|
|
227
|
-
setproctitle(subprocess.list2cmdline(
|
|
228
|
-
|
|
229
|
-
))
|
|
242
|
+
setproctitle(subprocess.list2cmdline([Path(sys.argv[0]).name] +
|
|
243
|
+
sys.argv[1:]))
|
|
230
244
|
|
|
231
245
|
args = parse_args()
|
|
232
|
-
|
|
233
|
-
path_batchfetch_yaml = "batchfetch.yaml"
|
|
234
246
|
downloader_cli = BatchFetchCli(verbose=args.verbose,
|
|
235
|
-
max_workers=int(args.
|
|
236
|
-
|
|
247
|
+
max_workers=int(args.jobs))
|
|
248
|
+
|
|
249
|
+
downloader_cli.load(args.batchfetch_file)
|
|
250
|
+
os.chdir(os.path.dirname(args.batchfetch_file))
|
|
251
|
+
|
|
237
252
|
try:
|
|
238
253
|
if not downloader_cli.download():
|
|
239
254
|
errno = 1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: batchfetch
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.3
|
|
4
4
|
Summary: Efficiently clone and pull multiple Git repositories.
|
|
5
5
|
Home-page: https://github.com/jamescherti/batchfetch
|
|
6
6
|
Author: James Cherti
|
|
@@ -22,18 +22,30 @@ Requires-Dist: schema
|
|
|
22
22
|
Requires-Dist: setproctitle
|
|
23
23
|
Requires-Dist: PyYAML
|
|
24
24
|
|
|
25
|
-
# Batchfetch - Efficiently clone or pull multiple Git repositories
|
|
25
|
+
# Batchfetch - Efficiently clone or pull multiple Git repositories in parallel
|
|
26
26
|
|
|
27
27
|
## Introduction
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
Batchfetch is a command-line tool designed to clone, fetch, and merge multiple Git repositories simultaneously.
|
|
30
|
+
|
|
31
|
+
With Batchfetch, you no longer need to manually manage each repository one by one. It automates the tedious aspects of repository management, freeing you up to focus on what truly matters: your workflow.
|
|
32
|
+
|
|
33
|
+
Batchfetch is ideal for quickly cloning or pulling multiple Git repositories. It is also useful for cloning various addons, such as Vim plugins, Emacs packages, Ansible roles, Ansible collections, and other addons available on websites like GitHub, Codeberg, and GitLab.
|
|
34
|
+
|
|
35
|
+
## Features:
|
|
36
|
+
- Git Clone and Fetch/Merge: Clones the repositories and their submodules, ensuring that all the repositories are always up-to-date by fetching and merging changes.
|
|
37
|
+
- Parallel Operations: Utilizes threads to simultaneously Git clone or pull multiple repositories, dramatically reducing wait times.
|
|
38
|
+
- User-Friendly Interface: Provides simple and straightforward command-line options that make it easy to get started and effectively manage your repositories.
|
|
39
|
+
- Custom Configuration: Allows the use of a YAML configuration file to specify and manage the repositories you interact with, enabling repeatable setups and consistent environments.
|
|
30
40
|
|
|
31
41
|
## Installation
|
|
32
42
|
|
|
33
43
|
```
|
|
34
|
-
|
|
44
|
+
pip install --user batchfetch
|
|
35
45
|
```
|
|
36
46
|
|
|
47
|
+
The pip command above will install the `batchfetch` executable in the directory `~/.local/bin/`.
|
|
48
|
+
|
|
37
49
|
## Example
|
|
38
50
|
|
|
39
51
|
Here is an example of a `batchfetch.yaml` file:
|
|
@@ -63,6 +75,23 @@ tasks:
|
|
|
63
75
|
|
|
64
76
|
Execute the `batchfetch` command from the same directory as `batchfetch.yml` to make it clone or update the local copies of the repositories above.
|
|
65
77
|
|
|
78
|
+
## Usage
|
|
79
|
+
|
|
80
|
+
Here are the various options that `batchfetch` provides, along with descriptions of their usage:
|
|
81
|
+
|
|
82
|
+
```
|
|
83
|
+
usage: batchfetch [--option] [args]
|
|
84
|
+
|
|
85
|
+
Command line interface.
|
|
86
|
+
|
|
87
|
+
options:
|
|
88
|
+
-h, --help show this help message and exit
|
|
89
|
+
-j JOBS, --jobs JOBS
|
|
90
|
+
Run up to N Number of parallel git processes (Default: 5).
|
|
91
|
+
-v, --verbose Enable verbose mode.
|
|
92
|
+
-f BATCHFETCH_FILE, --batchfetch-file BATCHFETCH_FILE
|
|
93
|
+
Specify the batchfetch YAML file (default: './batchfetch.yaml').
|
|
94
|
+
```
|
|
66
95
|
## License
|
|
67
96
|
|
|
68
97
|
Copyright (c) [James Cherti](https://www.jamescherti.com)
|
|
@@ -75,4 +104,5 @@ You should have received a copy of the GNU General Public License along with thi
|
|
|
75
104
|
|
|
76
105
|
## Links
|
|
77
106
|
|
|
78
|
-
- [
|
|
107
|
+
- [batchfetch @GitHub](https://github.com/jamescherti/batchfetch)
|
|
108
|
+
- [batchfetch @Pypi](https://pypi.org/project/batchfetch/)
|
batchfetch-1.0.1/README.md
DELETED
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
# Batchfetch - Efficiently clone or pull multiple Git repositories.
|
|
2
|
-
|
|
3
|
-
## Introduction
|
|
4
|
-
|
|
5
|
-
Efficiently clone or pull multiple Git repositories in parallel. Ideal for developers managing multiple projects or for downloading plugins or packages in bulk.
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
```
|
|
10
|
-
sudo pip install git+https://github.com/jamescherti/batchfetch
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
## Example
|
|
14
|
-
|
|
15
|
-
Here is an example of a `batchfetch.yaml` file:
|
|
16
|
-
|
|
17
|
-
```yaml
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
tasks:
|
|
21
|
-
# Clone the default branch of the general.el repository to the
|
|
22
|
-
# './general.el' directory
|
|
23
|
-
- git: https://github.com/noctuid/general.el
|
|
24
|
-
|
|
25
|
-
# Clone the tag 1.5 of the consult repository to the './consult'
|
|
26
|
-
# directory
|
|
27
|
-
- git: https://github.com/minad/consult
|
|
28
|
-
branch: "1.5"
|
|
29
|
-
|
|
30
|
-
# Clone the s.el repository to the './another-name.el' directory
|
|
31
|
-
- git: https://github.com/magnars/s.el
|
|
32
|
-
path: another-name.el
|
|
33
|
-
branch: dda84d38fffdaf0c9b12837b504b402af910d01d
|
|
34
|
-
|
|
35
|
-
# Delete './impatient-mode'
|
|
36
|
-
- git: https://github.com/skeeto/impatient-mode
|
|
37
|
-
delete: true
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Execute the `batchfetch` command from the same directory as `batchfetch.yml` to make it clone or update the local copies of the repositories above.
|
|
41
|
-
|
|
42
|
-
## License
|
|
43
|
-
|
|
44
|
-
Copyright (c) [James Cherti](https://www.jamescherti.com)
|
|
45
|
-
|
|
46
|
-
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
|
47
|
-
|
|
48
|
-
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
|
49
|
-
|
|
50
|
-
You should have received a copy of the GNU General Public License along with this program.
|
|
51
|
-
|
|
52
|
-
## Links
|
|
53
|
-
|
|
54
|
-
- [The batchfetch Git repository](https://github.com/jamescherti/batchfetch)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|