From: <tre...@us...> - 2009-09-13 17:27:58
|
Revision: 282 http://spd.svn.sourceforge.net/spd/?rev=282&view=rev Author: treibholz Date: 2009-09-13 17:27:49 +0000 (Sun, 13 Sep 2009) Log Message: ----------- implemented the feature, to change the symlink to the political party you like, and SPD changes it's names. Not all parties are implemented yet... Modified Paths: -------------- trunk/src/spd-cli trunk/src/spdCore.py Modified: trunk/src/spd-cli =================================================================== --- trunk/src/spd-cli 2009-09-09 13:10:16 UTC (rev 281) +++ trunk/src/spd-cli 2009-09-13 17:27:49 UTC (rev 282) @@ -24,9 +24,11 @@ import spdCLI from optparse import OptionParser +pp = spdCore.name(sys.argv[0]) + # {{{ OptionParser stuff -parser = OptionParser( "%prog [Optionen] Search", - description = "SPD - Simple Password Displayer", +parser = OptionParser( "%prog [Options] Search", + description = pp.acronym + ' - ' + pp.name, version = "0.3-alpha", epilog = "With no parameters it will print out nothing!") Modified: trunk/src/spdCore.py =================================================================== --- trunk/src/spdCore.py 2009-09-09 13:10:16 UTC (rev 281) +++ trunk/src/spdCore.py 2009-09-13 17:27:49 UTC (rev 282) @@ -414,5 +414,30 @@ # }}} +class name(object): # {{{ + def __init__(self,acronym): + list = { 'spd' : 'Simple Password Displayer', + 'npd' : 'No Password Displayer', + 'piraten' : 'Professional Inspired Random Accessory To Ensure Nobodycanseeyourpasswords', + 'cdu' : 'Cryptical Data Unit', + 'fdp' : 'Fast Display Password', + 'pbc' : 'Passwords Brotected by Cheesus', + 'mlpd' : 'Mean, Lean Password Displayer', + 'rep' : 'Racists Encrypt their Passwords', + 'dvu' : 'Digital Viewing Unit', + 'grüne' : 'Generic Reasonable ÜberNext Encryption', + 'linke' : 'no idea...', + } + + acronym = re.split('/',acronym)[len(re.split('/',acronym))-1] + + # default to spd + if acronym not in list: + acronym = "spd" + + self.acronym = acronym.upper() + self.name = list[acronym] +# }}} + # EOF # vim:foldmethod=marker:tabstop=3:autoindent:shiftwidth=3 This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |