treejson-cli 1.0.0__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.
@@ -0,0 +1,29 @@
1
+ Metadata-Version: 2.4
2
+ Name: treejson-cli
3
+ Version: 1.0.2
4
+ Summary: It shows the nested directory structure in JSON or YAML.
5
+ Author-email: masaniki <masaniki.software@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Repository, https://github.com/masaniki/python-treejson-cli
8
+ Project-URL: Document, https://github.com/masaniki/python-treejson-cli/blob/master/README.md
9
+ Project-URL: Issues, https://github.com/masaniki/python-treejson-cli/issues
10
+ Classifier: Development Status :: 1 - Planning
11
+ Classifier: Environment :: Console
12
+ Classifier: Topic :: Terminals
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Natural Language :: English
16
+ Classifier: Natural Language :: Japanese
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: PyYAML
20
+
21
+ # Summary
22
+ It shows the nested directory structure in JSON or YAML.
23
+
24
+ Japanse document is [here](docs/README_JP.md).
25
+
26
+ # Installing
27
+
28
+ `pip install treejson-cli`
29
+
@@ -0,0 +1,9 @@
1
+ # Summary
2
+ It shows the nested directory structure in JSON or YAML.
3
+
4
+ Japanse document is [here](docs/README_JP.md).
5
+
6
+ # Installing
7
+
8
+ `pip install treejson-cli`
9
+
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "treejson-cli"
7
- version = "1.0.0"
7
+ version = "1.0.2"
8
8
  authors = [
9
9
  { name="masaniki", email="masaniki.software@gmail.com" },
10
10
  ]
@@ -25,7 +25,7 @@ license = "MIT"
25
25
  license-files = ["LICENCSE.txt"]
26
26
 
27
27
  [project.scripts]
28
- treejson = "main:mainCLI"
28
+ treejson = "treejson:main"
29
29
 
30
30
  [project.urls]
31
31
  Repository = "https://github.com/masaniki/python-treejson-cli"
@@ -0,0 +1,7 @@
1
+
2
+ from .cli import directoryBFS, main
3
+
4
+ __all__=[
5
+ directoryBFS,
6
+ main
7
+ ]
@@ -4,9 +4,9 @@ import argparse
4
4
  import yaml
5
5
  import json
6
6
 
7
- VERSION="v1.0.0"
7
+ VERSION="v1.0.2"
8
8
 
9
- def mainCLI():
9
+ def main():
10
10
  """
11
11
  Smry: CLIを処理する関数。
12
12
 
@@ -14,9 +14,9 @@ def mainCLI():
14
14
  Type: dict
15
15
  Smry: {directory名(str):[i(int):i番目の子directory名(str)]}という木構造。
16
16
  """
17
- parser=argparse.ArgumentParser(prog="PROG")
17
+ parser=argparse.ArgumentParser(prog="treejson")
18
18
  parser.add_argument("dirName",type=str,default=None,help="put in directory name. Both absolute and relative is OK.")
19
- parser.add_argument("-v","--version",action="version",version=f"treejson {VERSION}")
19
+ parser.add_argument("-v","--version",action="version",version="%(prog)s"+f"{VERSION}")
20
20
  parser.add_argument("-y","--yaml",action="store_true",help="output as a YAML format.")
21
21
  parser.add_argument("-a","--all",action="store_true",help="visit hidden file.")
22
22
  parser.add_argument("-f","--file",type=str,help="output as a file.")
@@ -97,4 +97,4 @@ def directoryBFS(startDir:Path,maxDepth:int=None,isAll:bool=None):
97
97
 
98
98
 
99
99
  if(__name__=="__main__"):
100
- mainCLI()
100
+ main()
@@ -0,0 +1,29 @@
1
+ Metadata-Version: 2.4
2
+ Name: treejson-cli
3
+ Version: 1.0.2
4
+ Summary: It shows the nested directory structure in JSON or YAML.
5
+ Author-email: masaniki <masaniki.software@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: Repository, https://github.com/masaniki/python-treejson-cli
8
+ Project-URL: Document, https://github.com/masaniki/python-treejson-cli/blob/master/README.md
9
+ Project-URL: Issues, https://github.com/masaniki/python-treejson-cli/issues
10
+ Classifier: Development Status :: 1 - Planning
11
+ Classifier: Environment :: Console
12
+ Classifier: Topic :: Terminals
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Natural Language :: English
16
+ Classifier: Natural Language :: Japanese
17
+ Requires-Python: >=3.9
18
+ Description-Content-Type: text/markdown
19
+ Requires-Dist: PyYAML
20
+
21
+ # Summary
22
+ It shows the nested directory structure in JSON or YAML.
23
+
24
+ Japanse document is [here](docs/README_JP.md).
25
+
26
+ # Installing
27
+
28
+ `pip install treejson-cli`
29
+
@@ -1,6 +1,7 @@
1
1
  README.md
