diff options
-rw-r--r-- | sfeed.1 | 8 | ||||
-rw-r--r-- | sfeed.c | 7 |
2 files changed, 12 insertions, 3 deletions
@@ -5,12 +5,16 @@ .Nm sfeed .Nd simple RSS and Atom parser .Sh SYNOPSIS -.Nm sfeed -.Op Ar suffix string +.Nm +.Op Ar suffix string | Fl Ar v .Sh DESCRIPTION .Nm reads RSS or Atom feed data (XML) from stdin. It writes the feed data in a tab-separated format to stdout. +.Sh OPTIONS +.Bl -tag -width 17n +.It Fl v +show program version .Sh TAB-SEPARATED FORMAT FIELDS .Pp The items are saved in a TSV-like format except newlines, tabs and @@ -727,8 +727,13 @@ xml_handler_end_element(XMLParser *p, const char *name, size_t namelen, int issh int main(int argc, char *argv[]) { - if(argc > 1) + if(argc > 1) { append = argv[1]; + if(!strcmp(argv[1], "-v")) { + printf("%s\n", VERSION); + return 0; + } + } /* init strings and initial memory pool size */ string_buffer_init(&ctx.item.timestamp, 64); |