[Nym3-commit] r322 - in trunk/nymbaron: . Client
jr at conuropsis.org
jr at conuropsis.org
Sat Oct 8 12:24:41 CEST 2005
Author: jr
Date: 2005-10-08 12:24:39 +0200 (Sat, 08 Oct 2005)
New Revision: 322
Modified:
trunk/nymbaron/Client/Account.py
trunk/nymbaron/Client/Main.py
trunk/nymbaron/TODO
Log:
- fix a comment
- add usage strings in the client
Modified: trunk/nymbaron/Client/Account.py
===================================================================
--- trunk/nymbaron/Client/Account.py 2005-10-08 09:12:55 UTC (rev 321)
+++ trunk/nymbaron/Client/Account.py 2005-10-08 10:24:39 UTC (rev 322)
@@ -462,7 +462,7 @@
return copy.deepcopy(self.journal)
def add_syn(self, secring, xnymseq, mid, flag, syn):
- """add a set of syn to the"""
+ """add a syn to the synbox"""
self._decrypt_synbox(secring)
self.synbox[str(xnymseq)] = (mid, flag, syn)
self.synbox_status = "dirty"
Modified: trunk/nymbaron/Client/Main.py
===================================================================
--- trunk/nymbaron/Client/Main.py 2005-10-08 09:12:55 UTC (rev 321)
+++ trunk/nymbaron/Client/Main.py 2005-10-08 10:24:39 UTC (rev 322)
@@ -671,7 +671,10 @@
print usage_string
sys.exit(1)
if args[1] == "create":
- parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron create [options]
+ Create a new account. If a parameter isn't passed as an option it will
+ be asked for interactively.""")
parser.add_option("-s", "--server", action = "store", dest = "server",
help = "Specify the server")
parser.add_option("-u", "--username", action = "store",
@@ -696,7 +699,9 @@
sys.exit(0)
if args[1] == "send":
- parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron send [options]
+ Send an email anonymously.""")
parser.add_option("-n", "--nickname", action = "store",
dest = "nickname", help = "The nickname refering "
"to the account used to send a message")
@@ -712,13 +717,16 @@
sys.exit(0)
if args[1] == "summarize":
- parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron summarize [options]
+ Ask the nymserver to send summaries older than a known summary.""")
parser.add_option("-n", "--nickname", action = "store",
dest = "nickname", help = "The nickname "
"of the account whose summaries to request")
parser.add_option("-m", "--max", action = "store",
dest = "max", help = "Maximum number of summaries"
" to request", type = "int")
+ #TODO indicate the defaults
parser.add_option("-o", "--older", action = "store",
dest = "older", help = "Retrieve only summaries "
"older than msgid")
@@ -729,7 +737,11 @@
sys.exit(0)
if args[1] == "delete":
- parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron delete [options] [ref1 [ref2 [...]]]
+ Ask the server to delete the messages corresponding to the provided
+ references. The references are either mids or syn:N where N is the index
+ provided by the list-syn command.""")
parser.add_option("-n", "--nickname", action = "store",
dest = "nickname", help = "The nickname "
"of the account whose emails to request deletion")
@@ -740,7 +752,11 @@
sys.exit(0)
if args[1] == "get":
- parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron get [options] [ref1 [ref2 [...]]]
+ Ask the server to provide the messages corresponding to the provided
+ references. The references are either mids or syn:N where N is the index
+ provided by the list-syn command.""")
parser.add_option("-n", "--nickname", action = "store",
dest = "nickname", help = "The nickname "
"of the account whose emails to request")
@@ -751,7 +767,9 @@
sys.exit(0)
if args[1] == "send-surb":
- parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron send-surb [options]
+ Send new surbs to the server.""")
parser.add_option("-n", "--nickname", action = "store",
dest = "nickname", help = "The nickname "
"of the account whose surbs to replenish")
@@ -765,7 +783,10 @@
sys.exit(0)
if args[1] == "process":
- parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron process [options]
+ Process an incoming server command message once it has been
+ reconstructed.""")
parser.add_option("-i", "--idtag", action = "store",
dest = "idtag", help = "The idTag contained in the"
"enclosing SURB")
@@ -798,7 +819,9 @@
sys.exit(0)
if args[1] == "list-syn":
- parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron list-syn [options]
+ List the summaries present in the local synbox.""")
parser.add_option("-n", "--nickname", action = "store",
dest = "nickname", help = "The nickname "
"of the account whose synopsis to list")
@@ -809,7 +832,9 @@
sys.exit(0)
if args[1] == "dump-syn":
- parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron dump-syn [options]
+ Output the summaries present in the local synbox.""")
parser.add_option("-n", "--nickname", action = "store",
dest = "nickname", help = "The nickname "
"of the account whose synopsis to dump")
@@ -820,7 +845,9 @@
sys.exit(0)
if args[1] == "list-mbox":
- parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron list-mbox [options]
+ List the messages present in the local mbox.""")
parser.add_option("-n", "--nickname", action = "store",
dest = "nickname", help = "The nickname "
"of the account whose emails to request")
@@ -831,7 +858,9 @@
sys.exit(0)
if args[1] == "list-journal":
- parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron list-journal [options]
+ List the messages sent not acknowledged yet by the server.""")
parser.add_option("-n", "--nickname", action = "store",
dest = "nickname", help = "The nickname "
"of the account whose journal to list")
@@ -842,9 +871,11 @@
sys.exit(0)
if args[1] == "resend-command":
- parser = OptionParser(usage = """A command to resend can be refered
- as journal:N, where N is the index of the command given by
- list-journal""")
+ parser = OptionParser(usage =
+ """nymbaron resend-command [options] [ref1 [ref2 [...]]]
+ Resend a command that was sent to the server but that has not yet been
+ acknowledged. The references are either mids or journal:N where N is the
+ index provided by the list-journal command.""")
parser.add_option("-n", "--nickname", action = "store",
dest = "nickname", help = "The nickname "
"of the account whose emails to request")
@@ -855,7 +886,11 @@
sys.exit(0)
if args[1] == "export":
- parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron export [options] [ref1 [ref2 [...]]]
+ Exports messages present in the local mbox. The references are either
+ mids or mbox:N where N is the index provided by the list-mbox
+ command.""")
parser.add_option("-n", "--nickname", action = "store",
dest = "nickname", help = "The nickname "
"of the account whose emails to request")
@@ -869,7 +904,11 @@
sys.exit(0)
if args[1] == "ldelete":
- parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron ldelete [options] [ref1 [ref2 [...]]]
+ Delete messages present in the local mbox. The references are either
+ mids or mbox:N where N is the index provided by the list-mbox
+ command.""")
parser.add_option("-n", "--nickname", action = "store",
dest = "nickname", help = "The nickname "
"of the account whose emails to request")
@@ -880,7 +919,11 @@
sys.exit(0)
if args[1] == "ldelete-syn":
- parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron ldelete-syn [options] [ref1 [ref2 [...]]]
+ Delete messages present in the local synbox. The references are either
+ mids or syn:N where N is the index provided by the list-syn
+ command.""")
parser.add_option("-n", "--nickname", action = "store",
dest = "nickname", help = "The nickname "
"of the account whose emails to request")
@@ -891,7 +934,10 @@
sys.exit(0)
if args[1] == "mprocess":
- parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron mprocess [options]
+ Process an incoming server command message packet. Try to reassemble a
+ message with this packet and if succesful, process the command.""")
parser.add_option("-f", "--file", action = "store",
dest = "file", help = "The file to read the message"
" from, or stdin if omitted")
@@ -922,19 +968,26 @@
if args[1] == "list-accounts":
#TODO give a verbosity option to this command?
- #parser = OptionParser()
+ parser = OptionParser(usage =
+ """nymbaron list-accounts
+ List the nym acounts of the user.""")
#parser.add_option("-n", "--nickname", action = "store",
# dest = "nickname", help = "The nickname "
# "of the account whose emails to request")
#(options, args) = parser.parse_args(args[2:])
ui = CLI()
config = Config.Config()
+ (options, args) = parser.parse_args(args[2:])
list_accounts(ui, config)
sys.exit(0)
if args[1] == "passwd":
+ parser = OptionParser(usage =
+ """nymbaron passwd
+ Change the private keyring passphrase of the user.""")
ui = CLI()
config = Config.Config()
+ (options, args) = parser.parse_args(args[2:])
passwd(ui, config)
sys.exit(0)
Modified: trunk/nymbaron/TODO
===================================================================
--- trunk/nymbaron/TODO 2005-10-08 09:12:55 UTC (rev 321)
+++ trunk/nymbaron/TODO 2005-10-08 10:24:39 UTC (rev 322)
@@ -8,6 +8,7 @@
D Deferred
X Abandoned
+ - add default values indication in usage strings [client]
- reorder the items of the usage string [client]
- use clean_surbs once in a while [server]
- periodically scan for emails that need to be relayed [server]
More information about the Nym3-commit
mailing list