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.
- treejson_cli-1.0.2/PKG-INFO +29 -0
- treejson_cli-1.0.2/README.md +9 -0
- {treejson_cli-1.0.0 → treejson_cli-1.0.2}/pyproject.toml +2 -2
- treejson_cli-1.0.2/src/treejson/__init__.py +7 -0
- treejson_cli-1.0.0/src/main.py → treejson_cli-1.0.2/src/treejson/cli.py +5 -5
- treejson_cli-1.0.2/src/treejson_cli.egg-info/PKG-INFO +29 -0
- {treejson_cli-1.0.0 → treejson_cli-1.0.2}/src/treejson_cli.egg-info/SOURCES.txt +2 -1
- treejson_cli-1.0.2/src/treejson_cli.egg-info/entry_points.txt +2 -0
- treejson_cli-1.0.2/src/treejson_cli.egg-info/top_level.txt +1 -0
- treejson_cli-1.0.0/PKG-INFO +0 -81
- treejson_cli-1.0.0/README.md +0 -61
- treejson_cli-1.0.0/src/treejson_cli.egg-info/PKG-INFO +0 -81
- treejson_cli-1.0.0/src/treejson_cli.egg-info/entry_points.txt +0 -2
- treejson_cli-1.0.0/src/treejson_cli.egg-info/top_level.txt +0 -1
- {treejson_cli-1.0.0 → treejson_cli-1.0.2}/setup.cfg +0 -0
- {treejson_cli-1.0.0 → treejson_cli-1.0.2}/src/treejson_cli.egg-info/dependency_links.txt +0 -0
- {treejson_cli-1.0.0 → treejson_cli-1.0.2}/src/treejson_cli.egg-info/requires.txt +0 -0
- {treejson_cli-1.0.0 → treejson_cli-1.0.2}/tests/test_dirjson.py +0 -0
|
@@ -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
|
+
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "treejson-cli"
|
|
7
|
-
version = "1.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
|
|
28
|
+
treejson = "treejson:main"
|
|
29
29
|
|
|
30
30
|
[project.urls]
|
|
31
31
|
Repository = "https://github.com/masaniki/python-treejson-cli"
|
|
@@ -4,9 +4,9 @@ import argparse
|
|
|
4
4
|
import yaml
|
|
5
5
|
import json
|
|
6
6
|
|
|
7
|
-
VERSION="v1.0.
|
|
7
|
+
VERSION="v1.0.2"
|
|
8
8
|
|
|
9
|
-
def
|
|
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="
|
|
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"
|
|
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
|
-
|
|
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
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
treejson
|
treejson_cli-1.0.0/PKG-INFO
DELETED
|
@@ -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)
|
treejson_cli-1.0.0/README.md
DELETED
|
@@ -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 +0,0 @@
|
|
|
1
|
-
main
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|