Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apple Binary Property List Enhancement: Timestamps #452

Open
dgmcdona opened this issue Oct 7, 2022 · 2 comments
Open

Apple Binary Property List Enhancement: Timestamps #452

dgmcdona opened this issue Oct 7, 2022 · 2 comments

Comments

@dgmcdona
Copy link
Contributor

dgmcdona commented Oct 7, 2022

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?).

@wader wader changed the title Apple Binary Property List Enhancement: TImestamps Apple Binary Property List Enhancement: Timestamps Oct 10, 2022
@dgmcdona
Copy link
Contributor Author

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

@wader
Copy link
Owner

wader commented Dec 17, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants