fq icon indicating copy to clipboard operation
fq copied to clipboard

Apple Binary Property List Enhancement: Timestamps

Open dgmcdona opened this issue 2 years ago • 2 comments

Per @wader 's comment in the original PR, it would be nice to add an option for bplist decoding to display time values as timestamps instead of just CocoaDate floating point values in torepr/tovalue representations (and maybe elsewhere?).

dgmcdona avatar Oct 07 '22 05:10 dgmcdona

Is there guidance or a good reference commit somewhere that shows how to add decode options for specific formats?

dgmcdona avatar Dec 17 '22 08:12 dgmcdona

Not at the moment, should add something. But it should no more than add a *In struct to format.go with "doc" struct field tags, there is also *Out struct:s for decoder who output, not that common. Then in the decoders decode.Format struct fill in the DecodeInArg field with default values and add a type assert for the in arg in the decode function, hope that is all. Maybe mp3.go is a good example. After that the rest of fq's code should take care of help texts and make it possible pass the option in a object to the decode function (key as snake_case).

About what to name the options there no conventions yet, try come up with something an will see how it feels.

wader avatar Dec 17 '22 10:12 wader