Merge pull request #45 from eigenmagic/release-0.4.3
Merge in release 0.4.3 changes.
This commit is contained in:
commit
fb0ac934d0
16
CHANGELOG.md
16
CHANGELOG.md
|
@ -6,7 +6,21 @@ This project uses [Semantic Versioning] and generally follows the conventions of
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
- Planning to add allowlist thresholds as noted in #28
|
## [v0.4.3] - 2023-02-13
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Added Mastodon public API parser type because #33 (9fe9342)
|
||||||
|
- Added ability to set scheme when talking to instances (9fe9342)
|
||||||
|
- Added tests of comment merging. (fb3a7ec)
|
||||||
|
- Added blocklist thresholds. (bb1d89e)
|
||||||
|
- Added logging to help debug threshold-based merging. (b67ff0c)
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Dropped minimum Python version to 3.6 (df3c16f)
|
||||||
|
- Don't merge comments if new comment is empty. (b8aa11e)
|
||||||
|
- Tweaked comment merging to pass tests. (fb3a7ec)
|
||||||
|
|
||||||
## [v0.4.2] - 2023-01-19
|
## [v0.4.2] - 2023-01-19
|
||||||
|
|
||||||
|
|
25
README.md
25
README.md
|
@ -81,17 +81,16 @@ admin to add a new Application at
|
||||||
`https://<instance-domain>/settings/applications/` and then tell you the access
|
`https://<instance-domain>/settings/applications/` and then tell you the access
|
||||||
token.
|
token.
|
||||||
|
|
||||||
The application needs the `admin:read:domain_blocks` OAuth scope, but
|
The application needs the `admin:read:domain_blocks` OAuth scope. You can allow
|
||||||
unfortunately this scope isn't available in the current application screen
|
full `admin:read` access, but be aware that this authorizes someone to read all
|
||||||
(v4.0.2 of Mastodon at time of writing, but this has been fixed in the main
|
the data in the instance. That's asking a lot of a remote instance admin who
|
||||||
branch).
|
just wants to share domain_blocks with you.
|
||||||
|
|
||||||
You can allow full `admin:read` access, but be aware that this authorizes
|
The `admin:read:domain_blocks` scope is available as of Mastodon v4.1.0, but for
|
||||||
someone to read all the data in the instance. That's asking a lot of a remote
|
earlier versions admins will need to use the manual method described below.
|
||||||
instance admin who just wants to share domain_blocks with you.
|
|
||||||
|
|
||||||
For now, you can ask the instance admin to update the scope in the database
|
You can update the scope for your application in the database directly like
|
||||||
directly like this:
|
this:
|
||||||
|
|
||||||
```
|
```
|
||||||
UPDATE oauth_applications as app
|
UPDATE oauth_applications as app
|
||||||
|
@ -136,8 +135,12 @@ chmod o-r <configfile>
|
||||||
```
|
```
|
||||||
|
|
||||||
You can also grant full `admin:write` scope to the application, but if you'd
|
You can also grant full `admin:write` scope to the application, but if you'd
|
||||||
prefer to keep things more tightly secured you'll need to use SQL to set the
|
prefer to keep things more tightly secured, limit the scope to
|
||||||
scopes in the database and then regenerate the token:
|
`admin:read:domain_blocks`.
|
||||||
|
|
||||||
|
Again, this scope is only available in the application config screen as of
|
||||||
|
Mastodon v4.1.0. If your instance is on an earlier version, you'll need to use
|
||||||
|
SQL to set the scopes in the database and then regenerate the token:
|
||||||
|
|
||||||
```
|
```
|
||||||
UPDATE oauth_applications as app
|
UPDATE oauth_applications as app
|
||||||
|
|
|
@ -56,6 +56,24 @@ blocklist_instance_destinations = [
|
||||||
# The 'min' mergeplan will use the lightest severity block found for a domain.
|
# The 'min' mergeplan will use the lightest severity block found for a domain.
|
||||||
# mergeplan = 'max'
|
# mergeplan = 'max'
|
||||||
|
|
||||||
|
## Optional threshold-based merging.
|
||||||
|
# Only merge in domain blocks if the domain is mentioned in
|
||||||
|
# at least `threshold` blocklists.
|
||||||
|
# `merge_thresold` is an integer, with a default value of 0.
|
||||||
|
# The `merge_threshold_type` can be `count` or `pct`.
|
||||||
|
# If `count` type is selected, the threshold is reached when the domain
|
||||||
|
# is mentioned in at least `merge_threshold` blocklists. The default value
|
||||||
|
# of 0 means that every block in every list will be merged in.
|
||||||
|
# If `pct` type is selected, `merge_threshold` is interpreted as a percentage,
|
||||||
|
# i.e. if `merge_threshold` = 20, blocks will only be merged in if the domain
|
||||||
|
# is present in at least 20% of blocklists.
|
||||||
|
# Percentage calculated as number_of_mentions / total_number_of_blocklists.
|
||||||
|
# The percentage method is more flexibile, but also more complicated, so take care
|
||||||
|
# when using it.
|
||||||
|
#
|
||||||
|
# merge_threshold_type = 'count'
|
||||||
|
# merge_threshold = 0
|
||||||
|
|
||||||
## Set which fields we import
|
## Set which fields we import
|
||||||
## 'domain' and 'severity' are always imported, these are additional
|
## 'domain' and 'severity' are always imported, these are additional
|
||||||
##
|
##
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
[project]
|
[project]
|
||||||
name = "fediblockhole"
|
name = "fediblockhole"
|
||||||
version = "0.4.2"
|
version = "0.4.3"
|
||||||
description = "Federated blocklist management for Mastodon"
|
description = "Federated blocklist management for Mastodon"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = {file = "LICENSE"}
|
license = {file = "LICENSE"}
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.6"
|
||||||
keywords = ["mastodon", "fediblock"]
|
keywords = ["mastodon", "fediblock"]
|
||||||
authors = [
|
authors = [
|
||||||
{name = "Justin Warren"}, {email = "justin@eigenmagic.com"}
|
{name = "Justin Warren"}, {email = "justin@eigenmagic.com"}
|
||||||
|
@ -17,6 +17,10 @@ classifiers = [
|
||||||
"Natural Language :: English",
|
"Natural Language :: English",
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"Programming Language :: Python :: 3.10",
|
"Programming Language :: Python :: 3.10",
|
||||||
|
"Programming Language :: Python :: 3.9",
|
||||||
|
"Programming Language :: Python :: 3.8",
|
||||||
|
"Programming Language :: Python :: 3.7",
|
||||||
|
"Programming Language :: Python :: 3.6",
|
||||||
]
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"requests",
|
"requests",
|
||||||
|
|
Loading…
Reference in New Issue