python-cath 0.4.0__py3-none-any.whl → 0.4.1__py3-none-any.whl

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.
python_cath/__main__.py CHANGED
@@ -28,10 +28,27 @@ def version_callback(value: bool) -> None:
28
28
 
29
29
  @app.command()
30
30
  def main(
31
- file_list: List[str] = typer.Argument(...),
32
- output_file: str = typer.Option(
33
- ..., "--output", "-o", help="Output file path"
31
+ files: List[str] = typer.Argument(
32
+ ...,
33
+ help="Two or more input files followed by the output file "
34
+ "(the last argument is the output).",
34
35
  ),
35
36
  ) -> None:
36
- """Concatenate CSV files with a shared header into output_file."""
37
- concat(file_list, output_file)
37
+ """Concatenate CSV files with a shared header.
38
+
39
+ Provide two or more input files followed by the output file as the
40
+ final argument, e.g. ``python-cath in1 in2 out``.
41
+ """
42
+ if len(files) < 3:
43
+ console.print(
44
+ "[red]Error:[/] need at least two input files plus an output "
45
+ "file; the last argument is the output and would otherwise "
46
+ "overwrite an input.",
47
+ )
48
+ raise typer.Exit(code=2)
49
+ *input_files, output_file = files
50
+ concat(input_files, output_file)
51
+
52
+
53
+ if __name__ == "__main__":
54
+ app()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-cath
3
- Version: 0.4.0
3
+ Version: 0.4.1
4
4
  Summary: Cat files w/ headers
5
5
  License: MIT
6
6
  License-File: LICENSE
@@ -61,7 +61,7 @@ python-cath --help
61
61
  ```
62
62
 
63
63
  ```bash
64
- python-cath file1 file2 --output outfile
64
+ python-cath file1 file2 outfile
65
65
  ```
66
66
 
67
67
  or if installed with `Poetry`:
@@ -71,7 +71,7 @@ poetry run python-cath --help
71
71
  ```
72
72
 
73
73
  ```bash
74
- poetry run python-cath file1 file2 --output outfile
74
+ poetry run python-cath file1 file2 outfile
75
75
  ```
76
76
 
77
77
  ### Makefile usage
@@ -0,0 +1,10 @@
1
+ python_cath/__init__.py,sha256=jWtDUGUgV39IeDqwlQ9ziOy9ceofcf1hsppd2C_t9Yw,250
2
+ python_cath/__main__.py,sha256=0dHoJuY2-EwtTgq8TN_qq-luNU95q5I0mbGUFj9ZsCQ,1393
3
+ python_cath/concat.py,sha256=RYSWSePSbdWI9JlzFlIVtoa7rH1-LmiruorjDc9jKZY,1731
4
+ python_cath/example.py,sha256=LGLU6ShWSJtu2zPbGXmQJw5ktJkNlGnRhFjY8OTlePM,366
5
+ python_cath/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
+ python_cath-0.4.1.dist-info/METADATA,sha256=BuiCVkhSbb4uCyIUKZmumsrhbmP0R_LpGxanrcdStaw,7674
7
+ python_cath-0.4.1.dist-info/WHEEL,sha256=EGEvSphFYqXKs23-kQBeyNoJP1nrT8ZJKQoi5p5DYL8,88
8
+ python_cath-0.4.1.dist-info/entry_points.txt,sha256=CKAIA5eO7sx0McMvZxxXm01CYasNWeOfB3MWbkNcP7I,56
9
+ python_cath-0.4.1.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
+ python_cath-0.4.1.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: poetry-core 2.3.2
2
+ Generator: poetry-core 2.4.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,10 +0,0 @@
1
- python_cath/__init__.py,sha256=jWtDUGUgV39IeDqwlQ9ziOy9ceofcf1hsppd2C_t9Yw,250
2
- python_cath/__main__.py,sha256=SKkaB4X6hUcd10OSsqM65Rj9QGiOt2jK1K-Cxs2FN2g,902
3
- python_cath/concat.py,sha256=RYSWSePSbdWI9JlzFlIVtoa7rH1-LmiruorjDc9jKZY,1731
4
- python_cath/example.py,sha256=LGLU6ShWSJtu2zPbGXmQJw5ktJkNlGnRhFjY8OTlePM,366
5
- python_cath/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- python_cath-0.4.0.dist-info/METADATA,sha256=13QGcyH60F0hUw-CAeztY5eg8-AMEl_vAp8xYszxfQ4,7692
7
- python_cath-0.4.0.dist-info/WHEEL,sha256=Vz2fHgx6HFtSwhs8KvkHLqH5Ea4w1_rner5uNVGCeIE,88
8
- python_cath-0.4.0.dist-info/entry_points.txt,sha256=CKAIA5eO7sx0McMvZxxXm01CYasNWeOfB3MWbkNcP7I,56
9
- python_cath-0.4.0.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- python_cath-0.4.0.dist-info/RECORD,,