Commit Graph

103 Commits

Author SHA1 Message Date
Justin Warren 17e0bdab0b
Force allowlist entries to always be severity 'noop'. 2023-01-14 11:00:21 +11:00
Justin Warren 6d4e18bbf6
Fixed bug in how DomainBlock defaults
handle reject_media, reject_reports.
2023-01-14 10:59:19 +11:00
Justin Warren 7a31c3380e
Added support for allowlists.
Updated docstring for merge_blocklists()
2023-01-14 10:44:08 +11:00
Justin Warren 894b133fbb
str2bool() now converts '' to False.
Added some extra debug logging of blocklist parsing.
2023-01-14 10:43:17 +11:00
Justin Warren 9817c99e40
Fixed bug in _asdict() of severity level. 2023-01-14 10:41:54 +11:00
Justin Warren 101803eff2
Merge pull request #21 from eigenmagic/measures-scopes
`admin:read` scope is needed to fetch measures
2023-01-14 07:15:14 +11:00
Justin Warren 2cec9e14c6
Updated documentation to explain need
for `admin:read` access to fetch followers stats.
2023-01-14 07:08:00 +11:00
Justin Warren 3d39ae7e87
Merge pull request #19 from eigenmagic/release-v0.4.0
Release v0.4.0
2023-01-13 19:34:43 +11:00
Justin Warren 1323678673
Add last few changes to changelog for release. 2023-01-13 19:14:40 +11:00
Justin Warren 69c28f1a3f
add DomainBlock type hint to update_known_block().
Use ._asdict() to get info to pass to add block API call.
2023-01-13 17:31:50 +11:00
Justin Warren a718af5a0b
Fix DomainBlock.id usage during __iter__() 2023-01-13 17:30:41 +11:00
Justin Warren 55dad3fa32
Aligned API call rate limit with server default. 2023-01-13 17:12:23 +11:00
Justin Warren 9fb575bb2f
Starting to prep for v0.4.0 release. 2023-01-12 15:49:41 +11:00
Justin Warren ee9625d075
Updated README documentation. 2023-01-12 10:41:01 +11:00
Justin Warren c89edffa69
Merge pull request #16 from eigenmagic/rapidblock-support
Refactor codebase to support multiple blocklist formats
2023-01-12 09:51:22 +11:00
Justin Warren e0d40b5861
Fixed bug in severity change detection. 2023-01-12 09:31:16 +11:00
Justin Warren 327a44d907
Removed redundant global vars.
Refactored fetch from URLs and instances.
Change API delay to be in calls per hour.
Improved check_followed_severity() behaviour.
Updated sample config to include new format.
Added support for per-instance-source import_fields.
BlockSeverity of 'suspend' implies reject_media and reject_reports.
2023-01-12 09:09:06 +11:00
Justin Warren 66f0373cbe
Added boolean fields like 'reject_reports' to mergeplan handling.
Clarified logic in apply_mergeplan() for boolean fields.
Added tests for boolean merge situations.
2023-01-12 08:08:09 +11:00
Justin Warren 0a6eec4bf2
Improved comment merging. 2023-01-12 07:39:17 +11:00
Justin Warren 10011a5ffb
Refactored to add a DomainBlock object.
Refactored to use a BlockParser structure.
Added ability to limit max severity per-URL source.
Improved method for checking if changes are needed.
2023-01-12 07:02:48 +11:00
Justin Warren ea5e7d01d9
Merge pull request #14 from eigenmagic/v0.3.0
v0.3.0 release
2023-01-11 08:30:52 +11:00
Justin Warren 13d26a4ded
Updated changelog. 2023-01-11 08:29:20 +11:00
Justin Warren ca9d958b9d
Added CHANGELOG.md 2023-01-11 08:27:15 +11:00
Justin Warren f37ab70252
Bumped version to 0.3.0 ready for release.
Changed min Python version to v3.10.
2023-01-11 08:27:01 +11:00
Justin Warren edbc418e5e
Merge pull request #13 from eigenmagic/timeouts
Added timeout to requests calls
2023-01-10 18:50:33 +11:00
Justin Warren 478bab8d34
Merge pull request #12 from eigenmagic/version-arg
Add args to show version information.
2023-01-10 18:49:38 +11:00
Justin Warren 1d0649ace5
Add args to show version information. 2023-01-10 13:16:23 +11:00
Justin Warren 23b8833a67
Added timeout to requests calls 2023-01-10 13:06:53 +11:00
Justin Warren dfaf578356
Merge pull request #11 from eigenmagic/user-agent
Set User-Agent to FediBlockHole
2023-01-10 09:15:48 +11:00
Justin Warren 04d9eea827
Set User-Agent to FediBlockHole 2023-01-10 09:13:50 +11:00
Justin Warren 68a2c93085
Updated README. 2023-01-10 09:00:15 +11:00
Justin Warren 9b187807e4
Merge pull request #10 from eigenmagic/package
Package tool for PyPI/pip distribution.
2023-01-10 08:55:15 +11:00
Justin Warren 4ab369f95b
Package tool for PyPI/pip distribution. 2023-01-10 08:53:54 +11:00
Justin Warren bb84f1e239
Merge pull request #9 from eigenmagic/gentleblock
Block instances 'gently' so people on them have time to escape.
2023-01-09 17:01:46 +11:00
Justin Warren 55184210d4
Add ability to set max severity level if
an instance has followers of accounts on
a to-be-blocked domain.
Refactored the change detection code.
Fixed a bug in config of intermediate blocklists saving.
Updated README documentation.
Updated sample config.

