readability icon indicating copy to clipboard operation
readability copied to clipboard

CLI improvements.

Open aroneiermann opened this issue 10 years ago • 4 comments

Better error handling. Printing article.content not article.html. ;)

aroneiermann avatar Sep 16 '15 14:09 aroneiermann

@luin I'm not sure if cli.js is the right place to add the h1 stuff (87c76bc). Perhaps it would be better to detect that article.content contains no h1 element and then add one?

aroneiermann avatar Sep 16 '15 16:09 aroneiermann

What if including article.title in the <title />? So the html would be '<html><head><title>' + article.title + '</title></head><body>' + article.content + '</body>';

luin avatar Sep 17 '15 05:09 luin

I think that article.content should contain a header, specially a h1 tag. ( @luin What do you think about this point?). But in the most websites I have parsed, article.content doesn't contain a header. Title and heading are not the same, but in most cases the title and the heading are relative similar. So I thought about to add the article.title as a header (h1) to article.content. Perhaps it could also contain a title tag (Not sure about it).

aroneiermann avatar Sep 17 '15 10:09 aroneiermann

Makes sense. We can add a h1 tag with the content of article.title when the article.content doesn't contain a h1.

luin avatar Sep 19 '15 03:09 luin