filelisting 1.2.0__tar.gz → 1.2.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.
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: filelisting
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: List files under given paths.
5
- Author-email: Johannes <johannes-programming@posteo.org>
5
+ Author-email: Johannes <johannes-programming@mailfence.com>
6
6
  License: The MIT License (MIT)
7
7
 
8
8
  Copyright (c) 2023 Johannes Programming
@@ -23,17 +23,19 @@ License: The MIT License (MIT)
23
23
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
24
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
25
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
- SOFTWARE.
27
-
26
+ SOFTWARE.
27
+ Project-URL: Documentation, https://pypi.org/project/filelisting
28
28
  Project-URL: Download, https://pypi.org/project/filelisting/#files
29
29
  Project-URL: Source, https://github.com/johannes-programming/filelisting
30
30
  Classifier: License :: OSI Approved :: MIT License
31
31
  Classifier: Programming Language :: Python
32
32
  Classifier: Programming Language :: Python :: 3
33
+ Classifier: Programming Language :: Python :: 3 :: Only
33
34
  Requires-Python: >=3.11
34
35
  Description-Content-Type: text/x-rst
35
36
  License-File: LICENSE.txt
36
- Requires-Dist: wonderparse>=1.2
37
+ Requires-Dist: click>=8.1.7
38
+ Requires-Dist: getoptify>=1.0.1
37
39
 
38
40
  ===========
39
41
  filelisting
@@ -47,12 +49,24 @@ List files under given paths.
47
49
  Installation
48
50
  ------------
49
51
 
50
- To install filelisting, you can use `pip`. Open your terminal and run:
52
+ To install ``filelisting``, you can use ``pip``. Open your terminal and run:
51
53
 
52
54
  .. code-block:: bash
53
55
 
54
56
  pip install filelisting
55
57
 
58
+ CLI
59
+ ---
60
+
61
+ The project provides a CLI. For more information apply the ``--help`` flag.
62
+
63
+ Features
64
+ --------
65
+
66
+ * ``main`` constitutes the CLI
67
+ * ``file_generator`` takes an arbitrary number of paths and iterates over the references files
68
+ * ``file_list`` returns a list version of ``file_generator``
69
+
56
70
  License
57
71
  -------
58
72
 
@@ -61,12 +75,14 @@ This project is licensed under the MIT License.
61
75
  Links
62
76
  -----
63
77
 
78
+ * `Documentation <https://pypi.org/project/filelisting>`_
64
79
  * `Download <https://pypi.org/project/filelisting/#files>`_
65
80
  * `Source <https://github.com/johannes-programming/filelisting>`_
66
81
 
67
82
  Credits
68
83
  -------
69
- - Author: Johannes Programming
70
- - Email: johannes-programming@posteo.org
71
84
 
72
- Thank you for using filelisting!
85
+ * Author: Johannes
86
+ * Email: johannes-programming@mailfence.com
87
+
88
+ Thank you for using ``filelisting``!
@@ -0,0 +1,49 @@
1
+ ===========
2
+ filelisting
3
+ ===========
4
+
5
+ Overview
6
+ --------
7
+
8
+ List files under given paths.
9
+
10
+ Installation
11
+ ------------
12
+
13
+ To install ``filelisting``, you can use ``pip``. Open your terminal and run:
14
+
15
+ .. code-block:: bash
16
+
17
+ pip install filelisting
18
+
19
+ CLI
20
+ ---
21
+
22
+ The project provides a CLI. For more information apply the ``--help`` flag.
23
+
24
+ Features
25
+ --------
26
+
27
+ * ``main`` constitutes the CLI
28
+ * ``file_generator`` takes an arbitrary number of paths and iterates over the references files
29
+ * ``file_list`` returns a list version of ``file_generator``
30
+
31
+ License
32
+ -------
33
+
34
+ This project is licensed under the MIT License.
35
+
36
+ Links
37
+ -----
38
+
39
+ * `Documentation <https://pypi.org/project/filelisting>`_
40
+ * `Download <https://pypi.org/project/filelisting/#files>`_
41
+ * `Source <https://github.com/johannes-programming/filelisting>`_
42
+
43
+ Credits
44
+ -------
45
+
46
+ * Author: Johannes
47
+ * Email: johannes-programming@mailfence.com
48
+
49
+ Thank you for using ``filelisting``!
@@ -1,31 +1,34 @@
1
1
  [build-system]