Addresses #5
2023-01-09 16:51:30 +11:00
Justin Warren a134870f14
Merge pull request #8 from eigenmagic/public-block-fetch
Read from instances that publish domain_blocks.
2023-01-09 12:50:58 +11:00
Justin Warren 4ef84b5275
Added ability to read domain_blocks from
instances that make the list public.
Skip obfuscated domains when building the merged blocklist.
Removed some redundant commented code.
2023-01-09 12:48:11 +11:00
Justin Warren 4bf68019fb
Merge pull request #4 from eigenmagic/comment-join
Change comment merge join to use ', ' not '\n'.
2022-12-21 09:08:29 +11:00
Justin Warren 8bef9d84d5
Change comment merge join to use ', ' not '\n'. 2022-12-21 09:01:27 +11:00
Justin Warren baf7bbfef4
Merge pull request #3 from eigenmagic/export-fields
Control import and export fields
2022-12-20 17:32:58 +11:00
Justin Warren f55600ae6d
Updated README with more detailed config help.
Updated sample config file with new options.
2022-12-20 17:24:56 +11:00
Justin Warren da68b9fc29
Added export_fields option.
Added import_fields option.
Removed --include_public_comments option as redundant.
2022-12-20 16:56:34 +11:00
Justin Warren af16f43dc5
Merge pull request #2 from eigenmagic/public-only
Keep private_comment private
2022-12-20 15:41:12 +11:00
Justin Warren 268f1ef2b0
Changed default to exclude private_comment field
from exports and imports.
Added commandline and config option to
--include-public-comments
Fixes: #1
2022-12-20 15:35:51 +11:00
Justin Warren 68d79dd253
Removed debugging var from apply_mergeplan() 2022-12-20 14:56:24 +11:00
Justin Warren 2fef34907f
Merge branch 'mergeplan' 2022-12-20 14:44:14 +11:00
Justin Warren 8fc8160f82
More advanced mergeplan handling.
Support for 'noop' severity for removing a block.
Support for mergeplan as commandline parameter.
Support for mergeplan as config file option.
Added --dryrun commandline option.
2022-12-20 14:29:23 +11:00
Justin Warren 795b592fbe
Changed demo blocklist bools to Python style strings. 2022-12-20 13:31:25 +11:00
Justin Warren 73df391c01
Change license to AGPL3 2022-12-20 13:27:16 +11:00
Justin Warren ea58d34c14
Added helper error if the remote URL
doesn't return a valid CSV blocklist.
Updated sample config to use valid raw github URL.
2022-12-20 10:20:20 +11:00