I was just trying to find if somebody here can point me to the
existing tool, which is suitable for such a task.
Practically any of the web-template tools...
-=-=-=-=-=- code snippet from site generation script:
def b_conventions(self):
data = {}
myDB = MySQLdb.connect(host="localhost",
user="BestiariaCP",
db="bestiaria")
myC = myDB.cursor()
myC.execute("""select name, URL, banner, width, height, dates,
site, notes
from conventions
where sortdate > curdate()
order by sortdate""")
data["UpComing"] = myC.fetchall()
myC.execute("""select name, URL, banner, width, height, dates,
site, notes
from conventions
where sortdate <= curdate()
order by sortdate""")
data["History"] = myC.fetchall()
myC.close()
myDB.close()
fid = open("./static/b_conventions.html", "w")
fid.write(renderTemplate(file="./templates/b_conventions.html",
loc=data))
fid.close()
-=-=-=-=-=-
-=-=-=-=-=- snippet from template file -- using CherryTemplate
<!-- CONVENTION TABLE START DO NOT REMOVE OR EDIT -->
<table border="1"
cellspacing="2"
cellpadding="2"
align="center"
frame="box"
rules="all">
<TR>
<TH align="center" nowrap><B><FONT
size="+2">Convention</FONT></B></TH>
<TH align="center" nowrap><B><FONT
size="+2">Dates</FONT></B></TH>
<TH align="center" nowrap><B><FONT
size="+2">Location</FONT></B></TH>
</TR>
<py-for="(name, URL, banner, width, height, dates, site, notes) in
UpComing">
<TR><TD align="center" nowrap>
<py-if="URL"><A href=<py-eval="'\x22%s\x22' % URL">></py-if>
<py-if="banner"><img src=<py-eval="'\x22%s\x22' % banner">
<py-if="width">width=<py-eval="'\x22%s\x22' %
width"></py-if>
<py-if="height">height=<py-eval="'\x22%s\x22' %
height"></py-if>
alt=<py-eval="'\x22%s\x22' %
name">></py-if><py-else>
<B><FONT
size="+1"><py-eval="name"></FONT></py-else></B><py-if="URL"></A></py-if></TD>
<TD align="center"><py-if="dates"><py-eval="dates"></py-if></TD>
<TD align="center"><py-if="site"><py-eval="site"></py-if>
<py-if="notes"><BR><FONT
size="-1"><py-eval="notes"></FONT></py-if></TD></TR>
</py-for>
<py-for="(name, URL, banner, width, height, dates, site, notes) in
History">
<TR><TD align="center" nowrap>
<py-if="URL"><A href=<py-eval="'\x22%s\x22' % URL">></py-if>
<py-if="banner"><img src=<py-eval="'\x22%s\x22' % banner">
<py-if="width">width=<py-eval="'\x22%s\x22' %
width"></py-if>
<py-if="height">height=<py-eval="'\x22%s\x22' %
height"></py-if>
alt=<py-eval="'\x22%s\x22' %
name">></py-if><py-else>
<B><FONT
size="+1"><py-eval="name"></FONT></py-else></B><py-if="URL"></A></py-if></TD>
<TD align="center"><py-if="dates"><py-eval="dates"></py-if></TD>
<TD align="center"><py-if="site"><py-eval="site"></py-if>
<py-if="notes"><BR><FONT
size="-1"><py-eval="notes"></FONT></py-if></TD></TR>
</py-for>
</TR>
</TABLE>
<br><br>
<!-- CONVENTION TABLE END DO NOT REMOVE OR EDIT -->
-=-=-=-=-=-=-
-=-=-=-=-=-=- the generated web site (the site is static, I have to
run the Python to generate the pages, then upload them)
http://www.bestiaria.com/b_conventions.html
--
Wulfraed Dennis Lee Bieber KD6MOG
(e-mail address removed) (e-mail address removed)
HTTP://wlfraed.home.netcom.com/
(Bestiaria Support Staff: (e-mail address removed))
HTTP://www.bestiaria.com/