forked from xsf/xmpp.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
publishconf.py
35 lines (30 loc) · 862 Bytes
/
publishconf.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
# This file is only used if you use `make publish` or
# explicitly specify it as your config file.
import os
import sys
sys.path.append(os.curdir)
import urllib2
import xml.etree.ElementTree as ET
from pelicanconf import *
# SITE_URL = "http://new.xmpp.org"
RELATIVE_URLS = True
DELETE_OUTPUT_DIRECTORY = True
f = urllib2.urlopen("https://xmpp.org/extensions/xeplist.xml")
try:
tree = ET.parse(f)
finally:
f.close()
XEPS = [
{
"title": xep.find("title").text,
"status": xep.find("status").text,
"number": int(xep.find("number").text),
"last_updated": xep.find("last-revision").find("date").text,
"type": xep.find("type").text,
}
for xep in tree.getroot().findall("xep")
if xep.get("accepted") == "true"
]