2
2
  pyproject.toml
3
- src/main.py
3
+ src/treejson/__init__.py
4
+ src/treejson/cli.py
4
5
  src/treejson_cli.egg-info/PKG-INFO
5
6
  src/treejson_cli.egg-info/SOURCES.txt
6
7
  src/treejson_cli.egg-info/dependency_links.txt
@@ -0,0 +1,2 @@
1
+ [console_scripts]
2
+ treejson = treejson:main
@@ -1,81 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: treejson-cli
3
- Version: 1.0.0
4
- Summary: It shows the nested directory structure in JSON or YAML.
5
- Author-email: masaniki <masaniki.software@gmail.com>
6
- License-Expression: MIT
7
- Project-URL: Repository, https://github.com/masaniki/python-treejson-cli
8
- Project-URL: Document, https://github.com/masaniki/python-treejson-cli/blob/master/README.md
9
- Project-URL: Issues, https://github.com/masaniki/python-treejson-cli/issues
10
- Classifier: Development Status :: 1 - Planning
11
- Classifier: Environment :: Console
12
- Classifier: Topic :: Terminals
13
- Classifier: Operating System :: OS Independent
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Natural Language :: English
16
- Classifier: Natural Language :: Japanese
17
- Requires-Python: >=3.9
18
- Description-Content-Type: text/markdown
19
- Requires-Dist: PyYAML
20
-
21
- # Abstract
22
- It shows the nested directory structure in JSON or YAML.
23
-
24
- Japanse document is [here](docs/README_JP.md).
25
-
26
- # How to install
27
- `pip install treejson-cli`
28
-
29
- ## Package Dependencies
30
-
31
- The following packages may not work properly if they are not installed:
32
-
33
- - [PyYAML](https://pypi.org/project/PyYAML/): Most popular YAML parser for Python.
34
-
35
- # How to run
36
- `treejson <directory>`
37
-
38
- The directory structure is compiled into JSON and output to standard output.
39
-
40
- ## Options
41
-
42
- Detail document is [here](docs/formal_document.md).
43
-
44
- `[-h|--help]`
45
-
46
- Shows help message.
47
-
48
- `[-v|--version]`
49
-
50
- Shows version message.
51
-
52
- `[-y|--yaml]`
53
-
54
- Outputs as a YAML format.
55
-
56
- `[-a|-all]`
57
-
58
- Visits hidden file.
59
-
60
- `[-d|--depth] <depth>`
61
-
62
- Specifies the depth of tree oftraversal.
63
-
64
- If depth=0, it shows current directory.
65
-
66
- `[-f|--file] <output_file>`
67
-
68
- Outputs as a JSON or YAML file.
69
-
70
- ## Examples
71
- - `treejson tests/sample`
72
- ```
73
- {'sample': [{'parent01': [{'child01_01': ['grandchild01.txt']}, {'child01_02': ['grandchild02.txt']}, 'child01_03.txt']}, {'parent02': [{'child02_01': ['grandchild02_01.txt']}]}]}
74
- ```
75
- - `treejson tests/sample -f tests/output.json`
76
-
77
- [tests/output.json](tests/output.json)
78
-
79
- - `treejson tests/sample -yf tests/output.yaml`
80
-
81
- [tests/output.yaml](tests/output.yaml)
@@ -1,61 +0,0 @@
1
- # Abstract
2
- It shows the nested directory structure in JSON or YAML.
3
-
4
- Japanse document is [here](docs/README_JP.md).
5
-
6
- # How to install
7
- `pip install treejson-cli`
8
-
9
- ## Package Dependencies
10
-
11
- The following packages may not work properly if they are not installed:
12
-
13
- - [PyYAML](https://pypi.org/project/PyYAML/): Most popular YAML parser for Python.
14
-
15
- # How to run
16
- `treejson <directory>`
17
-
18
- The directory structure is compiled into JSON and output to standard output.
19
-
20
- ## Options
21
-
22
- Detail document is [here](docs/formal_document.md).
23
-
24
- `[-h|--help]`
25
-
26
- Shows help message.
27
-
28
- `[-v|--version]`
29
-
30
- Shows version message.
31
-
32
- `[-y|--yaml]`
33
-
34
- Outputs as a YAML format.
35
-
36
- `[-a|-all]`
37
-
38
- Visits hidden file.
39
-
40
- `[-d|--depth] <depth>`
41
-
42
- Specifies the depth of tree oftraversal.
43
-
44
- If depth=0, it shows current directory.
45
-
46
- `[-f|--file] <output_file>`
47
-
48
- Outputs as a JSON or YAML file.
49
-
50
- ## Examples
51
- - `treejson tests/sample`
52
- ```
53
- {'sample': [{'parent01': [{'child01_01': ['grandchild01.txt']}, {'child01_02': ['grandchild02.txt']}, 'child01_03.txt']}, {'parent02': [{'child02_01': ['grandchild02_01.txt']}]}]}
54
- ```
55
- - `treejson tests/sample -f tests/output.json`
56
-
57
- [tests/output.json](tests/output.json)
58
-
59
- - `treejson tests/sample -yf tests/output.yaml`
60
-
61
- [tests/output.yaml](tests/output.yaml)
@@ -1,81 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: treejson-cli
3
- Version: 1.0.0
4
- Summary: It shows the nested directory structure in JSON or YAML.
5
- Author-email: masaniki <masaniki.software@gmail.com>
6
- License-Expression: MIT
7
- Project-URL: Repository, https://github.com/masaniki/python-treejson-cli
8
- Project-URL: Document, https://github.com/masaniki/python-treejson-cli/blob/master/README.md
9
- Project-URL: Issues, https://github.com/masaniki/python-treejson-cli/issues
10
- Classifier: Development Status :: 1 - Planning
11
- Classifier: Environment :: Console
12
- Classifier: Topic :: Terminals
13
- Classifier: Operating System :: OS Independent
14
- Classifier: Programming Language :: Python :: 3
15
- Classifier: Natural Language :: English
16
- Classifier: Natural Language :: Japanese
17
- Requires-Python: >=3.9
18
- Description-Content-Type: text/markdown
19
- Requires-Dist: PyYAML
20
-
21
- # Abstract
22
- It shows the nested directory structure in JSON or YAML.
23
-
24
- Japanse document is [here](docs/README_JP.md).
25
-
26
- # How to install
27
- `pip install treejson-cli`
28
-
29
- ## Package Dependencies
30
-
31
- The following packages may not work properly if they are not installed:
32
-
33
- - [PyYAML](https://pypi.org/project/PyYAML/): Most popular YAML parser for Python.
34
-
35
- # How to run
36
- `treejson <directory>`
37
-
38
- The directory structure is compiled into JSON and output to standard output.
39
-
40
- ## Options
41
-
42
- Detail document is [here](docs/formal_document.md).
43
-
44
- `[-h|--help]`
45
-
46
- Shows help message.
47
-
48
- `[-v|--version]`
49
-
50
- Shows version message.
51
-
52
- `[-y|--yaml]`
53
-
54
- Outputs as a YAML format.
55
-
56
- `[-a|-all]`
57
-
58
- Visits hidden file.
59
-
60
- `[-d|--depth] <depth>`
61
-
62
- Specifies the depth of tree oftraversal.
63
-
64
- If depth=0, it shows current directory.
65
-
66
- `[-f|--file] <output_file>`
67
-
68
- Outputs as a JSON or YAML file.
69
-
70
- ## Examples
71
- - `treejson tests/sample`
72
- ```
73
- {'sample': [{'parent01': [{'child01_01': ['grandchild01.txt']}, {'child01_02': ['grandchild02.txt']}, 'child01_03.txt']}, {'parent02': [{'child02_01': ['grandchild02_01.txt']}]}]}
74
- ```
75
- - `treejson tests/sample -f tests/output.json`
76
-
77
- [tests/output.json](tests/output.json)
78
-
79
- - `treejson tests/sample -yf tests/output.yaml`
80
-
81
- [tests/output.yaml](tests/output.yaml)
@@ -1,2 +0,0 @@
1
- [console_scripts]
2
- treejson = main:mainCLI
File without changes