webdump

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.z3bra.org/webdump.git
Log | Files | Refs | README | LICENSE

commit 74ca65d0beb13f86344479079cc3bfcc924c30ae
parent 02ccf13986f580df16d65a35ceb8c334100d6ef6
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sat, 21 Sep 2019 16:37:58 +0200

add a few HTML5 tags, update TODO, tiny cleanup

Diffstat:
TODO | 9+++++++--
main.c | 6+++++-
2 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/TODO b/TODO @@ -1,13 +1,18 @@ - base href. specify and parse relative url, allow to specify base and also parse <base href=""> -- handle <link /> to RSS/Atom feed, show as link. +- detect <link /> to RSS/Atom feed, show as link. + example: <link rel="alternate" href="atom.xml" type="application/atom+xml" title="Codemadness Atom Feed" /> + or + <link rel="alternate" title="Tweakers Mixed RSS feed" type="application/rss+xml" href="https://tweakers.net/feeds/mixed.xml"> - handle whitespace, and tag types properly: atleast: inline-block, inline, block, pre - print safe (not certain control chars, except newline, TAB etc). - improve/remove duplicate white-space/newlines? -- cleanup code. - <code> should not be treated as a block (<pre> does?) - add links as reference, for example on page: http://absmagazin.de/2018 the MP3 urls. - add COMPATOBJ for strlcpy and strlcat. - write a proper Makefile. - write documentation and man pages. +- cleanup code. +? word-wrapping. +? aligned/fancy table cell rendering. ? xml.c: make sure to always call xmldata handler even if datalen == 0 ? diff --git a/main.c b/main.c @@ -117,6 +117,11 @@ static struct { { "blockquote", DisplayBlock }, { "hr", DisplayBlock }, { "title", DisplayBlock }, + { "nav", DisplayBlock }, + { "main", DisplayBlock }, + { "article", DisplayBlock }, + { "header", DisplayBlock }, + { "footer", DisplayBlock }, { "div", DisplayBlock }, }; @@ -509,7 +514,6 @@ xmltagend(XMLParser *p, const char *t, size_t tl, int isshort) fputs("\n", stdout); } else if (cur->displaytype & DisplayTableRow) { fputs(" | ", stdout); /* HACK: assume last cell */ - } else if (cur->displaytype & DisplayTableCell) { } else if (cur->displaytype & DisplayList) { fputs("\n", stdout); } else if (cur->displaytype & DisplayListItem) {