Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NewsDownloader: Allow including images when using text from feed #5040

Merged
merged 1 commit into from May 26, 2019

Conversation

Projects
None yet
2 participants
@Thra11
Copy link
Contributor

commented May 25, 2019

Split the html page download out of createEpub, so that createFromDescription
can pass in its own html for epub packaging (with optional image download).
Still pass in a url, so that relative urls can be made absolute.

Related to #3172.

end
end

function NewsDownloader:createFromDescription(feed, context, feed_output_dir)
function NewsDownloader:createFromDescription(feed, context, feed_output_dir, include_images, message)

This comment has been minimized.

Copy link
@Thra11

Thra11 May 25, 2019

Author Contributor

The bulk of NewsDownloader:downloadFeed and NewsDownloader:createFromDescription is now identical.

@Frenzie Frenzie added the Plugin label May 26, 2019

@Frenzie
Copy link
Member

left a comment

👍

Show resolved Hide resolved plugins/newsdownloader.koplugin/main.lua Outdated
NewsDownloader: Allow including images when using text from feed
Split the html page download out of createEpub, so that createFromDescription
can pass in its own html for epub packaging (with optional image download).
Still pass in a url, so that relative urls can be made absolute.

@Thra11 Thra11 force-pushed the Thra11:news-epub-with-images-4 branch from 5b490bc to c182528 May 26, 2019

else
logger.dbg("NewsDownloader: News file will be stored to :", news_file_path)
local article_message = T(_("%1\n%2"), message, title_with_date)
local footer = _("This is just a description of the feed. To download the full article instead, go to the News Downloader settings and change 'download_full_article' to 'true'.")

This comment has been minimized.

Copy link
@Thra11

Thra11 May 26, 2019

Author Contributor

I wonder if it should mention that just changing download_full_article to true and re-running download news will actually cause it to skip the article, as the filename won't change.

Maybe we could encode the (relevant) feed settings in the filename, so that changing settings doesn't appear to do nothing if you don't manually delete the existing articles.

This comment has been minimized.

Copy link
@Frenzie

Frenzie May 26, 2019

Member

Sure, I suppose. :-)

@Frenzie Frenzie merged commit 1e9074c into koreader:master May 26, 2019

1 check passed

ci/circleci Your tests passed on CircleCI!
Details

@Frenzie Frenzie added this to the 2019.06 milestone Jun 10, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.