2
+ build-backend = "setuptools.build_meta"
2
3
  requires = [
3
4
  "setuptools>=61.0.0",
4
5
  ]
5
- build-backend = "setuptools.build_meta"
6
6
 
7
7
  [project]
8
- name = "filelisting"
9
- version = "1.2.0"
10
- description = "List files under given paths."
11
- readme = "README.rst"
12
8
  authors = [
13
- { name = "Johannes", email = "johannes-programming@posteo.org" },
9
+ { email = "johannes-programming@mailfence.com", name = "Johannes" },
14
10
  ]
15
11
  classifiers = [
16
12
  "License :: OSI Approved :: MIT License",
17
13
  "Programming Language :: Python",
18
14
  "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: 3 :: Only",
19
16
  ]
20
- keywords = []
21
17
  dependencies = [
22
- "wonderparse>=1.2",
18
+ "click>=8.1.7",
19
+ "getoptify>=1.0.1",
23
20
  ]
21
+ description = "List files under given paths."
22
+ keywords = []
23
+ name = "filelisting"
24
+ readme = "README.rst"
24
25
  requires-python = ">=3.11"
26
+ version = "1.2.2"
25
27
 
26
28
  [project.license]
27
29
  file = "LICENSE.txt"
28
30
 
29
31
  [project.urls]
32
+ Documentation = "https://pypi.org/project/filelisting"
30
33
  Download = "https://pypi.org/project/filelisting/#files"
31
34
  Source = "https://github.com/johannes-programming/filelisting"
@@ -0,0 +1,38 @@
1
+ import os as _os
2
+
3
+ import click as _click
4
+ import getoptify as _getoptify
5
+
6
+ _CONTEXT_SETTINGS = dict(help_option_names=["-h", "--help"])
7
+
8
+
9
+ def file_generator(*paths):
10
+ for raw_path in paths:
11
+ path = raw_path
12
+ path = _os.path.expanduser(path)
13
+ path = _os.path.expandvars(path)
14
+ if _os.path.isfile(path):
15
+ yield path
16
+ continue
17
+ for root, dnames, fnames in _os.walk(path):
18
+ for fname in fnames:
19
+ file = _os.path.join(root, fname)
20
+ yield file
21
+
22
+
23
+ def file_list(*paths):
24
+ return list(file_generator(*paths))
25
+
26
+
27
+ @_getoptify.command(shortopts="hV")
28
+ @_click.command(context_settings=_CONTEXT_SETTINGS)
29
+ @_click.version_option(None, "-V", "--version")
30
+ @_click.argument("path", nargs=-1)
31
+ def main(path):
32
+ """List files under given paths."""
33
+ for f in file_list(*path):
34
+ _click.echo(f)
35
+
36
+
37
+ if __name__ == "__main__":
38
+ main()
@@ -1,4 +1,4 @@
1
1
  from filelisting import main
2
2
 
3
- if __name__ == '__main__':
3
+ if __name__ == "__main__":
4
4
  main()
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: filelisting
3
- Version: 1.2.0
3
+ Version: 1.2.2
4
4
  Summary: List files under given paths.
5
- Author-email: Johannes <johannes-programming@posteo.org>
5
+ Author-email: Johannes <johannes-programming@mailfence.com>
6
6
  License: The MIT License (MIT)
7
7
 
8
8
  Copyright (c) 2023 Johannes Programming
@@ -23,17 +23,19 @@ License: The MIT License (MIT)
23
23
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
24
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
25
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
- SOFTWARE.
27
-
26
+ SOFTWARE.
27
+ Project-URL: Documentation, https://pypi.org/project/filelisting
28
28
  Project-URL: Download, https://pypi.org/project/filelisting/#files
29
29
  Project-URL: Source, https://github.com/johannes-programming/filelisting
