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

Add support for YAML metadata parsing #114

Closed
wants to merge 2 commits into from
Closed

Add support for YAML metadata parsing #114

wants to merge 2 commits into from

Conversation

bumi
Copy link

@bumi bumi commented May 22, 2017

This allows loading a specified key from a as yaml formatted metadata part of a secret. (related issue: #112 )

Usage:

assuming the following secret:

password

yaml: mammal
name: Johne Doe

Display the value of a specified key:

gopass show yaml-example --key [yaml key]

Copy the value of a specified key:

gopass show yaml-example -k [yaml key] -c 

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:

  • support any type of value in the YAML (currently strings are assumed)

bumi added 2 commits May 22, 2017 21:19
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
@dominikschulz
Copy link
Member

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.

@dominikschulz dominikschulz self-requested a review May 24, 2017 15:33
@dominikschulz dominikschulz added the feature Enhancements and new features label May 24, 2017
@bumi
Copy link
Author

bumi commented May 24, 2017

thanks, looking forward to your thoughts.

@dominikschulz dominikschulz force-pushed the master branch 2 times, most recently from 8eef452 to 4857b8a Compare May 31, 2017 13:27
dominikschulz added a commit to dominikschulz/gopass that referenced this pull request Jun 13, 2017
Thanks to @bumi / gopasspw#114 for some inspiration.
@dominikschulz
Copy link
Member

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.

dominikschulz added a commit to dominikschulz/gopass that referenced this pull request Jun 13, 2017
Thanks to @bumi / gopasspw#114 for some inspiration.
@bumi
Copy link
Author

bumi commented Jun 13, 2017

whooot! awesome! will check it out. thanks!

dominikschulz added a commit to dominikschulz/gopass that referenced this pull request Jun 14, 2017
Thanks to @bumi / gopasspw#114 for some inspiration.
dominikschulz added a commit to dominikschulz/gopass that referenced this pull request Jun 14, 2017
Thanks to @bumi / gopasspw#114 for some inspiration.
dominikschulz added a commit that referenced this pull request Jun 14, 2017
Thanks to @bumi / #114 for some inspiration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Enhancements and new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants