]> git.phdru.name Git - phdru.name/phdru.name.git/commitdiff
Made baseURL language-dependent directory. Added link to self.
authorOleg Broytman <phd@phdru.name>
Fri, 17 Mar 2006 11:48:38 +0000 (11:48 +0000)
committerOleg Broytman <phd@phdru.name>
Fri, 17 Mar 2006 11:48:38 +0000 (11:48 +0000)
git-svn-id: file:///home/phd/archive/SVN/phdru.name/scripts@33 7bb0bf08-9e0d-0410-b083-99cee3bf18b8

atom_10.tmpl
make-news.py
rss_20.tmpl

index eadc7ce7a78695ad9e2dfe96f4b2167d9253b906..0cc3ce88431f0420b4c2bfa51dcba980a74af465 100644 (file)
@@ -1,8 +1,9 @@
 <?xml version="1.0" encoding="koi8-r"?>
 <feed xmlns="http://www.w3.org/2005/Atom">
   <title>$title</title>
-  <id>$baseURL</id>
-  <link rel="alternate" type="text/html" href="$baseURL" />
+  <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>
index 14c3cf78b0ca294c1fd260c2e491f0a0c68498de..a654c26720b50253c1475dcd3fe17a6fdb65db8e 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/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]))
index 22692eadd40af5b57669029d2a58b953d9402625..09b646ad3a09cdeee9005b5c96f77a7d54bcaa8c 100644 (file)
@@ -2,7 +2,7 @@
 <rss version="2.0">
   <channel>
     <title>$title</title>
-    <link>$baseURL</link>
+    <link>$baseURL/news.html</link>
     <description>$description</description>
     <language>$lang</language>
     <webMaster>$author &lt;$email&gt;</webMaster>