diff --git a/generate-index.py b/generate-index.py index b13c586..ed6d5a3 100755 --- a/generate-index.py +++ b/generate-index.py @@ -105,11 +105,15 @@ def readIssuer(path): } issuer['identifier'] = '%s.%s' % (issuer['schememgr'], issuer['id']) - for fn in sorted(os.listdir(path + '/Issues')): - issuer['credentials'][fn] = readCredential(path + '/Issues/' + fn) + for filename in sorted(os.listdir(path + '/Issues')): + issuer['credentials'][filename] = readCredential(path + '/Issues/' + filename) return issuer +def get_issuer_name(issuer_tuple): + filename, issuer = issuer_tuple + return issuer['name']['en'] + def readSchemeManager(path): schememgr = {} @@ -139,11 +143,16 @@ def readSchemeManager(path): keyshareAttributeElements = xml.getElementsByTagName('KeyshareAttribute') if keyshareAttributeElements: schememgr['keyshareAttribute'] = getText(keyshareAttributeElements[0]) - - for fn in sorted(os.listdir(path)): - issuerPath = path + '/' + fn + issuer_list = [] + for filename in sorted(os.listdir(path)): + issuerPath = path + '/' + filename if os.path.exists(issuerPath + '/description.xml'): - schememgr['issuers'][fn] = readIssuer(issuerPath) + issuer= readIssuer(issuerPath) + issuer_list.append((filename, issuer)) + sorted_issuers=sorted(issuer_list, key=get_issuer_name) + + for filename, issuer in sorted_issuers: + schememgr['issuers'][filename]= issuer return schememgr diff --git a/style.css b/style.css index 444c66b..990660c 100644 --- a/style.css +++ b/style.css @@ -111,7 +111,7 @@ h1,h2,h3 { } a { - color: #360c1d; + color: #3869d1; text-decoration: none; } diff --git a/templates/base.html b/templates/base.html index bc1e4a7..c83bffd 100644 --- a/templates/base.html +++ b/templates/base.html @@ -93,7 +93,7 @@