Artifact 486c7677a86ea0fcae1a3d7b8e17565499bfe4fb:
File
src/rss.c
part of check-in
[dad40ffac0]
- Merge the RSS changes.
by
drh on
2007-09-23 20:18:58.
0000: 2f 2a 0a 2a 2a 20 43 6f 70 79 72 69 67 68 74 20 /*.** Copyright
0010: 28 63 29 20 32 30 30 37 20 44 2e 20 52 69 63 68 (c) 2007 D. Rich
0020: 61 72 64 20 48 69 70 70 0a 2a 2a 0a 2a 2a 20 54 ard Hipp.**.** T
0030: 68 69 73 20 70 72 6f 67 72 61 6d 20 69 73 20 66 his program is f
0040: 72 65 65 20 73 6f 66 74 77 61 72 65 3b 20 79 6f ree software; yo
0050: 75 20 63 61 6e 20 72 65 64 69 73 74 72 69 62 75 u can redistribu
0060: 74 65 20 69 74 20 61 6e 64 2f 6f 72 0a 2a 2a 20 te it and/or.**
0070: 6d 6f 64 69 66 79 20 69 74 20 75 6e 64 65 72 20 modify it under
0080: 74 68 65 20 74 65 72 6d 73 20 6f 66 20 74 68 65 the terms of the
0090: 20 47 4e 55 20 47 65 6e 65 72 61 6c 20 50 75 62 GNU General Pub
00a0: 6c 69 63 0a 2a 2a 20 4c 69 63 65 6e 73 65 20 76 lic.** License v
00b0: 65 72 73 69 6f 6e 20 32 20 61 73 20 70 75 62 6c ersion 2 as publ
00c0: 69 73 68 65 64 20 62 79 20 74 68 65 20 46 72 65 ished by the Fre
00d0: 65 20 53 6f 66 74 77 61 72 65 20 46 6f 75 6e 64 e Software Found
00e0: 61 74 69 6f 6e 2e 0a 2a 2a 0a 2a 2a 20 54 68 69 ation..**.** Thi
00f0: 73 20 70 72 6f 67 72 61 6d 20 69 73 20 64 69 73 s program is dis
0100: 74 72 69 62 75 74 65 64 20 69 6e 20 74 68 65 20 tributed in the
0110: 68 6f 70 65 20 74 68 61 74 20 69 74 20 77 69 6c hope that it wil
0120: 6c 20 62 65 20 75 73 65 66 75 6c 2c 0a 2a 2a 20 l be useful,.**
0130: 62 75 74 20 57 49 54 48 4f 55 54 20 41 4e 59 20 but WITHOUT ANY
0140: 57 41 52 52 41 4e 54 59 3b 20 77 69 74 68 6f 75 WARRANTY; withou
0150: 74 20 65 76 65 6e 20 74 68 65 20 69 6d 70 6c 69 t even the impli
0160: 65 64 20 77 61 72 72 61 6e 74 79 20 6f 66 0a 2a ed warranty of.*
0170: 2a 20 4d 45 52 43 48 41 4e 54 41 42 49 4c 49 54 * MERCHANTABILIT
0180: 59 20 6f 72 20 46 49 54 4e 45 53 53 20 46 4f 52 Y or FITNESS FOR
0190: 20 41 20 50 41 52 54 49 43 55 4c 41 52 20 50 55 A PARTICULAR PU
01a0: 52 50 4f 53 45 2e 20 20 53 65 65 20 74 68 65 20 RPOSE. See the
01b0: 47 4e 55 0a 2a 2a 20 47 65 6e 65 72 61 6c 20 50 GNU.** General P
01c0: 75 62 6c 69 63 20 4c 69 63 65 6e 73 65 20 66 6f ublic License fo
01d0: 72 20 6d 6f 72 65 20 64 65 74 61 69 6c 73 2e 0a r more details..
01e0: 2a 2a 20 0a 2a 2a 20 59 6f 75 20 73 68 6f 75 6c ** .** You shoul
01f0: 64 20 68 61 76 65 20 72 65 63 65 69 76 65 64 20 d have received
0200: 61 20 63 6f 70 79 20 6f 66 20 74 68 65 20 47 4e a copy of the GN
0210: 55 20 47 65 6e 65 72 61 6c 20 50 75 62 6c 69 63 U General Public
0220: 0a 2a 2a 20 4c 69 63 65 6e 73 65 20 61 6c 6f 6e .** License alon
0230: 67 20 77 69 74 68 20 74 68 69 73 20 6c 69 62 72 g with this libr
0240: 61 72 79 3b 20 69 66 20 6e 6f 74 2c 20 77 72 69 ary; if not, wri
0250: 74 65 20 74 6f 20 74 68 65 0a 2a 2a 20 46 72 65 te to the.** Fre
0260: 65 20 53 6f 66 74 77 61 72 65 20 46 6f 75 6e 64 e Software Found
0270: 61 74 69 6f 6e 2c 20 49 6e 63 2e 2c 20 35 39 20 ation, Inc., 59
0280: 54 65 6d 70 6c 65 20 50 6c 61 63 65 20 2d 20 53 Temple Place - S
0290: 75 69 74 65 20 33 33 30 2c 0a 2a 2a 20 42 6f 73 uite 330,.** Bos
02a0: 74 6f 6e 2c 20 4d 41 20 20 30 32 31 31 31 2d 31 ton, MA 02111-1
02b0: 33 30 37 2c 20 55 53 41 2e 0a 2a 2a 0a 2a 2a 20 307, USA..**.**
02c0: 41 75 74 68 6f 72 20 63 6f 6e 74 61 63 74 20 69 Author contact i
02d0: 6e 66 6f 72 6d 61 74 69 6f 6e 3a 0a 2a 2a 20 20 nformation:.**
02e0: 20 64 72 68 40 68 77 61 63 69 2e 63 6f 6d 0a 2a drh@hwaci.com.*
02f0: 2a 20 20 20 68 74 74 70 3a 2f 2f 77 77 77 2e 68 * http://www.h
0300: 77 61 63 69 2e 63 6f 6d 2f 64 72 68 2f 0a 2a 2a waci.com/drh/.**
0310: 0a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a .***************
0320: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0330: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0340: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0350: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0360: 0a 2a 2a 0a 2a 2a 20 54 68 69 73 20 66 69 6c 65 .**.** This file
0370: 20 63 6f 6e 74 61 69 6e 73 20 63 6f 64 65 20 75 contains code u
0380: 73 65 64 20 74 6f 20 63 72 65 61 74 65 20 61 20 sed to create a
0390: 52 53 53 20 66 65 65 64 20 66 6f 72 20 74 68 65 RSS feed for the
03a0: 20 43 47 49 20 69 6e 74 65 72 66 61 63 65 2e 0a CGI interface..
03b0: 2a 2f 0a 23 69 6e 63 6c 75 64 65 20 22 63 6f 6e */.#include "con
03c0: 66 69 67 2e 68 22 0a 23 69 6e 63 6c 75 64 65 20 fig.h".#include
03d0: 22 72 73 73 2e 68 22 0a 23 69 6e 63 6c 75 64 65 "rss.h".#include
03e0: 20 3c 61 73 73 65 72 74 2e 68 3e 0a 23 69 6e 63 <assert.h>.#inc
03f0: 6c 75 64 65 20 3c 74 69 6d 65 2e 68 3e 0a 0a 74 lude <time.h>..t
0400: 69 6d 65 5f 74 20 72 73 73 5f 64 61 74 65 74 69 ime_t rss_dateti
0410: 6d 65 5f 74 6f 5f 74 69 6d 65 5f 74 28 63 6f 6e me_to_time_t(con
0420: 73 74 20 63 68 61 72 20 2a 64 74 29 7b 0a 20 20 st char *dt){.
0430: 73 74 72 75 63 74 20 74 6d 20 74 68 65 5f 74 6d struct tm the_tm
0440: 3b 0a 20 20 0a 20 20 74 68 65 5f 74 6d 2e 74 6d ;. . the_tm.tm
0450: 5f 79 65 61 72 20 3d 20 61 74 6f 69 28 64 74 29 _year = atoi(dt)
0460: 2d 31 39 30 30 3b 0a 20 20 74 68 65 5f 74 6d 2e -1900;. the_tm.
0470: 74 6d 5f 6d 6f 6e 20 20 3d 20 61 74 6f 69 28 26 tm_mon = atoi(&
0480: 64 74 5b 35 5d 29 2d 31 3b 0a 20 20 74 68 65 5f dt[5])-1;. the_
0490: 74 6d 2e 74 6d 5f 6d 64 61 79 20 3d 20 61 74 6f tm.tm_mday = ato
04a0: 69 28 26 64 74 5b 38 5d 29 3b 0a 20 20 74 68 65 i(&dt[8]);. the
04b0: 5f 74 6d 2e 74 6d 5f 68 6f 75 72 20 3d 20 61 74 _tm.tm_hour = at
04c0: 6f 69 28 26 64 74 5b 31 31 5d 29 3b 0a 20 20 74 oi(&dt[11]);. t
04d0: 68 65 5f 74 6d 2e 74 6d 5f 6d 69 6e 20 20 3d 20 he_tm.tm_min =
04e0: 61 74 6f 69 28 26 64 74 5b 31 34 5d 29 3b 0a 20 atoi(&dt[14]);.
04f0: 20 74 68 65 5f 74 6d 2e 74 6d 5f 73 65 63 20 20 the_tm.tm_sec
0500: 3d 20 61 74 6f 69 28 26 64 74 5b 31 37 5d 29 3b = atoi(&dt[17]);
0510: 0a 20 20 0a 20 20 72 65 74 75 72 6e 20 6d 6b 74 . . return mkt
0520: 69 6d 65 28 26 74 68 65 5f 74 6d 29 3b 0a 7d 0a ime(&the_tm);.}.
0530: 0a 2f 2a 0a 2a 2a 20 57 45 42 50 41 47 45 3a 20 ./*.** WEBPAGE:
0540: 74 69 6d 65 6c 69 6e 65 2e 72 73 73 0a 2a 2f 0a timeline.rss.*/.
0550: 0a 76 6f 69 64 20 70 61 67 65 5f 74 69 6d 65 6c .void page_timel
0560: 69 6e 65 5f 72 73 73 28 76 6f 69 64 29 7b 0a 20 ine_rss(void){.
0570: 20 53 74 6d 74 20 71 3b 0a 20 20 69 6e 74 20 6e Stmt q;. int n
0580: 4c 69 6e 65 3d 30 3b 0a 20 20 63 68 61 72 20 2a Line=0;. char *
0590: 7a 50 75 62 44 61 74 65 2c 20 2a 7a 52 53 53 54 zPubDate, *zRSST
05a0: 69 74 6c 65 2c 20 2a 7a 52 53 53 44 65 73 63 72 itle, *zRSSDescr
05b0: 2c 20 2a 7a 46 72 65 65 52 53 53 54 69 74 6c 65 , *zFreeRSSTitle
05c0: 3d 30 3b 0a 20 20 63 6f 6e 73 74 20 63 68 61 72 =0;. const char
05d0: 20 7a 53 51 4c 5b 5d 20 3d 0a 20 20 20 20 40 20 zSQL[] =. @
05e0: 53 45 4c 45 43 54 0a 20 20 20 20 40 20 20 20 62 SELECT. @ b
05f0: 6c 6f 62 2e 72 69 64 2c 0a 20 20 20 20 40 20 20 lob.rid,. @
0600: 20 75 75 69 64 2c 0a 20 20 20 20 40 20 20 20 64 uuid,. @ d
0610: 61 74 65 74 69 6d 65 28 65 76 65 6e 74 2e 6d 74 atetime(event.mt
0620: 69 6d 65 29 2c 0a 20 20 20 20 40 20 20 20 63 6f ime),. @ co
0630: 61 6c 65 73 63 65 28 65 63 6f 6d 6d 65 6e 74 2c alesce(ecomment,
0640: 63 6f 6d 6d 65 6e 74 29 2c 0a 20 20 20 20 40 20 comment),. @
0650: 20 20 63 6f 61 6c 65 73 63 65 28 65 75 73 65 72 coalesce(euser
0660: 2c 75 73 65 72 29 2c 0a 20 20 20 20 40 20 20 20 ,user),. @
0670: 28 53 45 4c 45 43 54 20 63 6f 75 6e 74 28 2a 29 (SELECT count(*)
0680: 20 46 52 4f 4d 20 70 6c 69 6e 6b 20 57 48 45 52 FROM plink WHER
0690: 45 20 70 69 64 3d 62 6c 6f 62 2e 72 69 64 20 41 E pid=blob.rid A
06a0: 4e 44 20 69 73 70 72 69 6d 29 2c 0a 20 20 20 20 ND isprim),.
06b0: 40 20 20 20 28 53 45 4c 45 43 54 20 63 6f 75 6e @ (SELECT coun
06c0: 74 28 2a 29 20 46 52 4f 4d 20 70 6c 69 6e 6b 20 t(*) FROM plink
06d0: 57 48 45 52 45 20 63 69 64 3d 62 6c 6f 62 2e 72 WHERE cid=blob.r
06e0: 69 64 29 0a 20 20 20 20 40 20 46 52 4f 4d 20 65 id). @ FROM e
06f0: 76 65 6e 74 2c 20 62 6c 6f 62 0a 20 20 20 20 40 vent, blob. @
0700: 20 57 48 45 52 45 20 62 6c 6f 62 2e 72 69 64 3d WHERE blob.rid=
0710: 65 76 65 6e 74 2e 6f 62 6a 69 64 0a 20 20 20 20 event.objid.
0720: 40 20 4f 52 44 45 52 20 42 59 20 65 76 65 6e 74 @ ORDER BY event
0730: 2e 6d 74 69 6d 65 20 44 45 53 43 0a 20 20 3b 0a .mtime DESC. ;.
0740: 20 20 0a 20 20 63 67 69 5f 73 65 74 5f 63 6f 6e . cgi_set_con
0750: 74 65 6e 74 5f 74 79 70 65 28 22 61 70 70 6c 69 tent_type("appli
0760: 63 61 74 69 6f 6e 2f 72 73 73 2b 78 6d 6c 22 29 cation/rss+xml")
0770: 3b 0a 20 20 0a 20 20 7a 52 53 53 54 69 74 6c 65 ;. . zRSSTitle
0780: 20 3d 20 64 62 5f 67 65 74 28 22 72 73 73 2d 74 = db_get("rss-t
0790: 69 74 6c 65 22 2c 20 30 29 3b 0a 20 20 69 66 28 itle", 0);. if(
07a0: 20 7a 52 53 53 54 69 74 6c 65 3d 3d 30 20 29 7b zRSSTitle==0 ){
07b0: 0a 20 20 20 20 7a 46 72 65 65 52 53 53 54 69 74 . zFreeRSSTit
07c0: 6c 65 20 3d 20 7a 52 53 53 54 69 74 6c 65 20 3d le = zRSSTitle =
07d0: 20 6d 70 72 69 6e 74 66 28 22 46 6f 73 73 69 6c mprintf("Fossil
07e0: 20 73 6f 75 72 63 65 20 72 65 70 6f 73 69 74 6f source reposito
07f0: 72 79 20 66 6f 72 3a 20 25 73 22 2c 0a 20 20 20 ry for: %s",.
0800: 20 20 20 67 2e 7a 42 61 73 65 55 52 4c 29 3b 0a g.zBaseURL);.
0810: 20 20 7d 0a 20 20 7a 52 53 53 44 65 73 63 72 20 }. zRSSDescr
0820: 3d 20 64 62 5f 67 65 74 28 22 72 73 73 2d 64 65 = db_get("rss-de
0830: 73 63 72 69 70 74 69 6f 6e 22 2c 20 30 29 3b 0a scription", 0);.
0840: 20 20 69 66 28 20 7a 52 53 53 44 65 73 63 72 3d if( zRSSDescr=
0850: 3d 30 20 29 7b 0a 20 20 20 20 7a 52 53 53 44 65 =0 ){. zRSSDe
0860: 73 63 72 20 3d 20 7a 52 53 53 54 69 74 6c 65 3b scr = zRSSTitle;
0870: 0a 20 20 7d 0a 20 20 0a 20 20 7a 50 75 62 44 61 . }. . zPubDa
0880: 74 65 20 3d 20 63 67 69 5f 72 66 63 38 32 32 5f te = cgi_rfc822_
0890: 64 61 74 65 73 74 61 6d 70 28 74 69 6d 65 28 4e datestamp(time(N
08a0: 55 4c 4c 29 29 3b 0a 20 20 0a 20 20 40 20 3c 3f ULL));. . @ <?
08b0: 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31 2e 30 xml version="1.0
08c0: 22 3f 3e 0a 20 20 40 20 3c 72 73 73 20 76 65 72 "?>. @ <rss ver
08d0: 73 69 6f 6e 3d 22 32 2e 30 22 3e 0a 20 20 40 20 sion="2.0">. @
08e0: 20 20 3c 63 68 61 6e 6e 65 6c 3e 0a 20 20 40 20 <channel>. @
08f0: 20 20 20 20 3c 74 69 74 6c 65 3e 25 73 28 7a 52 <title>%s(zR
0900: 53 53 54 69 74 6c 65 29 3c 2f 74 69 74 6c 65 3e SSTitle)</title>
0910: 0a 20 20 40 20 20 20 20 20 3c 6c 69 6e 6b 3e 25 . @ <link>%
0920: 73 28 67 2e 7a 42 61 73 65 55 52 4c 29 3c 2f 6c s(g.zBaseURL)</l
0930: 69 6e 6b 3e 0a 20 20 40 20 20 20 20 20 3c 64 65 ink>. @ <de
0940: 73 63 72 69 70 74 69 6f 6e 3e 25 73 28 7a 52 53 scription>%s(zRS
0950: 53 44 65 73 63 72 29 3c 2f 64 65 73 63 72 69 70 SDescr)</descrip
0960: 74 69 6f 6e 3e 0a 20 20 40 20 20 20 20 20 3c 70 tion>. @ <p
0970: 75 62 44 61 74 65 3e 25 73 28 7a 50 75 62 44 61 ubDate>%s(zPubDa
0980: 74 65 29 3c 2f 70 75 62 44 61 74 65 3e 0a 20 20 te)</pubDate>.
0990: 40 20 20 20 20 20 3c 67 65 6e 65 72 61 74 6f 72 @ <generator
09a0: 3e 46 6f 73 73 69 6c 20 76 65 72 73 69 6f 6e 20 >Fossil version
09b0: 25 73 28 4d 41 4e 49 46 45 53 54 5f 56 45 52 53 %s(MANIFEST_VERS
09c0: 49 4f 4e 29 20 25 73 28 4d 41 4e 49 46 45 53 54 ION) %s(MANIFEST
09d0: 5f 44 41 54 45 29 3c 2f 67 65 6e 65 72 61 74 6f _DATE)</generato
09e0: 72 3e 0a 20 20 64 62 5f 70 72 65 70 61 72 65 28 r>. db_prepare(
09f0: 26 71 2c 20 7a 53 51 4c 29 3b 0a 20 20 77 68 69 &q, zSQL);. whi
0a00: 6c 65 28 20 64 62 5f 73 74 65 70 28 26 71 29 3d le( db_step(&q)=
0a10: 3d 53 51 4c 49 54 45 5f 52 4f 57 20 26 26 20 6e =SQLITE_ROW && n
0a20: 4c 69 6e 65 3c 3d 32 30 20 29 7b 0a 20 20 20 20 Line<=20 ){.
0a30: 63 6f 6e 73 74 20 63 68 61 72 20 2a 7a 49 64 20 const char *zId
0a40: 3d 20 64 62 5f 63 6f 6c 75 6d 6e 5f 74 65 78 74 = db_column_text
0a50: 28 26 71 2c 20 31 29 3b 0a 20 20 20 20 63 6f 6e (&q, 1);. con
0a60: 73 74 20 63 68 61 72 20 2a 7a 44 61 74 65 20 3d st char *zDate =
0a70: 20 64 62 5f 63 6f 6c 75 6d 6e 5f 74 65 78 74 28 db_column_text(
0a80: 26 71 2c 20 32 29 3b 0a 20 20 20 20 63 6f 6e 73 &q, 2);. cons
0a90: 74 20 63 68 61 72 20 2a 7a 43 6f 6d 20 3d 20 64 t char *zCom = d
0aa0: 62 5f 63 6f 6c 75 6d 6e 5f 74 65 78 74 28 26 71 b_column_text(&q
0ab0: 2c 20 33 29 3b 0a 20 20 20 20 63 6f 6e 73 74 20 , 3);. const
0ac0: 63 68 61 72 20 2a 7a 41 75 74 68 6f 72 20 3d 20 char *zAuthor =
0ad0: 64 62 5f 63 6f 6c 75 6d 6e 5f 74 65 78 74 28 26 db_column_text(&
0ae0: 71 2c 20 34 29 3b 0a 20 20 20 20 63 68 61 72 20 q, 4);. char
0af0: 2a 7a 50 72 65 66 69 78 20 3d 20 22 22 3b 0a 20 *zPrefix = "";.
0b00: 20 20 20 69 6e 74 20 6e 43 68 69 6c 64 20 3d 20 int nChild =
0b10: 64 62 5f 63 6f 6c 75 6d 6e 5f 69 6e 74 28 26 71 db_column_int(&q
0b20: 2c 20 35 29 3b 0a 20 20 20 20 69 6e 74 20 6e 50 , 5);. int nP
0b30: 61 72 65 6e 74 20 3d 20 64 62 5f 63 6f 6c 75 6d arent = db_colum
0b40: 6e 5f 69 6e 74 28 26 71 2c 20 36 29 3b 0a 20 20 n_int(&q, 6);.
0b50: 20 20 0a 20 20 20 20 7a 44 61 74 65 20 3d 20 63 . zDate = c
0b60: 67 69 5f 72 66 63 38 32 32 5f 64 61 74 65 73 74 gi_rfc822_datest
0b70: 61 6d 70 28 72 73 73 5f 64 61 74 65 74 69 6d 65 amp(rss_datetime
0b80: 5f 74 6f 5f 74 69 6d 65 5f 74 28 7a 44 61 74 65 _to_time_t(zDate
0b90: 29 29 3b 0a 20 20 20 20 0a 20 20 20 20 69 66 28 ));. . if(
0ba0: 20 6e 50 61 72 65 6e 74 3e 31 20 26 26 20 6e 43 nParent>1 && nC
0bb0: 68 69 6c 64 3e 31 20 29 7b 0a 20 20 20 20 20 20 hild>1 ){.
0bc0: 7a 50 72 65 66 69 78 20 3d 20 22 2a 4d 45 52 47 zPrefix = "*MERG
0bd0: 45 2f 46 4f 52 4b 2a 20 22 3b 0a 20 20 20 20 7d E/FORK* ";. }
0be0: 65 6c 73 65 20 69 66 28 20 6e 50 61 72 65 6e 74 else if( nParent
0bf0: 3e 31 20 29 7b 0a 20 20 20 20 20 20 7a 50 72 65 >1 ){. zPre
0c00: 66 69 78 20 3d 20 22 2a 4d 45 52 47 45 2a 20 22 fix = "*MERGE* "
0c10: 3b 0a 20 20 20 20 7d 65 6c 73 65 20 69 66 28 20 ;. }else if(
0c20: 6e 43 68 69 6c 64 3e 31 20 29 7b 0a 20 20 20 20 nChild>1 ){.
0c30: 20 20 7a 50 72 65 66 69 78 20 3d 20 22 2a 46 4f zPrefix = "*FO
0c40: 52 4b 2a 20 22 3b 0a 20 20 20 20 7d 0a 0a 20 20 RK* ";. }..
0c50: 20 20 40 20 20 20 20 20 3c 69 74 65 6d 3e 0a 20 @ <item>.
0c60: 20 20 20 40 20 20 20 20 20 20 20 3c 74 69 74 6c @ <titl
0c70: 65 3e 25 73 28 7a 50 72 65 66 69 78 29 25 73 28 e>%s(zPrefix)%s(
0c80: 7a 43 6f 6d 29 3c 2f 74 69 74 6c 65 3e 0a 20 20 zCom)</title>.
0c90: 20 20 40 20 20 20 20 20 20 20 3c 6c 69 6e 6b 3e @ <link>
0ca0: 25 73 28 67 2e 7a 42 61 73 65 55 52 4c 29 2f 76 %s(g.zBaseURL)/v
0cb0: 69 6e 66 6f 2f 25 73 28 7a 49 64 29 3c 2f 6c 69 info/%s(zId)</li
0cc0: 6e 6b 3e 0a 20 20 20 20 40 20 20 20 20 20 20 20 nk>. @
0cd0: 3c 64 65 73 63 72 69 70 74 69 6f 6e 3e 25 73 28 <description>%s(
0ce0: 7a 50 72 65 66 69 78 29 25 73 28 7a 43 6f 6d 29 zPrefix)%s(zCom)
0cf0: 3c 2f 64 65 73 63 72 69 70 74 69 6f 6e 3e 0a 20 </description>.
0d00: 20 20 20 40 20 20 20 20 20 20 20 3c 70 75 62 44 @ <pubD
0d10: 61 74 65 3e 25 73 28 7a 44 61 74 65 29 3c 2f 70 ate>%s(zDate)</p
0d20: 75 62 44 61 74 65 3e 0a 20 20 20 20 40 20 20 20 ubDate>. @
0d30: 20 20 20 20 3c 61 75 74 68 6f 72 3e 25 73 28 7a <author>%s(z
0d40: 41 75 74 68 6f 72 29 3c 2f 61 75 74 68 6f 72 3e Author)</author>
0d50: 0a 20 20 20 20 40 20 20 20 20 20 20 20 3c 67 75 . @ <gu
0d60: 69 64 3e 25 73 28 67 2e 7a 42 61 73 65 55 52 4c id>%s(g.zBaseURL
0d70: 29 2f 76 69 6e 66 6f 2f 25 73 28 7a 49 64 29 3c )/vinfo/%s(zId)<
0d80: 2f 67 75 69 64 3e 0a 20 20 20 20 40 20 20 20 20 /guid>. @
0d90: 20 3c 2f 69 74 65 6d 3e 0a 20 20 20 20 6e 4c 69 </item>. nLi
0da0: 6e 65 2b 2b 3b 0a 20 20 7d 0a 0a 20 20 64 62 5f ne++;. }.. db_
0db0: 66 69 6e 61 6c 69 7a 65 28 26 71 29 3b 0a 20 20 finalize(&q);.
0dc0: 40 20 20 20 3c 2f 63 68 61 6e 6e 65 6c 3e 0a 20 @ </channel>.
0dd0: 20 40 20 3c 2f 72 73 73 3e 0a 7d 0a @ </rss>.}.