namespace = {
"title": "Oleg Broytmann's Personal Page - News",
- "baseURL": "http://phd.pp.ru/news.html",
+ "baseURL": "http://phd.pp.ru/",
+ "indexFile": "news.html",
"description": "",
"lang": lang,
"author": "Oleg Broytmann",
"posts": news_items,
}
+if lang == "ru":
+ namespace["title"] = "Oleg Broytmann's Personal Page - Russian News"
+ namespace["baseURL"] = baseURL = "http://phd.pp.ru/Russian/"
+ for item in news_items:
+ item.baseURL = baseURL
+
+for item in news_items:
+ href_parts = item.rel_link.split('/')
+ if href_parts:
+ if href_parts[0] == '.':
+ category = "Home page"
+ elif href_parts[0] == "..":
+ category = href_parts[1]
+ else:
+ category = href_parts[0]
+ if category: item.categoryList = [category]
+
atom_tmpl = str(atom_10(searchList=[namespace]))
write_if_changed(os.path.join(root, "atom_10.xml"), atom_tmpl)
rss_tmpl = str(rss_20(searchList=[namespace]))