pyrecli 0.3.2__tar.gz → 0.3.3__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: pyrecli
3
- Version: 0.3.2
3
+ Version: 0.3.3
4
4
  Summary: Command line utilities for DiamondFire templates
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.12
14
14
  Classifier: Programming Language :: Python :: 3.13
15
15
  Classifier: Programming Language :: Python :: 3.14
16
16
  Provides-Extra: dev
17
- Requires-Dist: dfpyre (>=0.9.6)
17
+ Requires-Dist: dfpyre (>=0.10.2)
18
18
  Requires-Dist: pytest (>=9.0.2) ; extra == "dev"
19
19
  Requires-Dist: rapidnbt (>=1.3.5)
20
20
  Requires-Dist: twine (>=6.2.0) ; extra == "dev"
@@ -89,17 +89,12 @@ This command still requires thorough testing, so make sure you have a backup of
89
89
 
90
90
  Example:
91
91
  ```sh
92
- # Changes all variables named `foo` to `bar`.
93
- pyrecli rename templates.dfts foo bar
92
+ # Changes all variables named `foo` to `bar`, then saves the new templates to 'renamed.dfts'.
93
+ pyrecli rename templates.dfts renamed.dfts foo bar
94
94
 
95
95
  # You can also target a specific scope.
96
96
  # This changes all occurences of the game variable `plotData` to `gameData`.
97
- pyrecli rename templates.dfts plotData gameData -s game
98
- ```
99
-
100
- By default, this modifies the input file in-place, but you can use the `--output_path` flag to output the renamed templates to a new file:
101
- ```sh
102
- pyrecli rename templates.dfts foo bar --output_path renamed_templates.dfts
97
+ pyrecli rename templates.dfts renamed.dfts plotData gameData -s game
103
98
  ```
104
99
 
105
100
  ### Script
@@ -66,17 +66,12 @@ This command still requires thorough testing, so make sure you have a backup of
66
66
 
67
67
  Example:
68
68
  ```sh
69
- # Changes all variables named `foo` to `bar`.
70
- pyrecli rename templates.dfts foo bar
69
+ # Changes all variables named `foo` to `bar`, then saves the new templates to 'renamed.dfts'.
70
+ pyrecli rename templates.dfts renamed.dfts foo bar
71
71
 
72
72
  # You can also target a specific scope.
73
73
  # This changes all occurences of the game variable `plotData` to `gameData`.
74
- pyrecli rename templates.dfts plotData gameData -s game
75
- ```
76
-
77
- By default, this modifies the input file in-place, but you can use the `--output_path` flag to output the renamed templates to a new file:
78
- ```sh
79
- pyrecli rename templates.dfts foo bar --output_path renamed_templates.dfts
74
+ pyrecli rename templates.dfts renamed.dfts plotData gameData -s game
80
75
  ```
81
76
 
82
77
  ### Script
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyrecli"
3
- version = "0.3.2"
3
+ version = "0.3.3"
4
4
  description = "Command line utilities for DiamondFire templates"
5
5
  authors = [
6
6
  {name = "Amp"}
@@ -11,7 +11,7 @@ keywords = ["diamondfire", "minecraft", "template", "cli", "tools"]
11
11
 
12
12
  requires-python = ">=3.10"
13
13
  dependencies = [
14
- "dfpyre>=0.9.6",
14
+ "dfpyre>=0.10.2",
15
15
  "rapidnbt>=1.3.5"
16
16
  ]
17
17
 
@@ -1,6 +1,5 @@
1
1
  from typing import Literal, TypedDict
2
2
  from dfpyre import DFTemplate, Item, Parameter
3
- from mcitemlib.itemlib import MCItemlibException
4
3
  from pyrecli.util import read_input_file, write_output_file, parse_templates_from_string
5
4
 
6
5
 
@@ -8,7 +8,7 @@ def write_to_directory(dir_name: str, templates: list[DFTemplate], flags: dict[s
8
8
  os.mkdir(dir_name)
9
9
 
10
10
  for template in templates:
11
- script_path = f'{dir_name}/{template._get_template_name()}.py'
11
+ script_path = f'{dir_name}/{template.get_template_name()}.py'
12
12
  script_string = template.generate_script(**flags)
13
13
  with open(script_path, 'w') as f:
14
14
  f.write(script_string)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes