summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sfeed_opml_import.1 (renamed from sfeed_opml_config.1)4
-rw-r--r--sfeed_opml_import.c (renamed from sfeed_opml_config.c)6
2 files changed, 6 insertions, 4 deletions
diff --git a/sfeed_opml_config.1 b/sfeed_opml_import.1
index 523f99e..c5650ca 100644
--- a/sfeed_opml_config.1
+++ b/sfeed_opml_import.1
@@ -1,8 +1,8 @@
.TH SFEED 1 sfeed\-VERSION
.SH NAME
-sfeed_opml_config \- generate a sfeedrc config file based on an opml file
+sfeed_opml_import \- generate a sfeedrc config file based on an opml file
.SH SYNOPSIS
-.B sfeed_opml_config
+.B sfeed_opml_import
.SH DESCRIPTION
Reads the opml XML data from stdin and writes the config file text to stdout.
.SH SEE ALSO
diff --git a/sfeed_opml_config.c b/sfeed_opml_import.c
index 0d74820..f328fc1 100644
--- a/sfeed_opml_config.c
+++ b/sfeed_opml_import.c
@@ -23,15 +23,17 @@ getattrvalue(const char **atts, const char *name) {
void XMLCALL
xml_handler_start_element(void *data, const char *name, const char **atts) {
- char *feedurl = NULL, *feedname = NULL;;
+ char *feedurl = NULL, *feedname = NULL, *basesiteurl = NULL;
if(!strcasecmp(name, "outline")) {
if(!(feedname = getattrvalue(atts, "text")) &&
!(feedname = getattrvalue(atts, "title")))
feedname = "unnamed";
+ if(!(basesiteurl = getattrvalue(atts, "htmlurl")))
+ basesiteurl = "";
if(!(feedurl = getattrvalue(atts, "xmlurl")))
feedurl = "";
- printf("\tfeed \"%s\" \"%s\"\n", feedname, feedurl);
+ printf("\tfeed \"%s\" \"%s\" \"%s\"\n", feedname, feedurl, basesiteurl);
}
}