pyletree 2.2.0__tar.gz → 2.3.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyletree
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: Generate directory tree diagrams from the command line
5
5
  Author: Davi Reis Furtado, Leodanis Pozo Ramos
6
6
  License: MIT License
@@ -37,7 +37,7 @@ Dynamic: license-file
37
37
 
38
38
  <img src="https://img.shields.io/badge/python-3.8%2B-blue">
39
39
  <img src="https://img.shields.io/badge/license-MIT-green">
40
- <img src="https://img.shields.io/badge/version-2.2.0-orange">
40
+ <img src="https://img.shields.io/badge/version-2.3.0-orange">
41
41
 
42
42
  <br>
43
43
 
@@ -164,7 +164,7 @@ pyletree . -dl 2
164
164
  Dictionary output:
165
165
 
166
166
  ```bash
167
- pyletree . -dt -di 4
167
+ pyletree . -dt 4
168
168
  ```
169
169
 
170
170
  Ignore entries:
@@ -257,13 +257,21 @@ project/
257
257
 
258
258
  ## Release History
259
259
 
260
+ ### 2.3.0
261
+
262
+ #### Enhancements
263
+
264
+ - Integrated `-di`/`--dict-indent` into `-dt`/`--dict-tree`.
265
+ - Example: `pyletree . -dt 4` (4-space indentation)
266
+ - Example: `pyletree . -dt 0` (compact, no indentation)
267
+
260
268
  ### 2.2.0
261
269
 
262
270
  #### Enhancements
263
271
 
264
- - `-dt`/`--dict-tree` | Enhanced Dictionary Output: improved dictionary format with configurable indentation. Now returns `{root: {tree...}}` format and supports custom indentation via `-di N`/`--dict-indent N` (default 2).
265
- - Example: `pyletree . -dt -di 4` (4-space indentation)
266
- - Example: `pyletree . -dt -di 0` (compact, no indentation)
272
+ - `-dt`/`--dict-tree` | Enhanced Dictionary Output: improved dictionary format with configurable indentation. Now returns `{root: {tree...}}` format and supports custom indentation via `-dt N`/`--dict-tree N` (default 2).
273
+ - Example: `pyletree . -dt 4` (4-space indentation)
274
+ - Example: `pyletree . -dt 0` (compact, no indentation)
267
275
  - Better structured output for programmatic use
268
276
 
269
277
  ### 2.1.0
@@ -292,7 +300,7 @@ project/
292
300
 
293
301
  #### Filtering & Data Structures
294
302
 
295
- - `-dt`/`--dict-tree` | Dictionary format: output the tree structure as a native Python dictionary. Use `-di N`/`--dict-indent N` for indentation (default 2). Format: {root: {tree...}}
303
+ - `-dt`/`--dict-tree` | Dictionary format: output the tree structure as a native Python dictionary. Use `-dt N`/`--dict-tree N` for indentation (default 2). Format: {root: {tree...}}
296
304
  - Global File Filter: support for excluding/including files based on patterns or extensions.
297
305
  - Add patterns to `-i` / `--ignore` option.
298
306
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  <img src="https://img.shields.io/badge/python-3.8%2B-blue">
5
5
  <img src="https://img.shields.io/badge/license-MIT-green">
6
- <img src="https://img.shields.io/badge/version-2.2.0-orange">
6
+ <img src="https://img.shields.io/badge/version-2.3.0-orange">
7
7
 
8
8
  <br>
9
9
 
@@ -130,7 +130,7 @@ pyletree . -dl 2
130
130
  Dictionary output:
131
131
 
132
132
  ```bash
133
- pyletree . -dt -di 4
133
+ pyletree . -dt 4
134
134
  ```
135
135
 
136
136
  Ignore entries:
@@ -223,13 +223,21 @@ project/
223
223
 
224
224
  ## Release History
225
225
 
226
+ ### 2.3.0
227
+
228
+ #### Enhancements
229
+
230
+ - Integrated `-di`/`--dict-indent` into `-dt`/`--dict-tree`.
231
+ - Example: `pyletree . -dt 4` (4-space indentation)
232
+ - Example: `pyletree . -dt 0` (compact, no indentation)
233
+
226
234
  ### 2.2.0
227
235
 
228
236
  #### Enhancements
229
237
 
230
- - `-dt`/`--dict-tree` | Enhanced Dictionary Output: improved dictionary format with configurable indentation. Now returns `{root: {tree...}}` format and supports custom indentation via `-di N`/`--dict-indent N` (default 2).
231
- - Example: `pyletree . -dt -di 4` (4-space indentation)
232
- - Example: `pyletree . -dt -di 0` (compact, no indentation)
238
+ - `-dt`/`--dict-tree` | Enhanced Dictionary Output: improved dictionary format with configurable indentation. Now returns `{root: {tree...}}` format and supports custom indentation via `-dt N`/`--dict-tree N` (default 2).
239
+ - Example: `pyletree . -dt 4` (4-space indentation)
240
+ - Example: `pyletree . -dt 0` (compact, no indentation)
233
241
  - Better structured output for programmatic use
234
242
 
235
243
  ### 2.1.0
@@ -258,7 +266,7 @@ project/
258
266
 
259
267
  #### Filtering & Data Structures
