diff --git a/i2p2www/pages/spec/index.html b/i2p2www/pages/spec/index.html index 689b9d5e38d8308fa5ecdab7a6840b61c25f835f..db397f3415ffd4ef27a0210723125731868b2633 100644 --- a/i2p2www/pages/spec/index.html +++ b/i2p2www/pages/spec/index.html @@ -27,6 +27,7 @@ If you find any inaccuracies in the documents linked below, please <table> <tr> <th>Title</th> + <th>Category</th> <th>Last updated</th> <th>Accurate for</th> <th>Link</th> @@ -34,6 +35,7 @@ If you find any inaccuracies in the documents linked below, please {% for spec in specs %} <tr> <td>{{ spec.title }}</td> + <td>{{ spec.category }}</td> <td><time>{{ spec.lastupdated }}</time></td> <td>{{ spec.accuratefor }}</td> <td> diff --git a/i2p2www/spec/common-structures.rst b/i2p2www/spec/common-structures.rst index 3ec8bd0f7b3a0525e107fe23f418b6604a851040..56bbcfe5aa46e4918730ea662fc21c4ecc58a4eb 100644 --- a/i2p2www/spec/common-structures.rst +++ b/i2p2www/spec/common-structures.rst @@ -2,6 +2,7 @@ Common structures Specification =============================== .. meta:: + :category: Design :lastupdated: February 2016 :accuratefor: 0.9.24 diff --git a/i2p2www/spec/cryptography.rst b/i2p2www/spec/cryptography.rst index 651b5a9d1ed8c3d0016bd349f1b378245209a5bc..cf78d0312307350f72abc83f3dd9c015bc40a73e 100644 --- a/i2p2www/spec/cryptography.rst +++ b/i2p2www/spec/cryptography.rst @@ -2,6 +2,7 @@ Low-level Cryptography Specification ==================================== .. meta:: + :category: Design :lastupdated: December 2014 :accuratefor: 0.9.17 diff --git a/i2p2www/spec/datagrams.rst b/i2p2www/spec/datagrams.rst index 6cd2045d4369200c43f8946d641cb3fd09b6ad87..c57e53dc2b734298b5cf4bb23c4e340d5d2b9329 100644 --- a/i2p2www/spec/datagrams.rst +++ b/i2p2www/spec/datagrams.rst @@ -2,6 +2,7 @@ Datagram Specification ====================== .. meta:: + :category: Protocols :lastupdated: July 2014 :accuratefor: 0.9.14 diff --git a/i2p2www/spec/i2cp.rst b/i2p2www/spec/i2cp.rst index e784e809246f29a3d3f4c6e97476435e3dcfc719..9dd9432c8ea6d900659706f2b1c0e5104ca3a7cd 100644 --- a/i2p2www/spec/i2cp.rst +++ b/i2p2www/spec/i2cp.rst @@ -2,6 +2,7 @@ I2CP Specification ================== .. meta:: + :category: Protocols :lastupdated: June 2015 :accuratefor: 0.9.21 diff --git a/i2p2www/spec/i2np.rst b/i2p2www/spec/i2np.rst index 023a5e68f7297e9f8128fd37670105b52a6925e8..5257dc392385c81a97a453653689c02642fe9475 100644 --- a/i2p2www/spec/i2np.rst +++ b/i2p2www/spec/i2np.rst @@ -2,6 +2,7 @@ I2NP Specification ================== .. meta:: + :category: Protocols :lastupdated: January 2016 :accuratefor: 0.9.24 diff --git a/i2p2www/spec/ssu.rst b/i2p2www/spec/ssu.rst index 83d04b91d5cdce4702119afc0604a1e6377e2370..f60d822aec19cc6b649373d6b35f8cf3d4f844dc 100644 --- a/i2p2www/spec/ssu.rst +++ b/i2p2www/spec/ssu.rst @@ -2,6 +2,7 @@ SSU Protocol Specification ========================== .. meta:: + :category: Transports :lastupdated: November 2015 :accuratefor: 0.9.24 diff --git a/i2p2www/spec/streaming.rst b/i2p2www/spec/streaming.rst index 77b82ab5d9ebcd7a22cf4cba6f6e9d4cec6f708b..793290c3d2c6214cafac60709719fbdde452b4cf 100644 --- a/i2p2www/spec/streaming.rst +++ b/i2p2www/spec/streaming.rst @@ -2,6 +2,7 @@ Streaming Library Specification =============================== .. meta:: + :category: Protocols :lastupdated: June 2015 :accuratefor: 0.9.20 diff --git a/i2p2www/spec/tunnel-creation.rst b/i2p2www/spec/tunnel-creation.rst index 7ba79c1ae5fb5e3a256d976799694835e125a65b..d17adf51dcfa3338b8fe9f10b1f01e6e9610a306 100644 --- a/i2p2www/spec/tunnel-creation.rst +++ b/i2p2www/spec/tunnel-creation.rst @@ -2,6 +2,7 @@ Tunnel Creation Specification ============================= .. meta:: + :category: Design :lastupdated: January 2016 :accuratefor: 0.9.24 diff --git a/i2p2www/spec/tunnel-message.rst b/i2p2www/spec/tunnel-message.rst index c53d3345ce450b661dfb5d779af855583cad5ed3..856099cd41cddbf58199fa80c499ddb887bf2cb6 100644 --- a/i2p2www/spec/tunnel-message.rst +++ b/i2p2www/spec/tunnel-message.rst @@ -2,6 +2,7 @@ Tunnel Message Specification ============================ .. meta:: + :category: Design :lastupdated: February 2014 :accuratefor: 0.9.11 diff --git a/i2p2www/spec/views.py b/i2p2www/spec/views.py index 100dd68cb6bc2182fc2a9bcd3b894c59198bbdad..c43f4ddce18a1c70a214558286d6f5ab5bbae9f3 100644 --- a/i2p2www/spec/views.py +++ b/i2p2www/spec/views.py @@ -23,11 +23,18 @@ from i2p2www import helpers SPEC_METATAGS = { 'accuratefor': None, + 'category': '', 'lastupdated': None, } SPEC_LIST_METATAGS = [ ] +SPEC_CATEGORY_SORT = { + 'Design': 1, + 'Transports': 2, + 'Protocols': 3, + '': 999, + } def spec_index(): @@ -52,7 +59,7 @@ def spec_index(): spec.update(meta) specs.append(spec) - specs.sort(key=lambda s: s['name']) + specs.sort(key=lambda s: (SPEC_CATEGORY_SORT[s['category']], s['title'])) return render_template('spec/index.html', specs=specs) def spec_show(name, txt=False): @@ -76,8 +83,9 @@ def spec_show(name, txt=False): # Change highlight formatter content = content.replace('{% highlight', "{% highlight formatter='textspec'") # Other string changes - content = content.replace(' :lastupdated', '- Last updated') content = content.replace(' :accuratefor', '- Accurate for') + content = content.replace(' :category', '- Category') + content = content.replace(' :lastupdated', '- Last updated') # render the post with Jinja2 to handle URLs etc. rendered_content = render_template_string(content)