forked from I2P_Developers/i2p.www
Categorise specifications
This commit is contained in:
@@ -27,6 +27,7 @@ If you find any inaccuracies in the documents linked below, please
|
|||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Title</th>
|
<th>Title</th>
|
||||||
|
<th>Category</th>
|
||||||
<th>Last updated</th>
|
<th>Last updated</th>
|
||||||
<th>Accurate for</th>
|
<th>Accurate for</th>
|
||||||
<th>Link</th>
|
<th>Link</th>
|
||||||
@@ -34,6 +35,7 @@ If you find any inaccuracies in the documents linked below, please
|
|||||||
{% for spec in specs %}
|
{% for spec in specs %}
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{ spec.title }}</td>
|
<td>{{ spec.title }}</td>
|
||||||
|
<td>{{ spec.category }}</td>
|
||||||
<td><time>{{ spec.lastupdated }}</time></td>
|
<td><time>{{ spec.lastupdated }}</time></td>
|
||||||
<td>{{ spec.accuratefor }}</td>
|
<td>{{ spec.accuratefor }}</td>
|
||||||
<td>
|
<td>
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
Common structures Specification
|
Common structures Specification
|
||||||
===============================
|
===============================
|
||||||
.. meta::
|
.. meta::
|
||||||
|
:category: Design
|
||||||
:lastupdated: February 2016
|
:lastupdated: February 2016
|
||||||
:accuratefor: 0.9.24
|
:accuratefor: 0.9.24
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
Low-level Cryptography Specification
|
Low-level Cryptography Specification
|
||||||
====================================
|
====================================
|
||||||
.. meta::
|
.. meta::
|
||||||
|
:category: Design
|
||||||
:lastupdated: December 2014
|
:lastupdated: December 2014
|
||||||
:accuratefor: 0.9.17
|
:accuratefor: 0.9.17
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
Datagram Specification
|
Datagram Specification
|
||||||
======================
|
======================
|
||||||
.. meta::
|
.. meta::
|
||||||
|
:category: Protocols
|
||||||
:lastupdated: July 2014
|
:lastupdated: July 2014
|
||||||
:accuratefor: 0.9.14
|
:accuratefor: 0.9.14
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
I2CP Specification
|
I2CP Specification
|
||||||
==================
|
==================
|
||||||
.. meta::
|
.. meta::
|
||||||
|
:category: Protocols
|
||||||
:lastupdated: June 2015
|
:lastupdated: June 2015
|
||||||
:accuratefor: 0.9.21
|
:accuratefor: 0.9.21
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
I2NP Specification
|
I2NP Specification
|
||||||
==================
|
==================
|
||||||
.. meta::
|
.. meta::
|
||||||
|
:category: Protocols
|
||||||
:lastupdated: January 2016
|
:lastupdated: January 2016
|
||||||
:accuratefor: 0.9.24
|
:accuratefor: 0.9.24
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
SSU Protocol Specification
|
SSU Protocol Specification
|
||||||
==========================
|
==========================
|
||||||
.. meta::
|
.. meta::
|
||||||
|
:category: Transports
|
||||||
:lastupdated: November 2015
|
:lastupdated: November 2015
|
||||||
:accuratefor: 0.9.24
|
:accuratefor: 0.9.24
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
Streaming Library Specification
|
Streaming Library Specification
|
||||||
===============================
|
===============================
|
||||||
.. meta::
|
.. meta::
|
||||||
|
:category: Protocols
|
||||||
:lastupdated: June 2015
|
:lastupdated: June 2015
|
||||||
:accuratefor: 0.9.20
|
:accuratefor: 0.9.20
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
Tunnel Creation Specification
|
Tunnel Creation Specification
|
||||||
=============================
|
=============================
|
||||||
.. meta::
|
.. meta::
|
||||||
|
:category: Design
|
||||||
:lastupdated: January 2016
|
:lastupdated: January 2016
|
||||||
:accuratefor: 0.9.24
|
:accuratefor: 0.9.24
|
||||||
|
|
||||||
|
@@ -2,6 +2,7 @@
|
|||||||
Tunnel Message Specification
|
Tunnel Message Specification
|
||||||
============================
|
============================
|
||||||
.. meta::
|
.. meta::
|
||||||
|
:category: Design
|
||||||
:lastupdated: February 2014
|
:lastupdated: February 2014
|
||||||
:accuratefor: 0.9.11
|
:accuratefor: 0.9.11
|
||||||
|
|
||||||
|
@@ -23,11 +23,18 @@ from i2p2www import helpers
|
|||||||
|
|
||||||
SPEC_METATAGS = {
|
SPEC_METATAGS = {
|
||||||
'accuratefor': None,
|
'accuratefor': None,
|
||||||
|
'category': '',
|
||||||
'lastupdated': None,
|
'lastupdated': None,
|
||||||
}
|
}
|
||||||
|
|
||||||
SPEC_LIST_METATAGS = [
|
SPEC_LIST_METATAGS = [
|
||||||
]
|
]
|
||||||
|
SPEC_CATEGORY_SORT = {
|
||||||
|
'Design': 1,
|
||||||
|
'Transports': 2,
|
||||||
|
'Protocols': 3,
|
||||||
|
'': 999,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def spec_index():
|
def spec_index():
|
||||||
@@ -52,7 +59,7 @@ def spec_index():
|
|||||||
spec.update(meta)
|
spec.update(meta)
|
||||||
specs.append(spec)
|
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)
|
return render_template('spec/index.html', specs=specs)
|
||||||
|
|
||||||
def spec_show(name, txt=False):
|
def spec_show(name, txt=False):
|
||||||
@@ -76,8 +83,9 @@ def spec_show(name, txt=False):
|
|||||||
# Change highlight formatter
|
# Change highlight formatter
|
||||||
content = content.replace('{% highlight', "{% highlight formatter='textspec'")
|
content = content.replace('{% highlight', "{% highlight formatter='textspec'")
|
||||||
# Other string changes
|
# Other string changes
|
||||||
content = content.replace(' :lastupdated', '- Last updated')
|
|
||||||
content = content.replace(' :accuratefor', '- Accurate for')
|
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.
|
# render the post with Jinja2 to handle URLs etc.
|
||||||
rendered_content = render_template_string(content)
|
rendered_content = render_template_string(content)
|
||||||
|
Reference in New Issue
Block a user