-#! /usr/bin/python2.2
+#! /usr/bin/python
# -*-python-*-
import catacomb as C
from sys import argv, exit, stdin, stdout, stderr
from getopt import getopt, GetoptError
from fnmatch import fnmatch
-import sre as re
+import re
prog = re.sub(r'^.*[/\\]', '', argv[0])
def moan(msg):
k = db.nextkey(k)
commands = { 'create': [cmd_create,
- '[-c CIPHER] [-h HASH] [-m MAC] [PP-TAG]'],
- 'find' : [cmd_find, 'LABEL'],
- 'store' : [cmd_store, 'LABEL [VALUE]'],
- 'list' : [cmd_list, '[GLOB-PATTERN]'],
- 'changepp' : [cmd_changepp, ''],
- 'copy' : [cmd_copy, 'DEST-FILE [GLOB-PATTERN]'],
- 'to-pixie' : [cmd_topixie, '[TAG [PIXIE-TAG]]'],
- 'delete' : [cmd_del, 'TAG'],
- 'dump' : [cmd_dump, '']}
+ '[-c CIPHER] [-h HASH] [-m MAC] [PP-TAG]'],
+ 'find' : [cmd_find, 'LABEL'],
+ 'store' : [cmd_store, 'LABEL [VALUE]'],
+ 'list' : [cmd_list, '[GLOB-PATTERN]'],
+ 'changepp' : [cmd_changepp, ''],
+ 'copy' : [cmd_copy, 'DEST-FILE [GLOB-PATTERN]'],
+ 'to-pixie' : [cmd_topixie, '[TAG [PIXIE-TAG]]'],
+ 'delete' : [cmd_del, 'TAG'],
+ 'dump' : [cmd_dump, '']}
def version():
print '%s 1.0.0' % prog
def help():
version()
print
- usage(stdout)
+ usage(stdout)
print '''
Maintains passwords or other short secrets securely.
try:
opts, argv = getopt(argv[1:],
- 'hvuf:',
- ['help', 'version', 'usage', 'file='])
+ 'hvuf:',
+ ['help', 'version', 'usage', 'file='])
except GetoptError:
usage(stderr)
exit(1)