Skip to main content

URL auto title plugin for Sopel

Project description

This plugin allows the bot to fetch URLs from messages and to reply with each URL’s title from the HTML content, if possible. You can trigger that with the .title <url> command:

[08:42] Exirel: .title https://sopel.chat
[08:42] Sopel: xrl: Sopel - The Python IRC Bot - Sopel | sopel.chat

And if enable_auto_title is enabled, the plugin will react to URLs as if the .title command was used:

[08:42] Exirel: Read the doc at https://sopel.chat/docs
[08:42] Sopel: [url] Sopel 8.0.4 documentation | sopel.chat

Install

The recommended way to install this plugin is to use pip:

$ python -m pip install sopel-url

Note that this plugin requires Python 3.8+ and Sopel 8.0+. It won’t work on Python versions that are not supported by the version of Sopel you are using.

Configuration

This plugin defines the [url] section of the configuration file, with the following directives:

  • enable_auto_title (yes/no): Enable (yes, the default) or disable (no) auto-title.

  • exclude (list): A list of regular expressions for URLs for which the title should not be shown. For example https?://git\.io/.*

  • exclusion_char (default !): A character (or string) which, when immediately preceding a URL, will stop the URL’s title from being shown.

  • shorten_url_length (int, default 0): If greater than 0, the title fetcher will include a TinyURL version of links longer than this many characters.

  • enable_private_resolution (yes/no): Enable (yes) or disable (no, the default) requests to private and local network IP addresses.

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_url-1.0.0.tar.gz (15.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sopel_url-1.0.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

Details for the file sopel_url-1.0.0.tar.gz.

File metadata

  • Download URL: sopel_url-1.0.0.tar.gz
  • Upload date:
  • Size: 15.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sopel_url-1.0.0.tar.gz
Algorithm Hash digest
SHA256 098064c3c781a16594d0649106d6aae7853f4057eebe28104860937535805adb
MD5 09ea7a9e569ed8b0a961f45fcb9fc579
BLAKE2b-256 ba5b9f27658e3e7f7d9cfac738fccd80e49bb7f6a41c238b5d263e4a5602e5d5

See more details on using hashes here.

Provenance

The following attestation bundles were made for sopel_url-1.0.0.tar.gz:

Publisher: pypi.yml on sopel-irc/sopel-url

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sopel_url-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sopel_url-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for sopel_url-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 399880e9f1cf81f87265de5d93989f44353bfba5027ad0a2608e094957c5f504
MD5 586681a6be14457e647f6f3733960c19
BLAKE2b-256 f13caf853577c8119798a1b4e5d9db4cef7ef4a067c8993287f9b3eb813750d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for sopel_url-1.0.0-py3-none-any.whl:

Publisher: pypi.yml on sopel-irc/sopel-url

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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