A simple RSS feed downloader that saves items in a Maildir
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

29 lines
431 B

#include <stdio.h>
#include "fetch.h"
#include "parse.h"
#include "save.h"
void usage(char *name)
{
printf("Usage: %s maildir rss_url\n", name);
}
int main(int argc, char **argv)
{
char *maildir, *url, *feeddata;
if (argc != 3) {
usage(argv[0]);
return 1;
}
maildir = argv[1];
url = argv[2];
if ((feeddata = fetchrss(url)) == NULL)
return -1;
save_feed_maildir(feeddata, maildir);
free(feeddata);
return 0;
}