NAME
App::Raps2 - A Password safe
SYNOPSIS
use App::Raps2;
my $raps2 = App::Raps2->new();
my ($action, @args) = @ARGV;
$raps2->sanity_check();
$raps2->load_config();
given ($action) {
when ('add') { $raps2->cmd_add(@args) }
when ('dump') { $raps2->cmd_dump(@args) }
when ('get') { $raps2->cmd_get(@args) }
when ('info') { $raps2->cmd_info(@args) }
}
DESCRIPTION
App::Raps2 is the backend for raps2, a simple commandline password safe.
VERSION
This manual documents App::Raps2 version 0.4
METHODS
- $raps2 = App::Raps2->new(%conf)
-
Returns a new App::Raps2 object.
Accepted configuration parameters are:
- $raps2->file_to_hash($file)
-
Reads $file (lines with key/value separated by whitespace) and returns a hash with its key/value pairs.
- $raps2->get_master_password()
-
Asks the user for the master passphrase.
- $raps2->pw_add(%data)
-
Write an account as specified by data to the store. Requires get_master_password to have been called before.
The following data keys are possible:
- $raps2->pw_get(file => file | name => name)
-
Loads a password from file (or account name), requires get_master_password to have been called before. Returns a hashref containing its url, login and decrypted password and extra.
INTERNAL
You usually don't need to call these methods by yourself.
- $raps2->sanity_check()
-
Create working directories (~/.config/raps2 and ~/.local/share/raps2, or the respective XDG environment variable contents), if they don't exist yet. Automatically called by new.
Calls create_config if no raps2 config was found.
- $raps2->create_config()
-
Creates a default config and asks the user to set a master password.
- $raps2->load_config()
-
Load config. Automatically called by new.
- $raps2->pw()
-
Returns the App::Raps2::Password(3pm) object.
- $raps2->ui()
-
Returns the App::Raps2::UI(3pm) object.
- $raps2->cmd_add($name)
-
Adds a new password file called $name.
- $raps2->cmd_dump($account)
-
Dumps the content of account
- $raps2->cmd_edit($acount)
-
Edit account.
- $raps2->cmd_get($name)
-
Puts the password saved in $name into the X clipboard.
- $raps2->cmd_info($name)
-
Prints unencrypted information about $name.
- $raps2->cmd_list()
-
Lists all saved passwords and their logins and urls
- $raps2->cmd_remove($name)
-
Remove (unlink) the account name.
DIAGNOSTICS
If anything goes wrong, App::Raps2 will die with a backtrace (using confess from Carp(3pm)).
DEPENDENCIES
App::Raps2::Password(3pm), App::Raps2::UI(3pm), File::BaseDir(3pm), File::Slurp(3pm).
BUGS AND LIMITATIONS
Be aware that the password handling API is not yet stable.
AUTHOR
Copyright (C) 2011 by Daniel Friesel <derf@finalrewind.org>
LICENSE
0. You just DO WHAT THE FUCK YOU WANT TO.