Tomasz Chmielewski wrote:
>
>I wrote a simple bash script which generates a sitemap.xml file (i.e. to 
>be submitted to Google):
>
>http://blog.wpkg.org/2012/11/21/sitemap-xml-for-mailman/



There is an issue with the above script. Namely, the XML generated only
contains data for the last list in $LISTS. This will fix that

--- sitemap.old 2012-11-22 10:02:51.000000000 -0800
+++ sitemap.new 2012-11-22 10:27:37.000000000 -0800
@@ -18,8 +18,10 @@
 set -u

 # find html files with their dates
+URLS=""
 for LIST in $LISTS; do
-    URLS=$(find $MAILMANPATH/$LIST/ -type f -name \*html | xargs ls
--time-style=long-iso -l | awk '{print $6"T"$7":00+00:00 "$8}' | grep
-v attachments)
+    URLS="$URLS
+$(find $MAILMANPATH/$LIST/ -type f -name \*html | xargs ls
--time-style=long-iso -l | awk '{print $6"T"$7":00+00:00 "$8}' | grep
-v attachments)"
 done

 # if the article is crawled once a month, it should be enough

-- 
Mark Sapiro <[email protected]>        The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

------------------------------------------------------
Mailman-Users mailing list [email protected]
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://wiki.list.org/x/AgA3
Security Policy: http://wiki.list.org/x/QIA9
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Reply via email to