30
30
  Classifier: License :: OSI Approved :: MIT License
31
31
  Classifier: Programming Language :: Python
32
32
  Classifier: Programming Language :: Python :: 3
33
+ Classifier: Programming Language :: Python :: 3 :: Only
33
34
  Requires-Python: >=3.11
34
35
  Description-Content-Type: text/x-rst
35
36
  License-File: LICENSE.txt
36
- Requires-Dist: wonderparse>=1.2
37
+ Requires-Dist: click>=8.1.7
38
+ Requires-Dist: getoptify>=1.0.1
37
39
 
38
40
  ===========
39
41
  filelisting
@@ -47,12 +49,24 @@ List files under given paths.
47
49
  Installation
48
50
  ------------
49
51
 
50
- To install filelisting, you can use `pip`. Open your terminal and run:
52
+ To install ``filelisting``, you can use ``pip``. Open your terminal and run:
51
53
 
52
54
  .. code-block:: bash
53
55
 
54
56
  pip install filelisting
55
57
 
58
+ CLI
59
+ ---
60
+
61
+ The project provides a CLI. For more information apply the ``--help`` flag.
62
+
63
+ Features
64
+ --------
65
+
66
+ * ``main`` constitutes the CLI
67
+ * ``file_generator`` takes an arbitrary number of paths and iterates over the references files
68
+ * ``file_list`` returns a list version of ``file_generator``
69
+
56
70
  License
57
71
  -------
58
72
 
@@ -61,12 +75,14 @@ This project is licensed under the MIT License.
61
75
  Links
62
76
  -----
63
77
 
78
+ * `Documentation <https://pypi.org/project/filelisting>`_
64
79
  * `Download <https://pypi.org/project/filelisting/#files>`_
65
80
  * `Source <https://github.com/johannes-programming/filelisting>`_
66
81
 
67
82
  Credits
68
83
  -------
69
- - Author: Johannes Programming
70
- - Email: johannes-programming@posteo.org
71
84
 
72
- Thank you for using filelisting!
85
+ * Author: Johannes
86
+ * Email: johannes-programming@mailfence.com
87
+
88
+ Thank you for using ``filelisting``!
@@ -0,0 +1,2 @@
1
+ click>=8.1.7
2
+ getoptify>=1.0.1
@@ -1,35 +0,0 @@
1
- ===========
2
- filelisting
3
- ===========
4
-
5
- Overview
6
- --------
7
-
8
- List files under given paths.
9
-
10
- Installation
11
- ------------
12
-
13
- To install filelisting, you can use `pip`. Open your terminal and run:
14
-
15
- .. code-block:: bash
16
-
17
- pip install filelisting
18
-
19
- License
20
- -------
21
-
22
- This project is licensed under the MIT License.
23
-
24
- Links
25
- -----
26
-
27
- * `Download <https://pypi.org/project/filelisting/#files>`_
28
- * `Source <https://github.com/johannes-programming/filelisting>`_
29
-
30
- Credits
31
- -------
32
- - Author: Johannes Programming
33
- - Email: johannes-programming@posteo.org
34
-
35
- Thank you for using filelisting!
@@ -1,32 +0,0 @@
1
- import os as _os
2
-
3
- import wonderparse as _wp
4
-
5
-
6
- def main(args=None):
7
- _wp.easymode.simple_run(
8
- args=args,
9
- program_object=file_list,
10
- prog='filelisting',
11
- endgame='iterprint',
12
- )
13
-
14
- def file_list(*paths):
15
- return list(file_generator(*paths))
16
-
17
- def file_generator(*paths):
18
- ans = list()
19
- for raw_path in paths:
20
- path = raw_path
21
- path = _os.path.expanduser(path)
22
- path = _os.path.expandvars(path)
23
- if _os.path.isfile(path):
24
- yield path
25
- continue
26
- for (root, dirnames, filenames) in _os.walk(path):
27
- for filename in filenames:
28
- file = _os.path.join(root, filename)
29
- yield file
30
-
31
- if __name__ == '__main__':
32
- main()
@@ -1 +0,0 @@
1
- wonderparse>=1.2
File without changes
File without changes