ui Package

ui Package

baseui Module

class pwman.ui.baseui.AliasesMixin

Define all the alias you want here…

do_EOF(args)
do_cp(args)
do_e(args)
do_h(arg)
do_l(args)
do_ls(args)
do_n(arg)
do_o(args)
do_p(arg)
do_rm(arg)
class pwman.ui.baseui.BaseCommands
do_EOF(args)
do_cls(args)

clear the screen

do_copy(args)

copy item to clipboard. Accepts an id or u:<URL substring>

do_delete(args)
do_edit(args, menu=None)
do_exit(args)

close the text console

do_export(args)

export the database to a given format

do_forget(args)

drop saved key forcing the user to re-enter the master password

do_info(args)
do_list(args)

list all existing nodes in database

do_new(args)
do_open(args)
do_passwd(args)

change the master password of the database

do_pp(args)

print the password only

do_print(args)
do_tags(args)

print all existing tags

error(exception)
class pwman.ui.baseui.BaseUtilsMixin

Helper class for storing all privates, useful for testing these methods directly

class pwman.ui.baseui.HelpUIMixin

this class holds all the UI help functionality. in PwmanCliNew. The later inherits from this class and allows it to print help messages to the console.

help_cls()
help_copy()
help_delete()
help_edit()
help_exit()
help_export()
help_forget()
help_help()
help_info()
help_list()
help_new()
help_open()
help_passwd()
help_print()
help_tags()

cli Module

class pwman.ui.cli.PwmanCli(db, hasxsel, callback, config_parser, **kwargs)

Inherit from the BaseCommands and Aliases

undoc_header = 'Aliases:'
pwman.ui.cli.check_version(version, client_info)
pwman.ui.cli.get_ui_platform(platform)
pwman.ui.cli.main()

mac Module

class pwman.ui.mac.PwmanCliMac(db, hasxsel, callback, config_parser, **kwargs)

inherit from PwmanCli, override the right functions…

do_copy(args)

copy item to clipboard. Accepts an id or u:<URL substring>

tools Module

Define the CLI interface for pwman3 and the helper functions

class pwman.ui.tools.ANSI

ANSI Colors

Black = 30
Blue = 34
Bold = 1
Cyan = 36
Green = 32
Magenta = 35
Red = 31
Reset = 0
Underscore = 2
White = 37
Yellow = 33
class pwman.ui.tools.CLICallback
getinput(question)

Return text

getnewsecret(question)
getsecret(question)

Return key

class pwman.ui.tools.CMDLoop(config)

The menu that drives editing of a node

add(item)
run(new_node=None, reader=<built-in function input>)
class pwman.ui.tools.CliMenuItem(name, getter)
pwman.ui.tools.get_or_create_pass()
pwman.ui.tools.getinput(question, default='', reader=<built-in function input>, completer=None, width=10, drop='drop')

http://stackoverflow.com/questions/2617057/ supply-inputs-to-python-unittests

pwman.ui.tools.open_url(link, macosx=False)

launch xdg-open or open in MacOSX with url

pwman.ui.tools.set_selection(new_node, items, selection, reader)
pwman.ui.tools.text_to_clipboards(text)

copy text to clipboard credit: https://pythonadventures.wordpress.com/tag/xclip/

pwman.ui.tools.text_to_mcclipboard(text)

copy text to mac os x clip board credit: https://pythonadventures.wordpress.com/tag/xclip/

pwman.ui.tools.typeset(text, color, bold=False, underline=False, has_colorama=True)

print colored strings using colorama

win Module

Windows UI components

class pwman.ui.win.PwmanCliWin(db, hasxsel, callback, config_parser, **kwargs)

windows ui class

do_cls(args)

clear the screen

do_copy(args)

copy item to clipboard. Accepts an id or u:<URL substring>

do_print(args)
pwman.ui.win.heardEnterWin()
pwman.ui.win.winGetClipboard()
pwman.ui.win.winSetClipboard(text)