Move summary so it can be translated
This commit is contained in:
@ -1,9 +1,11 @@
|
|||||||
<article
|
<article
|
||||||
id="urn:uuid:1225c695-cfb8-4ebb-aaaa-7805333efa6a"
|
id="urn:uuid:1225c695-cfb8-4ebb-aaaa-7805333efa6a"
|
||||||
title="0.9.20 Released"
|
title="0.9.20 Released"
|
||||||
summary="0.9.20 released with performance improvements and bug fixes."
|
|
||||||
href="http://i2p-projekt.i2p/en/blog/post/2015/06/02/0.9.20-Release"
|
href="http://i2p-projekt.i2p/en/blog/post/2015/06/02/0.9.20-Release"
|
||||||
author="zzz">
|
author="zzz">
|
||||||
|
<details>
|
||||||
|
<summary>0.9.20 released with performance improvements and bug fixes.</summary>
|
||||||
|
</details>
|
||||||
<p>
|
<p>
|
||||||
0.9.20 contains many important bug fixes, and several changes to increase floodfill capacity in the network.
|
0.9.20 contains many important bug fixes, and several changes to increase floodfill capacity in the network.
|
||||||
</p><p>
|
</p><p>
|
||||||
|
@ -18,7 +18,7 @@ def load_entries(fg):
|
|||||||
entries = entries_data.split('</article>')
|
entries = entries_data.split('</article>')
|
||||||
# split() creates an empty final element
|
# split() creates an empty final element
|
||||||
for entry_str in entries[:-1]:
|
for entry_str in entries[:-1]:
|
||||||
entry_parts = entry_str.split('>', 1)
|
entry_parts = entry_str.split('</details>', 1)
|
||||||
metadata = extract_entry_metadata(entry_parts[0])
|
metadata = extract_entry_metadata(entry_parts[0])
|
||||||
|
|
||||||
fe = fg.add_entry()
|
fe = fg.add_entry()
|
||||||
@ -30,7 +30,9 @@ def load_entries(fg):
|
|||||||
fe.content(entry_parts[1], type='xhtml')
|
fe.content(entry_parts[1], type='xhtml')
|
||||||
|
|
||||||
def extract_entry_metadata(s):
|
def extract_entry_metadata(s):
|
||||||
return {k:v.strip('"') for k,v in re.findall(r'(\S+)=(".*?"|\S+)', s)}
|
m = {k:v.strip('"') for k,v in re.findall(r'(\S+)=(".*?"|\S+)', s)}
|
||||||
|
m['summary'] = re.findall(r'<summary>(.*)</summary>', s)[0]
|
||||||
|
return m
|
||||||
|
|
||||||
def load_releases(fg):
|
def load_releases(fg):
|
||||||
fg.load_extension('i2p')
|
fg.load_extension('i2p')
|
||||||
|
Reference in New Issue
Block a user