handlers.c: added enclosure link to output

This commit is contained in:
dogeystamp 2022-10-29 20:26:04 -04:00
parent 036206d2be
commit 418a835857
Signed by: dogeystamp
GPG Key ID: 7225FE3592EFFA38

View File

@ -132,9 +132,14 @@ openFile(const char *folder, char *fileName, char *fileExt)
static void
outputHtml(itemStruct *item, FILE *f)
{
fprintf(f, "<h1>%s</h1><br>\n", item->fields[FIELD_TITLE]);
fprintf(f, "<a href=\"%s\">Link</a><br>\n", item->fields[FIELD_LINK]);
fprintf(f, "%s", item->fields[FIELD_DESCRIPTION]);
if (item->fields[FIELD_TITLE])
fprintf(f, "<h1>%s</h1><br>\n", item->fields[FIELD_TITLE]);
if (item->fields[FIELD_LINK])
fprintf(f, "<a href=\"%s\">Link</a><br>\n", item->fields[FIELD_LINK]);
if (item->fields[FIELD_ENCLOSURE_URL])
fprintf(f, "<a href=\"%s\">Enclosure</a><br>\n", item->fields[FIELD_ENCLOSURE_URL]);
if (item->fields[FIELD_DESCRIPTION])
fprintf(f, "%s", item->fields[FIELD_DESCRIPTION]);
}
void