pyrecli 0.3.1__tar.gz → 0.3.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyrecli
3
- Version: 0.3.1
3
+ Version: 0.3.2
4
4
  Summary: Command line utilities for DiamondFire templates
5
5
  License-Expression: MIT
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pyrecli"
3
- version = "0.3.1"
3
+ version = "0.3.2"
4
4
  description = "Command line utilities for DiamondFire templates"
5
5
  authors = [
6
6
  {name = "Amp"}
@@ -19,7 +19,7 @@ def rename_var_in_text_code(s: str, var_to_rename: str, new_var_name: str):
19
19
  return s
20
20
 
21
21
 
22
- def rename_command(input_path: str, output_path: str|None,
22
+ def rename_command(input_path: str, output_path: str,
23
23
  var_to_rename: str, new_var_name: str,
24
24
  var_to_rename_scope: Literal['game', 'saved', 'local', 'line']|None):
25
25
 
@@ -50,5 +50,4 @@ def rename_command(input_path: str, output_path: str|None,
50
50
  codeblock.data['data'] = new_data
51
51
 
52
52
  new_file_content = '\n'.join(t.build() for t in templates)
53
- write_path = output_path if output_path else input_path
54
- write_output_file(write_path, new_file_content)
53
+ write_output_file(output_path, new_file_content)
@@ -52,10 +52,10 @@ def main() -> int:
52
52
 
53
53
  parser_rename = subparsers.add_parser('rename', help='Rename all occurrences of a variable')
54
54
  parser_rename.add_argument('input_path', help='The file containing template data', type=str)
55
+ parser_rename.add_argument('output_path', help='The file to output to', type=str)
55
56
  parser_rename.add_argument('var_to_rename', help='The variable to rename', type=str)
56
57
  parser_rename.add_argument('new_var_name', help='The new name for the variable', type=str)
57
58
  parser_rename.add_argument('--var_scope', '-s', help='The scope to match', type=rename_target_scope, default=None)
58
- parser_rename.add_argument('--output_path', '-o', help='The file to output to', type=str, default=None)
59
59
 
60
60
  parser_grabinv = subparsers.add_parser('grabinv', help='Save all templates in the inventory to a file with CodeClient')
61
61
  parser_grabinv.add_argument('output_path', help='The file to output template data to', type=str)
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes