VPKEdit icon indicating copy to clipboard operation
VPKEdit copied to clipboard

Add support for response files to the CLI

Open sour-dani opened this issue 1 year ago • 5 comments

Describe Your Suggestion

I would like to be able to pass in a list of items stored in a text file instead of calling vpkeditcli for every item in that text file. Similar to how a response file is handled with VPK with the @ symbol.

sour-dani avatar Nov 17 '24 01:11 sour-dani

Related critiques

  • The usage for --add-file is unclear. It does not inform you what to place after the file argument.
  • This error is vague Too few arguments for '--add-file'. as it does not say what kind of argument it's looking for. VAR.. does not inform the user of needing to give a keyword and directory. There should be a standard word used such as path or p and it should be documented better in the documentation and help.
    • For example vpkeditcli --add-file test.txt completely_random_phrase test_folder -o test_dir is valid usage
  • Users should be able to just pass the full path of an item instead of specifying the path and the file separately.
    • vpkeditcli --add-file my_folder/test.txt -o test
  • When creating a new .vpk file the default behavior should be to add the _dir suffix when --single-file isn't passed as an argument.
  • There is no documentation for the CLI outside of the help command. Please add written documentation in either an .md file or make a GitHub wiki.

sour-dani avatar Nov 17 '24 02:11 sour-dani

Related critiques response

  • The help text for --add-file can be improved, it is lacking
  • The error is a part of the argument parser library I am using and I cannot change it
    • Assuming I haven't forgotten how to use my tool, your sample usage adds test.txt as a subfolder of completely_random_phrase, outputs the VPK to a file named test_dir, using the contents of test_folder. This is intended behavior
  • The file will be added to the root of the VPK in that case. I'd like to prevent unintentional path screwups by making both paths explicit. Use a single forward slash to indicate it should go in the root of the VPK
  • This actually is the default when the user does not specify -o. I can change this behavior for explicit output filenames as well
  • I will not be making separate documentation, if I did it would literally be identical to the help command, because I really don't know what else to write about it

craftablescience avatar Nov 17 '24 05:11 craftablescience

Related critiques response response

The error is a part of the argument parser library I am using and I cannot change it

Shame, thanks for the explanation.

  • Assuming I haven't forgotten how to use my tool, your sample usage adds test.txt as a subfolder of completely_random_phrase, outputs the VPK to a file named test_dir, using the contents of test_folder. This is intended behavior

I forgot that this program is intended for use with a directory and not specific files. That makes sense.

I can change this behavior for explicit output filenames as well

Thanks!

I will not be making separate documentation

Shame.

Unrelated

Any thought on the original subject of the issue?

sour-dani avatar Nov 17 '24 06:11 sour-dani

Original subject of the issue is good, I will probably implement this in a way where the user can either specify a response file or pass a list of file paths

craftablescience avatar Nov 17 '24 19:11 craftablescience

Original subject of the issue is good, I will probably implement this in a way where the user can either specify a response file or pass a list of file paths

Thank you very much! This will be a big help!

sour-dani avatar Nov 18 '24 02:11 sour-dani