From 1b90aea2f74f18b7a6089928ace07a5362c0fb9d Mon Sep 17 00:00:00 2001 From: Ben Finney Date: Sat, 5 Mar 2016 14:13:54 +1100 Subject: [PATCH] =?utf8?q?Switch=20to=20upstream=20source=20from=20tarball?= =?utf8?q?=20=E2=80=98xkcdpass=5F1.2.4.orig.tar.gz=E2=80=99.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- LICENSE.BSD | 5 +-- setup.py | 2 +- xkcdpass/xkcd_password.py | 82 +++++++++++++++++++++++++++++------------------ 3 files changed, 54 insertions(+), 35 deletions(-) diff --git a/LICENSE.BSD b/LICENSE.BSD index 37adedc..baf2a41 100644 --- a/LICENSE.BSD +++ b/LICENSE.BSD @@ -1,4 +1,4 @@ -Copyright (c) 2011 - 2014, Steven Tobin and Contributors. +Copyright (c) 2011 - 2015, Steven Tobin and Contributors. All rights reserved. Contributors: Steven Tobin, @@ -8,7 +8,8 @@ Contributors: Steven Tobin, Kim Slawson , Stanislav Bytsko , Lowe Thiderman , - Daniil Baturin + Daniil Baturin , + Ben Finney Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: diff --git a/setup.py b/setup.py index 92a31ac..72d119e 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import setup setup( name='xkcdpass', - version='1.2.3', + version='1.2.4', author='Steven Tobin', author_email='steventtobin@gmail.com', url='https://github.com/redacted/XKCD-password-generator', diff --git a/xkcdpass/xkcd_password.py b/xkcdpass/xkcd_password.py index 5194a19..4f40158 100755 --- a/xkcdpass/xkcd_password.py +++ b/xkcdpass/xkcd_password.py @@ -9,7 +9,7 @@ import math import sys __LICENSE__ = """ -Copyright (c) 2011 - 2014, Steven Tobin and Contributors. +Copyright (c) 2011 - 2015, Steven Tobin and Contributors. All rights reserved. Contributors: Steven Tobin, @@ -19,7 +19,8 @@ Contributors: Steven Tobin, Kim Slawson , Stanislav Bytsko , Lowe Thiderman , - Daniil Baturin + Daniil Baturin , + Ben Finney Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: @@ -252,36 +253,53 @@ def main(): usage = "usage: %prog [options]" parser = optparse.OptionParser(usage) - parser.add_option("-w", "--wordfile", dest="wordfile", - default=None, - help="List of valid words for password") - parser.add_option("--min", dest="min_length", - default=5, type="int", - help="Minimum length of words to make password") - parser.add_option("--max", dest="max_length", - default=9, type="int", - help="Maximum length of words to make password") - parser.add_option("-n", "--numwords", dest="numwords", - default=6, type="int", - help="Number of words to make password") - parser.add_option("-i", "--interactive", dest="interactive", - default=False, action="store_true", - help="Interactively select a password") - parser.add_option("-v", "--valid_chars", dest="valid_chars", - default='.', - help="Valid chars, using regexp style (e.g. '[a-z]')") - parser.add_option("-V", "--verbose", dest="verbose", - default=False, action="store_true", - help="Report various metrics for given options") - parser.add_option("-a", "--acrostic", dest="acrostic", - default=False, - help="Acrostic to constrain word choices") - parser.add_option("-c", "--count", dest="count", - default=1, type="int", - help="number of passwords to generate") - parser.add_option("-d", "--delimiter", dest="delim", - default=" ", - help="separator character between words") + parser.add_option( + "-w", "--wordfile", + dest="wordfile", default=None, metavar="WORDFILE", + help=( + "Specify that the file WORDFILE contains" + " the list of valid words from which to generate passphrases.")) + parser.add_option( + "--min", + dest="min_length", type="int", default=5, metavar="MIN_LENGTH", + help="Generate passphrases containing at least MIN_LENGTH words.") + parser.add_option( + "--max", + dest="max_length", type="int", default=9, metavar="MAX_LENGTH", + help="Generate passphrases containing at most MAX_LENGTH words.") + parser.add_option( + "-n", "--numwords", + dest="numwords", type="int", default=6, metavar="NUM_WORDS", + help="Generate passphrases containing exactly NUM_WORDS words.") + parser.add_option( + "-i", "--interactive", + action="store_true", dest="interactive", default=False, + help=( + "Generate and output a passphrase," + " query the user to accept it," + " and loop until one is accepted.")) + parser.add_option( + "-v", "--valid_chars", + dest="valid_chars", default=".", metavar="VALID_CHARS", + help=( + "Limit passphrases to only include words matching" + " the regex pattern VALID_CHARS (e.g. '[a-z]').")) + parser.add_option( + "-V", "--verbose", + action="store_true", dest="verbose", default=False, + help="Report various metrics for given options.") + parser.add_option( + "-a", "--acrostic", + dest="acrostic", default=False, + help="Generate passphrases with an acrostic matching ACROSTIC.") + parser.add_option( + "-c", "--count", + dest="count", type="int", default=1, metavar="COUNT", + help="Generate COUNT passphrases.") + parser.add_option( + "-d", "--delimiter", + dest="delim", default=" ", metavar="DELIM", + help="Separate words within a passphrase with DELIM.") (options, args) = parser.parse_args() validate_options(parser, options, args) -- 2.11.4.GIT