From: Oleg Broytman Date: Fri, 17 Mar 2006 11:48:38 +0000 (+0000) Subject: Made baseURL language-dependent directory. Added link to self. X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=faddebc2adacabf004ebe485bc882c5f384da463;p=phdru.name%2Fphdru.name.git Made baseURL language-dependent directory. Added link to self. git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@33 7bb0bf08-9e0d-0410-b083-99cee3bf18b8 --- diff --git a/atom_10.tmpl b/atom_10.tmpl index eadc7ce..0cc3ce8 100644 --- a/atom_10.tmpl +++ b/atom_10.tmpl @@ -1,8 +1,9 @@ $title - $baseURL - + $baseURL/news.html + + ${posts[0].date}T00:00:00Z $author diff --git a/make-news.py b/make-news.py index 14c3cf7..a654c26 100755 --- a/make-news.py +++ b/make-news.py @@ -40,7 +40,7 @@ from rss_20 import rss_20 namespace = { "title": "Oleg Broytmann's Personal Page - News", - "baseURL": "http://phd.pp.ru/news.html", + "baseURL": "http://phd.pp.ru", "description": "", "lang": lang, "author": "Oleg Broytmann", @@ -48,6 +48,10 @@ namespace = { "posts": news_items, } +if lang == "ru": + namespace["title"] = "Oleg Broytmann's Personal Page - Russian News" + namespace["baseURL"] = "http://phd.pp.ru/Russian" + 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])) diff --git a/rss_20.tmpl b/rss_20.tmpl index 22692ea..09b646a 100644 --- a/rss_20.tmpl +++ b/rss_20.tmpl @@ -2,7 +2,7 @@ $title - $baseURL + $baseURL/news.html $description $lang $author <$email>