batchfetch 1.0.1__tar.gz → 1.0.2__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.
Files changed (21) hide show
  1. {batchfetch-1.0.1/batchfetch.egg-info → batchfetch-1.0.2}/PKG-INFO +23 -3
  2. {batchfetch-1.0.1 → batchfetch-1.0.2}/README.md +22 -2
  3. {batchfetch-1.0.1 → batchfetch-1.0.2}/batchfetch/batchfetch_cli.py +25 -10
  4. {batchfetch-1.0.1 → batchfetch-1.0.2/batchfetch.egg-info}/PKG-INFO +23 -3
  5. {batchfetch-1.0.1 → batchfetch-1.0.2}/setup.py +1 -1
  6. {batchfetch-1.0.1 → batchfetch-1.0.2}/.gitignore +0 -0
  7. {batchfetch-1.0.1 → batchfetch-1.0.2}/LICENSE +0 -0
  8. {batchfetch-1.0.1 → batchfetch-1.0.2}/batchfetch/__init__.py +0 -0
  9. {batchfetch-1.0.1 → batchfetch-1.0.2}/batchfetch/batchfetch_base.py +0 -0
  10. {batchfetch-1.0.1 → batchfetch-1.0.2}/batchfetch/batchfetch_git.py +0 -0
  11. {batchfetch-1.0.1 → batchfetch-1.0.2}/batchfetch/helpers.py +0 -0
  12. {batchfetch-1.0.1 → batchfetch-1.0.2}/batchfetch.egg-info/SOURCES.txt +0 -0
  13. {batchfetch-1.0.1 → batchfetch-1.0.2}/batchfetch.egg-info/dependency_links.txt +0 -0
  14. {batchfetch-1.0.1 → batchfetch-1.0.2}/batchfetch.egg-info/entry_points.txt +0 -0
  15. {batchfetch-1.0.1 → batchfetch-1.0.2}/batchfetch.egg-info/requires.txt +0 -0
  16. {batchfetch-1.0.1 → batchfetch-1.0.2}/batchfetch.egg-info/top_level.txt +0 -0
  17. {batchfetch-1.0.1 → batchfetch-1.0.2}/run_tests.sh +0 -0
  18. {batchfetch-1.0.1 → batchfetch-1.0.2}/setup.cfg +0 -0
  19. {batchfetch-1.0.1 → batchfetch-1.0.2}/tests/data/test-md5sum.txt +0 -0
  20. {batchfetch-1.0.1 → batchfetch-1.0.2}/tests/data/test-run_simple.sh +0 -0
  21. {batchfetch-1.0.1 → batchfetch-1.0.2}/tests/test_helpers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: batchfetch
3
- Version: 1.0.1
3
+ Version: 1.0.2
4
4
  Summary: Efficiently clone and pull multiple Git repositories.
5
5
  Home-page: https://github.com/jamescherti/batchfetch
6
6
  Author: James Cherti
@@ -31,9 +31,11 @@ Efficiently clone or pull multiple Git repositories in parallel. Ideal for devel
31
31
  ## Installation
32
32
 
33
33
  ```
34
- sudo pip install git+https://github.com/jamescherti/batchfetch
34
+ pip install --user batchfetch
35
35
  ```
36
36
 
37
+ The pip command above will install the `batchfetch` executable in the directory `~/.local/bin/`.
38
+
37
39
  ## Example
38
40
 
39
41
  Here is an example of a `batchfetch.yaml` file:
@@ -63,6 +65,23 @@ tasks:
63
65
 
64
66
  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
67
 
68
+ ## Usage
69
+
70
+ Here are the various options that `batchfetch` provides, along with descriptions of their usage:
71
+
72
+ ```sh
73
+ usage: batchfetch [--option] [args]
74
+
75
+ Command line interface.
76
+
77
+ options:
78
+ -h, --help show this help message and exit
79
+ -p MAX_PROCS, --max-procs MAX_PROCS
80
+ Run up to N Number of parallel git processes (Default: 3).
81
+ -v, --verbose Enable verbose mode.
82
+ -f BATCHFETCH_FILE, --batchfetch-file BATCHFETCH_FILE
83
+ Specify the batchfetch YAML file (default: './batchfetch.yaml').
84
+ ```
66
85
  ## License
67
86
 