260
268
 
261
- - `-dt`/`--dict-tree` | Dictionary format: output the tree structure as a native Python dictionary. Use `-di N`/`--dict-indent N` for indentation (default 2). Format: {root: {tree...}}
269
+ - `-dt`/`--dict-tree` | Dictionary format: output the tree structure as a native Python dictionary. Use `-dt N`/`--dict-tree N` for indentation (default 2). Format: {root: {tree...}}
262
270
  - Global File Filter: support for excluding/including files based on patterns or extensions.
263
271
  - Add patterns to `-i` / `--ignore` option.
264
272
 
@@ -4,7 +4,7 @@ build-backend = 'setuptools.build_meta'
4
4
 
5
5
  [project]
6
6
  name = 'pyletree'
7
- version = '2.2.0'
7
+ version = '2.3.0'
8
8
  description = 'Generate directory tree diagrams from the command line'
9
9
  readme = 'README.md'
10
10
  license = { file = 'LICENSE' }
@@ -58,8 +58,8 @@ def main() -> None:
58
58
  reverse=args.reverse,
59
59
  )
60
60
 
61
- if args.dict_tree:
62
- indent = args.dict_indent if args.dict_indent > 0 else None
61
+ if args.dict_tree is not None:
62
+ indent = args.dict_tree if args.dict_tree > 0 else None
63
63
  print(json.dumps(tree.getDictTree(), indent=indent))
64
64
  else:
65
65
  for line in tree:
@@ -162,17 +162,11 @@ def parse_cmd_line_arguments() -> argparse.Namespace:
162
162
  parser.add_argument(
163
163
  '-dt',
164
164
  '--dict-tree',
165
- action='store_true',
166
- help='output the tree structure as a native Python dictionary (JSON format)',
167
- )
168
-
169
- parser.add_argument(
170
- '-di',
171
- '--dict-indent',
172
165
  metavar='N',
166
+ nargs='?',
173
167
  type=int,
174
- default=2,
175
- help='indentation for dictionary output (default 2)',
168
+ const=2,
169
+ help='output the tree structure as a native Python dictionary (JSON format). N spaces indent (default 2)',
176
170
  )
177
171
 
178
172
  args = parser.parse_args()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyletree
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: Generate directory tree diagrams from the command line
5
5
  Author: Davi Reis Furtado, Leodanis Pozo Ramos
6
6
  License: MIT License
@@ -37,7 +37,7 @@ Dynamic: license-file
37
37
 
38
38
  <img src="https://img.shields.io/badge/python-3.8%2B-blue">
39
39
  <img src="https://img.shields.io/badge/license-MIT-green">
40
- <img src="https://img.shields.io/badge/version-2.2.0-orange">
40
+ <img src="https://img.shields.io/badge/version-2.3.0-orange">
41
41
 
42
42
  <br>
43
43
 
@@ -164,7 +164,7 @@ pyletree . -dl 2
164
164
  Dictionary output:
165
165
 
166
166
  ```bash
167
- pyletree . -dt -di 4
167
+ pyletree . -dt 4
168
168
  ```
169
169
 
170
170
  Ignore entries:
@@ -257,13 +257,21 @@ project/
257
257
 
258
258
  ## Release History
259
259
 
260
+ ### 2.3.0
261
+
262
+ #### Enhancements
263
+
264
+ - Integrated `-di`/`--dict-indent` into `-dt`/`--dict-tree`.
265
+ - Example: `pyletree . -dt 4` (4-space indentation)
266
+ - Example: `pyletree . -dt 0` (compact, no indentation)
267
+
260
268
  ### 2.2.0
261
269
 
262
270
  #### Enhancements
263
271
 
264
- - `-dt`/`--dict-tree` | Enhanced Dictionary Output: improved dictionary format with configurable indentation. Now returns `{root: {tree...}}` format and supports custom indentation via `-di N`/`--dict-indent N` (default 2).
265
- - Example: `pyletree . -dt -di 4` (4-space indentation)
266
- - Example: `pyletree . -dt -di 0` (compact, no indentation)
272
+ - `-dt`/`--dict-tree` | Enhanced Dictionary Output: improved dictionary format with configurable indentation. Now returns `{root: {tree...}}` format and supports custom indentation via `-dt N`/`--dict-tree N` (default 2).
273
+ - Example: `pyletree . -dt 4` (4-space indentation)
274
+ - Example: `pyletree . -dt 0` (compact, no indentation)
267
275
  - Better structured output for programmatic use
268
276
 
269
277
  ### 2.1.0
@@ -292,7 +300,7 @@ project/
292
300
 
293
301
  #### Filtering & Data Structures
294
302
 
295
- - `-dt`/`--dict-tree` | Dictionary format: output the tree structure as a native Python dictionary. Use `-di N`/`--dict-indent N` for indentation (default 2). Format: {root: {tree...}}
303
+ - `-dt`/`--dict-tree` | Dictionary format: output the tree structure as a native Python dictionary. Use `-dt N`/`--dict-tree N` for indentation (default 2). Format: {root: {tree...}}
296
304
  - Global File Filter: support for excluding/including files based on patterns or extensions.
297
305
  - Add patterns to `-i` / `--ignore` option.
298
306
 
File without changes
File without changes