इस समस्या का मेरा अंतिम (और उम्मीदवार अस्थायी) समाधान एक पायथन सीजीआई स्क्रिप्ट था। मेरी स्क्रिप्ट किसी भी व्यक्ति के लिए निम्नानुसार है जो इसे उपयोगी पा सकती है (इस तथ्य के बावजूद कि यह कुल हैक है)।
#!/usr/bin/python
"""A CGI script to produce an RSS feed of top-level Gallery2 albums."""
#import cgi
#import cgitb; cgitb.enable()
from time import gmtime, strftime
import MySQLdb
ALBUM_QUERY = '''
select g_id, g_title, g_originationTimestamp
from g_Item
where g_canContainChildren = 1
order by g_originationTimestamp desc
limit 0, 20
'''
RSS_TEMPLATE = '''Content-Type: text/xml
<?xml version="1.0"?>
<title>TITLE</title>
<link>http://example.com/gallery2/main.php</link>
DESCRIPTION
1440
%s
'''
ITEM_TEMPLATE = '''
-
<title>%s</title>
<link>http://example.com/gallery2/main.php?g2_itemId=%s</link>
%s
%s
'''
def to_item(row):
item_id = row[0]
title = row[1]
date = strftime("%a, %d %b %Y %H:%M:%s GMT", gmtime(row[2]))
return ITEM_TEMPLATE % (title, item_id, title, date)
conn = MySQLdb.connect(host = "HOST",
user = "USER",
passwd = "PASSWORD",
db = "DATABASE")
curs = conn.cursor()
curs.execute(ALBUM_QUERY)
print RSS_TEMPLATE % ''.join([ to_item(row) for row in curs.fetchall() ])
curs.close()