<?xml version="1.0" encoding="koi8-r"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>$title</title>
- <id>$baseURL/news.html</id>
- <link rel="self" type="application/atom+xml" href="$baseURL/atom_10.xml" />
- <link rel="alternate" type="text/html" href="$baseURL/news.html" />
+ <id>${baseURL}news.html</id>
+ <link rel="self" type="application/atom+xml" href="${baseURL}atom_10.xml" />
+ <link rel="alternate" type="text/html" href="${baseURL}news.html" />
<updated>${posts[0].date}T00:00:00Z</updated>
<author>
<name>$author</name>
namespace = {
"title": "Oleg Broytmann's Personal Page - News",
- "baseURL": "http://phd.pp.ru",
+ "baseURL": "http://phd.pp.ru/",
"description": "",
"lang": lang,
"author": "Oleg Broytmann",
if lang == "ru":
namespace["title"] = "Oleg Broytmann's Personal Page - Russian News"
- namespace["baseURL"] = "http://phd.pp.ru/Russian"
+ namespace["baseURL"] = baseURL = "http://phd.pp.ru/Russian/"
+ for item in news_items: item.baseURL = baseURL
atom_tmpl = str(atom_10(searchList=[namespace]))
write_if_changed(os.path.join(root, "atom_10.xml"), atom_tmpl)
from urlparse import urljoin
class NewsItem(object):
+ baseURL = "http://phd.pp.ru/"
excerpt = None
content = None
categoryList = []
self.rel_link = rel_link
def URL(self):
- return urljoin("http://phd.pp.ru/", self.rel_link)
+ return urljoin(self.baseURL, self.rel_link)
def rfc822_date(self):
y, m, d = self.date.split('-')
<rss version="2.0">
<channel>
<title>$title</title>
- <link>$baseURL/news.html</link>
+ <link>${baseURL}news.html</link>
<description>$description</description>
<language>$lang</language>
<webMaster>$author <$email></webMaster>