[Hejes-devel] [1037] sitemap_updater.py: blog posts priority .6; added changefreq= weekly to index; file location is static/sitemap.xml

hejes-devel at nytud.hu hejes-devel at nytud.hu
Tue Nov 26 15:54:44 CET 2013


Revision: 1037
Author:   mihaltz
Date:     2013-11-26 15:54:44 +0100 (Tue, 26 Nov 2013)
Log Message:
-----------
sitemap_updater.py: blog posts priority .6; added changefreq=weekly to index; file location is static/sitemap.xml

Modified Paths:
--------------
    trunk/misc/dbblog/sitemap_updater.py

Modified: trunk/misc/dbblog/sitemap_updater.py
===================================================================
--- trunk/misc/dbblog/sitemap_updater.py	2013-11-26 14:35:01 UTC (rev 1036)
+++ trunk/misc/dbblog/sitemap_updater.py	2013-11-26 14:54:44 UTC (rev 1037)
@@ -70,7 +70,7 @@
   """
   def __init__(self, f):
     prefix    = '<url>\n  <loc>' + f.url_pref
-    suffix    = '</lastmod>\n  <priority>0.50</priority>\n</url>\n'
+    suffix    = '</lastmod>\n  <priority>0.60</priority>\n</url>\n'
     self.item      = prefix + '{link}</loc>\n  <lastmod>{date}' + suffix
 
   def __call__(self, link_date1, link_date2):
@@ -112,7 +112,7 @@
   for i in fileinput.input(file_name, inplace=1):
     if bi:
       bi = False
-      d = '  <lastmod>' + str(Date.now_w3c()) + '</lastmod>\n'
+      d = '  <lastmod>' + str(Date.now_w3c()) + '</lastmod>\n  <changefreq>weekly</changefreq>\n'
       i = d if i.startswith('  <lastmod>') else d + i
     elif i.startswith('</urlset>'): print text,
     print i.rstrip()
@@ -125,7 +125,7 @@
       ['link', 'pubDate'],
       'http://htp-devel.nytud.hu/helyesiras_webdev')
   s = FileProperties(
-      './sitemap.xml', #TODO: Change this!
+      '../../web2py/applications/helyesiras_webdev/static/sitemap.xml',
       ['loc'],
       'http://helyesiras.mta.hu/helyesiras')
 




More information about the Hejes-devel mailing list