]> git.phdru.name Git - phdru.name/phdru.name.git/blobdiff - make-news.py
For urljoin() to remove ".." components baseURL must ends in a slash.
[phdru.name/phdru.name.git] / make-news.py
index a654c26720b50253c1475dcd3fe17a6fdb65db8e..2fcb7163c1352e7de1571dc16695992134ee031d 100755 (executable)
@@ -40,7 +40,7 @@ from rss_20 import rss_20
 
 namespace = {
    "title": "Oleg Broytmann's Personal Page - News",
-   "baseURL": "http://phd.pp.ru",
+   "baseURL": "http://phd.pp.ru/",
    "description": "",
    "lang": lang,
    "author": "Oleg Broytmann",
@@ -50,7 +50,8 @@ namespace = {
 
 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)