Skip to main content

Sopel plugin that detects AMP links and finds their canonical forms using AmputatorBot

Project description

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

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.

The default list is overridden when setting this value, so make sure to also enter any of the default entries you want to keep.

Changelog

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.cfg to pyproject.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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sopel_amputator-0.2.0.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

sopel_amputator-0.2.0-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page