Skip to content

NewsDownloader: Include author's name in summary when "Download full article"=false#13842

Merged
Frenzie merged 3 commits into
koreader:masterfrom
k-leveller:rss-author-name
May 30, 2025
Merged

NewsDownloader: Include author's name in summary when "Download full article"=false#13842
Frenzie merged 3 commits into
koreader:masterfrom
k-leveller:rss-author-name

Conversation

@k-leveller

@k-leveller k-leveller commented May 23, 2025

Copy link
Copy Markdown
Contributor

Currently, if an RSS feed is downloaded with "Download full article"=false, the author's name is not included in the resulting EPUB.

Two common ways of marking up the authors' name are:

  1. <author><name>Author Name</name></author>
  2. <dc:creator> Author One and Author Two </dc:creator>

This change adds a function that looks for one or more names in one of the above formats and adds a byline with the names to the HTML. The line break <br> was added to ensure there is at least some space between the byline and the content of the article, even if the content is not enclosed by <p>.


This change is Reviewable

authors[i] = feed.author[i].name
end
if #authors > 0 then
return "By " .. table.concat(authors, ", ")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll be less effort wrt translations and imo it looks better without adding 'by'.

@Frenzie Frenzie left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, that was the the next commit. ;-)

@Frenzie Frenzie added this to the 2025.05 milestone May 23, 2025
@Frenzie Frenzie merged commit ba2857c into koreader:master May 30, 2025
4 checks passed
@k-leveller k-leveller deleted the rss-author-name branch June 22, 2025 01:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants