fleshing out the args and adding stub manpage
This commit is contained in:
parent
5c706f00d6
commit
e27bf0fcbe
24
docs/vaultpass.1.adoc
Normal file
24
docs/vaultpass.1.adoc
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
= vaultpass(1)
|
||||||
|
Brent Saner <r00t@square-r00t.net>
|
||||||
|
|
||||||
|
:doctype: manpage
|
||||||
|
:manmanual: VAULTPASS
|
||||||
|
:mansource: VAULTPASS
|
||||||
|
:man-linkstyle: pass:[blue R < >]
|
||||||
|
|
||||||
|
== Name
|
||||||
|
|
||||||
|
vaultpass - A Vault-backed replacement for Pass
|
||||||
|
|
||||||
|
== Synopsis
|
||||||
|
|
||||||
|
*vaultpass* [_OPERATION_] _OPTIONS_...
|
||||||
|
|
||||||
|
[#operations]
|
||||||
|
== Operations
|
||||||
|
|
||||||
|
See *<<common-options,Common Options>>* for arguments that are available for all operations.
|
||||||
|
|
||||||
|
*cp*::
|
||||||
|
foo
|
||||||
|
// TODO
|
@ -3,10 +3,13 @@ import os
|
|||||||
##
|
##
|
||||||
from . import logger
|
from . import logger
|
||||||
_logger = logging.getLogger('VaultPass')
|
_logger = logging.getLogger('VaultPass')
|
||||||
|
from . import args
|
||||||
from . import auth
|
from . import auth
|
||||||
from . import clipboard
|
from . import clipboard
|
||||||
from . import config
|
from . import config
|
||||||
|
from . import constants
|
||||||
from . import mounts
|
from . import mounts
|
||||||
|
from . import pass_import
|
||||||
|
|
||||||
|
|
||||||
class PassMan(object):
|
class PassMan(object):
|
||||||
|
21
vaultpass/args.py
Normal file
21
vaultpass/args.py
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
import argparse
|
||||||
|
|
||||||
|
|
||||||
|
_opers = ['cp', 'edit', 'find', 'generate', 'git', 'grep', 'help', 'init', 'insert', 'ls', 'mv', 'rm', 'show',
|
||||||
|
'version', 'import'] # "import" is new
|
||||||
|
|
||||||
|
|
||||||
|
def parseArgs():
|
||||||
|
args = argparse.ArgumentParser(description = 'VaultPass - a Vault-backed Pass replacement',
|
||||||
|
prog = 'pass',
|
||||||
|
epilog = ('This program has context-specific help. Try '))
|
||||||
|
commonargs = argparse.ArgumentParser(add_help = False)
|
||||||
|
commonargs.add_argument('-c', '--config',
|
||||||
|
default = '~/.config/vaultpass.xml',
|
||||||
|
help = ('The path to your configuration file. Default: ~/.config/vaultpass.xml'))
|
||||||
|
|
||||||
|
args.add_argument('oper',
|
||||||
|
choices = _opers,
|
||||||
|
help = ('The operation to perform. Use the help operation or see the man page for more '
|
||||||
|
'information'))
|
||||||
|
args.add_argument()
|
1
vaultpass/constants.py
Normal file
1
vaultpass/constants.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
VERSION = '0.0.1'
|
1
vaultpass/pass_import.py
Normal file
1
vaultpass/pass_import.py
Normal file
@ -0,0 +1 @@
|
|||||||
|
import os
|
Reference in New Issue
Block a user