68
87
  Copyright (c) [James Cherti](https://www.jamescherti.com)
@@ -75,4 +94,5 @@ You should have received a copy of the GNU General Public License along with thi
75
94
 
76
95
  ## Links
77
96
 
78
- - [The batchfetch Git repository](https://github.com/jamescherti/batchfetch)
97
+ - [batchfetch @GitHub](https://github.com/jamescherti/batchfetch)
98
+ - [batchfetch @Pypi](https://pypi.org/project/batchfetch/)
@@ -7,9 +7,11 @@ Efficiently clone or pull multiple Git repositories in parallel. Ideal for devel
7
7
  ## Installation
8
8
 
9
9
  ```
10
- sudo pip install git+https://github.com/jamescherti/batchfetch
10
+ pip install --user batchfetch
11
11
  ```
12
12
 
13
+ The pip command above will install the `batchfetch` executable in the directory `~/.local/bin/`.
14
+
13
15
  ## Example
14
16
 
15
17
  Here is an example of a `batchfetch.yaml` file:
@@ -39,6 +41,23 @@ tasks:
39
41
 
40
42
  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
43
 
44
+ ## Usage
45
+
46
+ Here are the various options that `batchfetch` provides, along with descriptions of their usage:
47
+
48
+ ```sh
49
+ usage: batchfetch [--option] [args]
50
+
51
+ Command line interface.
52
+
53
+ options:
54
+ -h, --help show this help message and exit
55
+ -p MAX_PROCS, --max-procs MAX_PROCS
56
+ Run up to N Number of parallel git processes (Default: 3).
57
+ -v, --verbose Enable verbose mode.
58
+ -f BATCHFETCH_FILE, --batchfetch-file BATCHFETCH_FILE
59
+ Specify the batchfetch YAML file (default: './batchfetch.yaml').
60
+ ```
42
61
  ## License
43
62
 
44
63
  Copyright (c) [James Cherti](https://www.jamescherti.com)
@@ -51,4 +70,5 @@ You should have received a copy of the GNU General Public License along with thi
51
70
 
52
71
  ## Links
53
72
 
54
- - [The batchfetch Git repository](https://github.com/jamescherti/batchfetch)
73
+ - [batchfetch @GitHub](https://github.com/jamescherti/batchfetch)
74
+ - [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
@@ -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
- usage=usage)
205
+ parser = argparse.ArgumentParser(description=desc, usage=usage)
206
+
206
207
  parser.add_argument(
207
208
  "-p", "--max-procs", default="3", required=False,
208
- help="Run up to N Number of parallel git fetch processes.",
209
+ help="Run up to N Number of parallel git processes (Default: 3).",
209
210
  )
210
211
 
211
212
  parser.add_argument(
212
213
  "-v", "--verbose", action="store_true", default=False,
213
- help="Verbose mode.",
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
- [Path(sys.argv[0]).name] + sys.argv[1:]
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
247
  max_workers=int(args.max_procs))
236
- downloader_cli.load(path_batchfetch_yaml)
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.1
3
+ Version: 1.0.2
4
4
  Summary: Efficiently clone and pull multiple Git repositories.
5
5
  Home-page: https://github.com/jamescherti/batchfetch
6
6
  Author: James Cherti
@@ -31,9 +31,11 @@ Efficiently clone or pull multiple Git repositories in parallel. Ideal for devel
31
31
  ## Installation
32
32
 
33
33
  ```
34
- sudo pip install git+https://github.com/jamescherti/batchfetch
34
+ pip install --user batchfetch
35
35
  ```
36
36
 
37
+ The pip command above will install the `batchfetch` executable in the directory `~/.local/bin/`.
38
+
37
39
  ## Example
38
40
 
39
41
  Here is an example of a `batchfetch.yaml` file:
@@ -63,6 +65,23 @@ tasks:
63
65
 
64
66
  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
67
 
68
+ ## Usage
69
+
70
+ Here are the various options that `batchfetch` provides, along with descriptions of their usage:
71
+
72
+ ```sh
73
+ usage: batchfetch [--option] [args]
74
+
75
+ Command line interface.
76
+
77
+ options:
78
+ -h, --help show this help message and exit
79
+ -p MAX_PROCS, --max-procs MAX_PROCS
80
+ Run up to N Number of parallel git processes (Default: 3).
81
+ -v, --verbose Enable verbose mode.
82
+ -f BATCHFETCH_FILE, --batchfetch-file BATCHFETCH_FILE
83
+ Specify the batchfetch YAML file (default: './batchfetch.yaml').
84
+ ```
66
85
  ## License
67
86
 
68
87
  Copyright (c) [James Cherti](https://www.jamescherti.com)
@@ -75,4 +94,5 @@ You should have received a copy of the GNU General Public License along with thi
75
94
 
76
95
  ## Links
77
96
 
78
- - [The batchfetch Git repository](https://github.com/jamescherti/batchfetch)
97
+ - [batchfetch @GitHub](https://github.com/jamescherti/batchfetch)
98
+ - [batchfetch @Pypi](https://pypi.org/project/batchfetch/)
@@ -22,7 +22,7 @@ from setuptools import find_packages, setup
22
22
 
23
23
  setup(
24
24
  name="batchfetch",
25
- version="1.0.1",
25
+ version="1.0.2",
26
26
  packages=find_packages(),
27
27
  description="Efficiently clone and pull multiple Git repositories.",
28
28
  license="GPLv3",
File without changes
File without changes
File without changes
File without changes