Description
Hi :)
As mentioned in #59, it would be useful if xoreos-tools had a straightforward RIM/ERF/MOD packer/unpacker that had the following features (given a particular archive):
- Add/replace/remove a file in the archive based on binary/xml input (only binary output is sufficient if FEATURE: Make more tools read stdin for input #59 is implemented as then piping can be used, though an xml output would probably be straightforward and useful either way)
- Get a file from the archive in binary/xml format (with same caveat as above)
- Unpack the archive into files, and vice versa
Most of these features are already available in different xoreos-tools executables; the difficult part would probably be the first part (add/replace/remove a file). I imagine the command-line might look like:
command_name {--get/--add/--replace/--remove/--unpack/--pack} {--erf/--rim/...} {--kotor, --kotor2, ...} {--inplace/--newfile} --input infile --output outfile
If infile isn't given, read from stdin; if outfile isn't given, write to stdout (so -i and -o flags are necessary as it can't rely on positioning alone).
I feel pretty bad that I keep asking for new features but don't contribute to the project, so I'm wondering whether I might take this opportunity (if you're open to it) to contribute this feature myself (once #59 is dealt with, as the binary reading will rely on that).