-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Add support for YAML metadata parsing #114
Conversation
This allows loading a specfied key from a as yaml formatted metadata part of a secret. Example: secret yaml-example: password yaml: rocks foo: bar usage: gopass show yaml-example -k foo # => bar
Thanks a lot for the PR. At first sight this looks like going into the right direction, but still lacking a lot in terms of UX. Will give this some more thought / comments soon. |
thanks, looking forward to your thoughts. |
8eef452
to
4857b8a
Compare
Thanks to @bumi / gopasspw#114 for some inspiration.
Closing in favour of #125 Thank you very much for this PR. If this was your first attempt in Go it's definitely very good. We wanted to some things a little different and also include write support so I thought it would be easier if we just pick your approach and implement it directly. |
Thanks to @bumi / gopasspw#114 for some inspiration.
whooot! awesome! will check it out. thanks! |
Thanks to @bumi / gopasspw#114 for some inspiration.
Thanks to @bumi / gopasspw#114 for some inspiration.
This allows loading a specified key from a as yaml formatted metadata part of a secret. (related issue: #112 )
Usage:
assuming the following secret:
Display the value of a specified key:
Copy the value of a specified key:
When the
-k/--key
option is given the first line (the password) of a secret will be ignored and the rest will be loaded using simpleyaml. The--clip
and--qr
flags are still supported and the value the--key
will be used.Editing the metadata part is currently not supported. In my usecase editing would mostly be manual and yaml is easy enough to write. So I don't think that this is super important.
I am opening this PR for discussion on how this feature should be implemented.
This is my first piece of go code that I am writing... so I don't really know what I am doing yet :)
ToDo: