Browse Source

Groundwork for filtering rules

rpm
J. King 3 years ago
parent
commit
c43d0dcae3
  1. 9
      docs/en/030_Supported_Protocols/005_Miniflux.md
  2. 3
      sql/MySQL/6.sql
  3. 3
      sql/PostgreSQL/6.sql
  4. 7
      sql/SQLite3/6.sql

9
docs/en/030_Supported_Protocols/005_Miniflux.md

@ -10,7 +10,7 @@
<dt>API endpoint</dt> <dt>API endpoint</dt>
<dd>/v1/</dd> <dd>/v1/</dd>
<dt>Specifications</dt> <dt>Specifications</dt>
<dd><a href="https://miniflux.app/docs/api.html">API Reference</a></dd> <dd><a href="https://miniflux.app/docs/api.html">API Reference</a>, <a href="https://miniflux.app/docs/rules.html#filtering-rules">Filtering Rules</a></dd>
</dl> </dl>
The Miniflux protocol is a fairly well-designed protocol supporting a wide variety of operations on newsfeeds, folders (termed "categories"), and articles; it also allows for user administration, and native OPML importing and exporting. Architecturally it is similar to the Nextcloud News protocol, but is generally more efficient and has more capabilities. The Miniflux protocol is a fairly well-designed protocol supporting a wide variety of operations on newsfeeds, folders (termed "categories"), and articles; it also allows for user administration, and native OPML importing and exporting. Architecturally it is similar to the Nextcloud News protocol, but is generally more efficient and has more capabilities.
@ -33,6 +33,13 @@ Miniflux version 2.0.26 is emulated, though not all features are implemented
- Only the URL should be considered reliable in feed discovery results - Only the URL should be considered reliable in feed discovery results
- The "All" category is treated specially (see below for details) - The "All" category is treated specially (see below for details)
- Category names consisting only of whitespace are rejected along with the empty string - Category names consisting only of whitespace are rejected along with the empty string
- Filtering rules may not function identically (see below for details)
# Behaviour of filtering (block and keep) rules
The Miniflux documentation gives only a brief example of a pattern for its filtering rules; the allowed syntax is described in full [in Google's documentation for RE2](https://github.com/google/re2/wiki/Syntax). Being a PHP application, The Arsse instead accepts [PCRE syntax](http://www.pcre.org/original/doc/html/pcresyntax.html) (or since PHP 7.3 [PCRE2 syntax](https://www.pcre.org/current/doc/html/pcre2syntax.html)), specifically in UTF-8 mode. Delimiters should not be included, and slashes should not be escaped; anchors may be used if desired. For example `^(?i)RE/MAX$` is a valid pattern.
For convenience the patterns are tested after collapsing whitespace. Unlike Miniflux, The Arsse tests the patterns against an article's author-supplied categories if they do not match its title.
# Special handling of the "All" category # Special handling of the "All" category

3
sql/MySQL/6.sql

@ -6,6 +6,9 @@
alter table arsse_tokens add column data longtext default null; alter table arsse_tokens add column data longtext default null;
alter table arsse_subscriptions add column keep_rule longtext default null;
alter table arsse_subscriptions add column block_rule longtext default null;
alter table arsse_users add column num bigint unsigned unique; alter table arsse_users add column num bigint unsigned unique;
alter table arsse_users add column admin boolean not null default 0; alter table arsse_users add column admin boolean not null default 0;
create temporary table arsse_users_existing( create temporary table arsse_users_existing(

3
sql/PostgreSQL/6.sql

@ -6,6 +6,9 @@
alter table arsse_tokens add column data text default null; alter table arsse_tokens add column data text default null;
alter table arsse_subscriptions add column keep_rule text default null;
alter table arsse_subscriptions add column block_rule text default null;
alter table arsse_users add column num bigint unique; alter table arsse_users add column num bigint unique;
alter table arsse_users add column admin smallint not null default 0; alter table arsse_users add column admin smallint not null default 0;
create temp table arsse_users_existing( create temp table arsse_users_existing(

7
sql/SQLite3/6.sql

@ -6,8 +6,11 @@
-- This is a speculative addition to support OAuth login in the future -- This is a speculative addition to support OAuth login in the future
alter table arsse_tokens add column data text default null; alter table arsse_tokens add column data text default null;
-- Add num and admin columns to the users table -- Add columns to subscriptions to store "keep" and "block" filtering rules from Miniflux
-- In particular this adds a numeric identifier for each user, which Miniflux requires alter table arsse_subscriptions add column keep_rule text default null;
alter table arsse_subscriptions add column block_rule text default null;
-- Add numeric identifier and admin columns to the users table
create table arsse_users_new( create table arsse_users_new(
-- users -- users
id text primary key not null collate nocase, -- user id id text primary key not null collate nocase, -- user id

Loading…
Cancel
Save