Keybox is a set of command line applications and ruby libraries for
secure password storage and password generation.
Nice, but it looks terrible on my whiteish terminal. Is there an easy
way to change the colors?
Not from a user-configurable standpoint. But its a great idea so I’ll
put it on the feature tracker. Hmm… that could make a good separate
library on its own. I may have to do that.
You don’t have to
Oh, i didn’t quite understand the question. You should definitely use
Highline for coloring, unless you have needs it does not cover. I
don’t know how James would feel, but honestly, I think it’d be a great
idea to introduce a ‘color profile’ configuration you can load into
HighLine that’d allow for you to set names like:
Highline.color_profile do |c|
c.main_color “cyan”
c.alert_color “red”
end
or maybe
Highline.color_profile(“colors.yaml”)
So if you’re in a library writing mood, maybe you can just give us a
patch that does that?
I imagine this would be super easy to implement, and would be great
for letting users easily tweak their configs.
On Mon, Jan 15, 2007 at 04:45:48PM +0900, Bonh?te Andr? wrote:
Nice, but it looks terrible on my whiteish terminal. Is there an easy
way to change the colors?
Not from a user-configurable standpoint. But its a great idea so I’ll
put it on the feature tracker. Hmm… that could make a good separate
library on its own. I may have to do that.
If you can wait a week or so I can find some time to make
userconfigurable colors available.
In the meantime, all the colors are configured from the file
lib/keybox/term_io.rb. You could change the color in there, just change
the values on the value side of the COLORS hash and probably make the
default to not be bold in the ‘colorize’ method.
I have a patch submitted to add a --no-color option already, and I’ll
probably incorporate that too.
I’m just please that people find it useful enough to tell me whats
missing so I can make it better :-).
If you can wait a week or so I can find some time to make
userconfigurable colors available.
Sure I have set my Terminal.app to white on black for the time
being.
In the meantime, all the colors are configured from the file
lib/keybox/term_io.rb. You could change the color in there, just
change
the values on the value side of the COLORS hash and probably make the
default to not be bold in the ‘colorize’ method.
Yeah, found that one.
I’m just please that people find it useful enough to tell me whats
missing so I can make it better :-).
I do. I’m transferring all the passes from my pgp-encrypted file to
keybox right now.
Two other feature requests:
Put a timestamp to each entry, maybe even editable. Like this, you
could filter out old and possibly outdated passwords
Keybox is a set of command line applications and ruby libraries for
secure password storage and password generation.
Neat. you may want to look at Highline for OS independent password entry.
I considered using Highline and even looked at how it handled stty
for inspiration. But one of the goals I wanted for this was to not
depend on any gems so that it could be installed on USB drives or other
portable storage device. And so its only requirement for daily usage
would be ruby.
But maybe that’s thinking too much. I could easily take out the
prompting and replace it with Highline.
Although that just brings up another issue. What’s the best way to have
your personal stash of ruby gems or installation or something on a USB
drive or something like that and make it easily usable from any machine
that has ruby installed on it.
Or for that matter, having different ruby’s for different platforms all
installed on a portable drive so you can plug it into any machine and
use all your pure ruby stuff ?
Nice, but it looks terrible on my whiteish terminal. Is there an easy
way to change the colors?
Not from a user-configurable standpoint. But its a great idea so I’ll
put it on the feature tracker. Hmm… that could make a good separate
library on its own. I may have to do that.
You don’t have to
require “highline/import”
Supported color sequences.
colors = %w{black red green yellow blue magenta cyan white}
Using color() with symbols.
colors.each_with_index do |c, i|
say(“This should be <%= color(‘#{c}’, :#{c}) %>!”)
if i == 0
say( "This should be " +
“<%= color(‘white on #{c}’, :white, :on_#{c}) %>!”)
else
say( "This should be " +
“<%= color( ‘#{colors[i - 1]} on #{c}’,
:#{colors[i - 1]}, :on_#{c} ) %>!”)
end
end
Using color with constants.
say(“This should be <%= color(‘bold’, BOLD) %>!”)
say(“This should be <%= color(‘underlined’, UNDERLINE) %>!”)
Using constants only.
say(“This might even <%= BLINK %>blink<%= CLEAR %>!”)
It even works with list wrapping.
erb_digits = %w{Zero One T. Three Four} +
[“<%= color(‘Five’, :blue) %%>”] +
%w{Six Seven Eight Nine}
say(“<%= list(#{erb_digits.inspect}, :columns_down, 3) %>”)
I’m in the library writing mood. Let me see what pops out.
Cool! If you’d like to submit a patch send it to james
grayproductions net
but CC me as well. (I’m a committer, but james has the final say on
what goes in)
On Tue, Jan 16, 2007 at 12:20:16PM +0900, Gregory B. wrote:
c.alert_color “red”
end
or maybe
Highline.color_profile(“colors.yaml”)
So if you’re in a library writing mood, maybe you can just give us a
patch that does that?
I imagine this would be super easy to implement, and would be great
for letting users easily tweak their configs.
Yeah, something along those lines. I’ll give it some thought and see
what I can come up with and contribute it to Highline. The application
colour profile, registers “types” of color, main, alert, warning etc and
then those can be overwritten by a user by loading a different profile
or something along those lines.
I’m in the library writing mood. Let me see what pops out.
On Tue, Jan 16, 2007 at 04:05:54PM +0900, Bonh?te Andr? wrote:
I’m just please that people find it useful enough to tell me whats
missing so I can make it better :-).
I do. I’m transferring all the passes from my pgp-encrypted file to
keybox right now.
Yeah, a convert!. Are you able to take advantage of --import-from-csv ?
Two other feature requests:
Put a timestamp to each entry, maybe even editable. Like this, you
could filter out old and possibly outdated passwords
The underlying data storage already records the creation, modification
and access times of every record, I’m just not printing that information
out right now.
A future enhancement would be to allow for warnings of expiring
passwords or notification that some password may not be used any more,
etc.
Offer a way to find duplicates
Good suggestions, I don’t think I can promise these quite yet. But I’ll
put them on the list.
I considered using Highline and even looked at how it handled stty
for inspiration. But one of the goals I wanted for this was to not
depend on any gems so that it could be installed on USB drives or other
portable storage device. And so its only requirement for daily usage
would be ruby.
Just vendor HighLine with your tool. It’s only like, 3 or 4 files,
and since we’ve got it pretty well stabilized it should be solid and
not need to be updated any time soon…
On Tue, Jan 16, 2007 at 03:25:43AM +0900, Gregory B. wrote:
Neat. you may want to look at Highline for OS independent password entry.
not need to be updated any time soon…
I don’t know why I didn’t think of that. Sounds good, I should
probably do it.
You can probably expect another release of keybox after next weekend
then.
enjoy,
-jeremy
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.