mirror of
https://code.mensbeam.com/MensBeam/Arsse.git
synced 2024-12-22 13:12:41 +00:00
Groundwork for filtering rules
This commit is contained in:
parent
95a2018e75
commit
c43d0dcae3
4 changed files with 19 additions and 3 deletions
|
@ -10,7 +10,7 @@
|
|||
<dt>API endpoint</dt>
|
||||
<dd>/v1/</dd>
|
||||
<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>
|
||||
|
||||
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
|
||||
- The "All" category is treated specially (see below for details)
|
||||
- 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
|
||||
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
|
||||
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 admin boolean not null default 0;
|
||||
create temporary table arsse_users_existing(
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
|
||||
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 admin smallint not null default 0;
|
||||
create temp table arsse_users_existing(
|
||||
|
|
|
@ -6,8 +6,11 @@
|
|||
-- This is a speculative addition to support OAuth login in the future
|
||||
alter table arsse_tokens add column data text default null;
|
||||
|
||||
-- Add num and admin columns to the users table
|
||||
-- In particular this adds a numeric identifier for each user, which Miniflux requires
|
||||
-- Add columns to subscriptions to store "keep" and "block" filtering rules from Miniflux
|
||||
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(
|
||||
-- users
|
||||
id text primary key not null collate nocase, -- user id
|
||||
|
|
Loading…
Reference in a new issue