sopel-amputator
Sopel plugin that detects AMP links and finds their canonical forms using AmputatorBot
Installing
Releases are hosted on PyPI, so after installing Sopel, all you need is pip:
$ pip install sopel-amputator
Configuring
The easiest way to configure sopel-amputator is via Sopel's configuration
wizard—simply run sopel-plugins configure amputator and enter the values for
which it prompts you.
Individual settings are described below.
ignore_domains (list[str])
This is a list of hostnames which sopel-amputator will ignore, even if they
match one of the common AMP substrings it looks for. By default it contains a
set of ignored domains from the AmputatorBot project.
Setting this value overrides the default, so make sure to also enter any entries that you would like to keep from the default list.
guess_and_check (bool, default true)
The default behavior for AMPutatorBot's "guess and check" feature, which tries to guess canonical URLs when the page doesn't provide one in its HTML.
Behavior can be changed per-channel by chanops and bot admins using the
.ampguess command on IRC.
skip_safe_filetypes (bool, default true)
Whether to skip AMP-checking links that look like they point to safe MIME types, e.g. media files.
Changelog
0.3.0
- Guess MIME type of links (by file extension, if present) and skip "safe" types
that are probably not wrapped in AMP [#3]
- Configurable with
skip_safe_filetypesconfig setting.
- Configurable with
- Added configuration for AMPutatorBot's "guess and check" function, both a
global setting (
guess_and_check) and a per-channel override (newampguesscommand for chanops and bot admins) [#2]
Under the hood:
- Require stable Sopel 8.x, no more pre-releases
- Updated package metadata & release workflow
0.2.1
- Added Twitter/X domains to default ignore list
0.2.0
Under-the-hood improvements:
- More robust domain matching against ignore list
- Includes distinct log messages for exact matches vs. subdomain matches
- More granular error handling
- Better error logging
- Migrated package metadata from
setup.py+setup.cfgtopyproject.toml
0.1.0
Initial release.
Pending conversion from setup.py+setup.cfg template to newer style package
using pyproject.toml—plus some other features on the todo list—but the basics
are here:
- Detect likely AMP links
- Call AmputatorBot API for the canonical URL of each suspected AMP link
- Skip links from a configurable list of ignored domains
- Silently fail if no better URL is found
Metadata
Release files for sopel-amputator 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| sopel_amputator-0.3.0.tar.gz | 6.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| sopel_amputator-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 12.3 kB
Release files / sopel_amputator-0.3.0.tar.gz
| Download URL | sopel_amputator-0.3.0.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
927bca97b1d3dfc002589322fc4c4dd497239eb9b5aa36c16243052d3198f582
|
|
BLAKE2b-256 checksum How to use checksums |
ebc1c03096746b87fa7c3ce94846d9dd56064b828a85bf566883604ad9d61387
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 20, 2025.
Transparency logRelease files / sopel_amputator-0.3.0-py3-none-any.whl
| Download URL | sopel_amputator-0.3.0-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
80f3a330f659333328a4acba5d905a46b61a7096552a5748469de35c0996a276
|
|
BLAKE2b-256 checksum How to use checksums |
4ab23012431bab1a9525c9518dbe725c235646a52ae74f8a71600e44d308e52e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 20, 2025.
Transparency log