(Steve Dougherty)
2013-06-25: Add terminology documentation; begin to conform. Add terminology documentation; begin to conform.
diff --git a/infocalypse/devnotes.txt b/infocalypse/devnotes.txt --- a/infocalypse/devnotes.txt +++ b/infocalypse/devnotes.txt @@ -1,3 +1,22 @@ +------------------------------------------------------------ +Terminology: +------------------------------------------------------------ + +WoT - + Web of Trust. May refer to the plugin of the same name or compatible + alternative plugins like LCWoT - Less Crappy Web of Trust. +WoT identifier - + Web of Trust identifier. This is MyNickname@public-key-hash. + Often abbreviated "wot_id". Not to be confused with a WoT + identity. +WoT identity - + name given to the public key hash when returned by WoT. + Can also refer to a dictionary containing the Identity and + other attributes such as a request URI and contexts. + +------------------------------------------------------------ +Dev log: +------------------------------------------------------------ !!! experimental branch for testing wiki over hg idea !!! See (note updated uri) reenet:USK@Gq-FBhpgvr11VGpapG~y0rGFOAHVfzyW1WoKGwK-fFw,MpzFUh5Rmw6N~aMKwm9h2Uk~6aTRhYaY0shXVotgBUc,AQACAAE/fniki/-22/ diff --git a/infocalypse/wot.py b/infocalypse/wot.py --- a/infocalypse/wot.py +++ b/infocalypse/wot.py @@ -165,7 +165,7 @@ def execute_setup_freemail(ui, wot_ident ui.status("Password set.\n") -def resolve_local_identity(ui, identity): +def resolve_local_identity(ui, wot_identifier): """ Mercurial ui for error messages. @@ -173,7 +173,7 @@ def resolve_local_identity(ui, identity) and identity that match the given criteria. In the case of an error prints a message and returns None. """ - nickname_prefix, key_prefix = parse_name(identity) + nickname_prefix, key_prefix = parse_name(wot_identifier) node = fcp.FCPNode() response = \ @@ -213,11 +213,11 @@ def resolve_local_identity(ui, identity) del matches[key] if len(matches) > 1: - ui.warn("'{0}' is ambiguous.\n".format(identity)) + ui.warn("'{0}' is ambiguous.\n".format(wot_identifier)) return if len(matches) == 0: - ui.warn("No local identities match '{0}'.\n".format(identity)) + ui.warn("No local identities match '{0}'.\n".format(wot_identifier)) return assert len(matches) == 1 @@ -229,7 +229,7 @@ def resolve_local_identity(ui, identity) return read_local_identity(response, id_num) -def resolve_identity(ui, truster, identity): +def resolve_identity(ui, truster, wot_identifier): """ If using LCWoT, either the nickname prefix should be enough to be unambiguous, or failing that enough of the key. @@ -242,10 +242,10 @@ def resolve_identity(ui, truster, identi :param ui: Mercurial ui for error messages. :param truster: Check trust list of this local identity. - :param identity: Nickname and key, delimited by @. Either half can be + :param wot_identifier: Nickname and key, delimited by @. Either half can be omitted. """ - nickname_prefix, key_prefix = parse_name(identity) + nickname_prefix, key_prefix = parse_name(wot_identifier) # TODO: Support different FCP IP / port. node = fcp.FCPNode() @@ -278,12 +278,12 @@ def resolve_identity(ui, truster, identi elif response['Replies.Message'] == 'Identities': matches = response['Replies.IdentitiesMatched'] if matches == 0: - ui.warn("No identities match '{0}'\n".format(identity)) + ui.warn("No identities match '{0}'\n".format(wot_identifier)) return elif matches == 1: return read_identity(response, 0) else: - ui.warn("'{0}' is ambiguous.\n".format(identity)) + ui.warn("'{0}' is ambiguous.\n".format(wot_identifier)) return # Partial matching not supported, or unknown truster. The only difference @@ -301,7 +301,7 @@ def resolve_identity(ui, truster, identi if response['Replies.Message'] == 'Error': # Searching by exact public key hash, not matching. - ui.warn("No such identity '{0}'.\n".format(identity)) + ui.warn("No such identity '{0}'.\n".format(wot_identifier)) return # There should be only one result. @@ -346,14 +346,14 @@ def read_identity(message, id_num): return result -def parse_name(identity): +def parse_name(wot_identifier): """ - Parse identity of the forms: nick - nick@key - @key - Return nick, key. If a part is not given return an empty string. + Parse identifier of the forms: nick + nick@key + @key + Return nick, key. If a part is not given return an empty string for it. """ - split = identity.split('@', 1) + split = wot_identifier.split('@', 1) nickname_prefix = split[0] key_prefix = ''