Hi,
I can share my “work” if you want. I just want to say that the code will not be pretty as I am a noob and without the help on this forum, I couldn’t have done half of the work.
I changed the plugin so that the published articles are sent to Wallabag (my read it later service).
function hook_house_keeping() {
/* since HOOK_UPDATE_TASK is not available to user plugins, this hook is a next best thing */
Debug::log("caching media of starred articles for user " . $this->host->get_owner_uid() . "...");
$sth = $this->pdo->prepare("SELECT content, ttrss_entries.title,
ttrss_user_entries.owner_uid, link, site_url, ttrss_entries.id, plugin_data
FROM ttrss_entries, ttrss_user_entries LEFT JOIN ttrss_feeds ON
(ttrss_user_entries.feed_id = ttrss_feeds.id)
WHERE ref_id = ttrss_entries.id AND
published = true AND
site_url != '' AND
ttrss_user_entries.owner_uid = ? AND
plugin_data NOT LIKE '%share_published%'
ORDER BY ".sql_random_function()." LIMIT 100");
if ($sth->execute([$this->host->get_owner_uid()])) {
$usth = $this->pdo->prepare("UPDATE ttrss_entries SET plugin_data = ? WHERE id = ?");
while ($line = $sth->fetch()) {
Debug::log("processing article " . $line["title"], Debug::$LOG_VERBOSE);
if ($line["site_url"]) {
$plugin_data = "share_published,${line['owner_uid']}:" . $line["plugin_data"];
$usth->execute([$plugin_data, $line['id']]);
/* Send to Wallabag
$this->_oauth();
$this->_send( $line["title"], $line["link"], 'filter');
/* Delete from published article list
$stmt = $this->pdo->prepare("UPDATE ttrss_user_entries SET published = false");
$stmt->execute();