Closed ao2 closed 10 years ago
Hi, ao2. This conversion can be easily done on the command line (with xxd -r -p) and the older wiki page was using it in the examples. Perhaps I shouldn't have removed it when making the README.md version.
However, this might be a convenience feature as people rarely store descriptors in binary.
Will an additional format, perhaps named "hex", do for you?
You will be able to use it like this:
cat descriptor.txt | hidrd-convert -i hex -o code
I agree it is not strictly necessary but it still makes sense to have the feature built in.
'hex' is fine as the format name, thanks.
Antonio, @ao2, could you please check out the latest master and see if the hex format works as you want it to? Thank you.
The output is good, thanks a lot.
Maybe you can consider adding an option to control the line wrapping, but the hex output is usable already as it is.
The input parser seems to be robust enough to parse the "dat" output from gHID too, which has no starting space and no line wrapping (it's just one line of hex bytes separated by spaces).
Thanks again, Antonio
Thanks for testing, Antonio. I'll add an output width control option.
Good, thanks.
Now gHID can even read the output produced by hidrd-convert -o hex --oo width=0
, the leading white space gives no problem.
Great :)!
Hi,
what about adding a new input format to hidrd-convert so that it can read hex dumps of HID descriptors directly?
gHID (https://code.google.com/p/ghid/) calls this format "dat", it would make sense to import it directly considering that it is used in the hidrd-convert documentation too.
Thanks, Antonio