some update docs

This commit is contained in:
Martin Rotter 2021-08-04 09:53:03 +02:00
parent a96888d4e0
commit 02bfb3eed6
5 changed files with 44 additions and 19 deletions

View File

@ -3,7 +3,7 @@
* [List of main features](#list-of-main-features)
* [Core concepts](#core-concepts)
* [Web-based and lite app variants](#web-based-and-lite-app-variants)
* [RSS Guard 3 vs. RSS Guard 4](#rss-guard-3-vs-rss-guard-4)
* [RSS Guard 3 vs RSS Guard 4](#rss-guard-3-vs-rss-guard-4)
* [Supported feed formats and online feed services](Feed-formats.md)
* [Message filtering](Message-filters.md)
* [Database backends](#database-backends)
@ -18,7 +18,7 @@
* [AdBlock](#adblock)
* [GUI tweaking](#gui-tweaking)
* [Miscellaneous topics](#miscellaneous-topics)
* [Downloads](Downloads.md)
* [Download](Downloads.md)
* [How to contribute](#how-to-contribute)
* [Reporting bugs](#reporting-bugs)
* [Localizations](#localizations)
@ -29,6 +29,7 @@
* [Cleaning database](#cleaning-database)
* [Portable user data](#portable-user-data)
* [Downloading new messages](#downloading-new-messages)
* [Synchronization algorithms](#synchronization-algorithms)
* [Generating debug log file](#generating-debug-log-file)
<img src="images/rssguard.png" width="64px">
@ -193,7 +194,7 @@ There are two big downsides of using `developer access token`:
* It allows maximum of 250 API calls per day.
## Notifications
RSS Guard allows you to configure behavior of desktop notifications. There is a number of events to be configured:
RSS Guard allows you to configure behavior of desktop notifications. There is a number of events which can be configured:
* new messages downloaded,
* downloading of messages started,
* login OAuth tokens refreshed,
@ -371,6 +372,16 @@ Here is the rough workflow which is performed when you hit `Feeds & categories -
* 2. Run all [message filters](#message-filtering), one by one, one the message. Cache read/important message attributes (or labels changes) changed by filters to queue which is later synchronized back to online feed service.
* 3. Store the message into RSS Guard's [database](#database-backends), creating completely new DB entry for it, or replacing existing message. **Note that two messages are considered as the same message if they have identical URL, author and title and they belong to the same feed.** This does not stand for synchronized feeds (TT-RSS, Inoreader and others) where each message has assigned special ID which identifies the message uniquely.
## Synchronization algorithms
There is always a problem of how to synchronize remote and local articles properly and fast.
RSS Guard supports many web-based [feed services](Feed-formats.md) which can by synchronized with full two-way synchronization.
For some services, RSS Guard provides modern synchronization algorithm which **tries to minimise amount of downloaded data and downloads only really needed articles** - not-yet-downloaded or updated ones. This improved synchronization algorithm is called "Intelligent synchronization algorithm" in RSS Guard and at this point is optionally supported by these plugins:
* Google Reader API.
Other services offer older, not so fast synchronization algorithms and will be eventually modernized.
## Generating debug log file
If you run into problems with RSS Guard and you need your problems fixed, you should provide log file from the time when problem occurred. RSS Guard writes all important information to standard output, which is usually calling terminal.

View File

@ -4,7 +4,7 @@ RSS Guard is a modular application which supports plugins. It offers well-mainta
* [Tiny Tiny RSS](https://tt-rss.org) plugin: Adds ability to synchronize messages with TT-RSS instances, either self-hosted or via 3rd-party external service.
* [Inoreader](https://www.inoreader.com) plugin: Adds ability to synchronize messages with Inoreader. All you need to do is create free account on their website and start rocking.
* [Nextcloud News](https://apps.nextcloud.com/apps/news) plugin: Nextcloud News is a Nextcloud app which adds feed reader abilities into your Nextcloud instances.
* [Google Reader API](https://rss-sync.github.io/Open-Reader-API/resources/#unofficial-google-reader-documentation) plugin: This plugin was added in RSS Guard 3.9.0 and offers two-way synchronization with services which implement Google Reader API. At this point, plugin was tested and works with Bazqux, The Old Reader and FreshRSS.
* [Google Reader API](https://rss-sync.github.io/Open-Reader-API/resources/#unofficial-google-reader-documentation) plugin: This plugin was added in RSS Guard 3.9.0 and offers two-way synchronization with services which implement Google Reader API. At this point, plugin was tested and works with Bazqux, Reedah, The Old Reader and FreshRSS.
* [Feedly](https://feedly.com) plugin: Provides synchronization with Feedly and supports both official productions keys mode as well as `developer access token` mode.
* [Gmail](https://www.google.com/gmail) plugin: Yes, you are reading it right. RSS Guard can be used as very lightweight and simple e-mail client. This plugins uses [Gmail API](https://developers.google.com/gmail/api) and offers even e-mail sending.

View File

@ -26,12 +26,13 @@
#define GREADER_API_SUBSCRIPTION_LIST "reader/api/0/subscription/list?output=json"
#define GREADER_API_STREAM_CONTENTS "reader/api/0/stream/contents/%1?output=json&n=%2"
#define GREADER_API_EDIT_TAG "reader/api/0/edit-tag"
#define GREADER_API_ITEM_IDS "reader/api/0/stream/items/ids?output=json&n=200000&s=%1"
#define GREADER_API_ITEM_IDS "reader/api/0/stream/items/ids?output=json&n=%2&s=%1"
#define GREADER_API_ITEM_CONTENTS "reader/api/0/stream/items/contents?output=json&n=200000"
#define GREADER_API_TOKEN "reader/api/0/token"
#define GREADER_API_USER_INFO "reader/api/0/user-info?output=json"
// Misc.
#define GREADET_API_ITEM_IDS_MAX 200000
#define GREADER_API_EDIT_TAG_BATCH 200
#define GREADER_API_ITEM_CONTENTS_BATCH 999
#define GREADER_GLOBAL_UPDATE_THRES 0.5

View File

@ -191,19 +191,22 @@ void GreaderNetwork::prepareFeedFetching(GreaderServiceRoot* root,
local_read_ids.unite(QSet<QString>(r.begin(), r.end()));
}
QSet<QString> not_downloaded;
if (!m_downloadOnlyUnreadMessages) {
not_downloaded = remote_all_ids - local_read_ids - local_unread_ids;
to_download += remote_all_ids - local_read_ids - local_unread_ids;
}
else {
not_downloaded = remote_unread_ids - local_read_ids - local_unread_ids;
to_download += remote_unread_ids - local_read_ids - local_unread_ids;
}
auto moved_unread = local_unread_ids.intersect(remote_read_ids);
auto moved_read = local_read_ids.intersect(remote_unread_ids);
to_download += not_downloaded + moved_read + moved_unread;
to_download += moved_read;
if (!m_downloadOnlyUnreadMessages) {
auto moved_unread = local_unread_ids.intersect(remote_read_ids);
to_download += moved_unread;
}
}
else {
qWarningNN << LOGSEC_GREADER << "Performing feed-based contents fetching.";
@ -258,18 +261,25 @@ QList<Message> GreaderNetwork::getMessagesIntelligently(ServiceRoot* root,
local_read_ids_list.end());
// 3.
QSet<QString> not_downloaded;
QSet<QString> to_download;
if (!m_downloadOnlyUnreadMessages) {
not_downloaded = remote_all_ids - local_read_ids - local_unread_ids;
to_download += remote_all_ids - local_read_ids - local_unread_ids;
}
else {
not_downloaded = remote_unread_ids - local_read_ids - local_unread_ids;
to_download += remote_unread_ids - local_read_ids - local_unread_ids;
}
auto moved_unread = local_unread_ids.intersect(remote_read_ids);
auto moved_read = local_read_ids.intersect(remote_unread_ids);
auto to_download = not_downloaded + moved_read + moved_unread;
to_download += moved_read;
if (!m_downloadOnlyUnreadMessages) {
auto moved_unread = local_unread_ids.intersect(remote_read_ids);
to_download += moved_unread;
}
QList<QString> to_download_list(to_download.begin(), to_download.end());
if (!to_download_list.isEmpty()) {
@ -305,7 +315,7 @@ QNetworkReply::NetworkError GreaderNetwork::markMessagesStarred(RootItem::Import
return editLabels(GREADER_API_FULL_STATE_IMPORTANT, importance == RootItem::Importance::Important, msg_custom_ids, proxy);
}
QStringList GreaderNetwork::itemIds(const QString& stream_id, bool unread_only, const QNetworkProxy& proxy) {
QStringList GreaderNetwork::itemIds(const QString& stream_id, bool unread_only, const QNetworkProxy& proxy, int max_count) {
QString continuation;
if (!ensureLogin(proxy)) {
@ -317,7 +327,10 @@ QStringList GreaderNetwork::itemIds(const QString& stream_id, bool unread_only,
do {
QString full_url = generateFullUrl(Operations::ItemIds).arg(m_service == GreaderServiceRoot::Service::TheOldReader
? stream_id
: QUrl::toPercentEncoding(stream_id));
: QUrl::toPercentEncoding(stream_id),
QString::number(max_count <= 0
? GREADET_API_ITEM_IDS_MAX
: max_count));
auto timeout = qApp->settings()->value(GROUP(Feeds), SETTING(Feeds::UpdateTimeout)).toInt();
if (unread_only) {

View File

@ -54,7 +54,7 @@ class GreaderNetwork : public QObject {
Feed::Status& error,
const QNetworkProxy& proxy);
QStringList itemIds(const QString& stream_id, bool unread_only, const QNetworkProxy& proxy);
QStringList itemIds(const QString& stream_id, bool unread_only, const QNetworkProxy& proxy, int max_count = -1);
// Stream contents for a feed/label/etc.
QList<Message> itemContents(ServiceRoot* root, const QList<QString>& stream_ids,