Skip to main content

Wolfram|Alpha module for Sopel IRC bot framework

Project description

Sopel Wolfram|Alpha module

Wolfram|Alpha module for Sopel IRC bot framework

Requirements

  • Sopel 6.x

  • wolframalpha 2.4+

Note: Some features are unavailable when run with wolframalpha 2.4. Support for wolframalpha 2.4 is deprecated and will be removed in a future release. All bugs must be reported against sopel-wolfram with wolframalpha 3.0+.

Installation

This package’s full name is sopel-modules.wolfram and it is listed on PyPI under that identifier.

The only supported installation method is via pip:

pip install sopel-modules.wolfram

Use pip3 as appropriate for your Python environment.

Development versions can be installed from GitHub via pip also:

pip install git+https://github.com/dgw/sopel-wolfram.git@master

Note that pip does not keep track of packages obtained from sources outside of PyPI, so pip install --upgrade sopel-modules.wolfram will not work for GitHub installations. Instead, to upgrade to the latest code, do:

pip install --upgrade git+https://github.com/dgw/sopel-wolfram.git@master

Configuration

Required

The Wolfram|Alpha API requires a key to be added in the bot’s config. Sign up for API access at http://developer.wolframalpha.com/portal/apisignup.html and add the App ID to Sopel’s configuration file:

[wolfram]
app_id = yourappidgoeshere

Optional

  • max_public: the number of lines over which results will be sent in NOTICE instead of to the channel (default: 10)

  • units: the measurements to use in results, metric or nonmetric (needs wolframalpha 3.0)

Usage

<User> .wa 2+2
<Sopel> [W|A] 2+2 = 4

<User> .wa python language release date
<Sopel> [W|A] Python | date introduced = 1991

<User> .wa airspeed velocity of an unladen swallow
<Sopel> [W|A] estimated average cruising airspeed of an unladen European swallow
        = 25 mph  (miles per hour)(asked, but not answered, about a general
        swallow in the 1975 film Monty Python and the Holy Grail)

A Note About Reloading

In versions of sopel up to 6.5.0 (the last tested version), reloading a third-party module installed from pip, such as wolfram, results in duplicated output. This is a known issue in sopel and is being worked on.

Workaround: After updating sopel-wolfram through pip, restart the bot at your earliest convenience to enable the latest code.

Support

Help with installing or configuring the module is available by pinging either dgw or maxpowa in #sopel on freenode. dgw is also available in #Kaede on Rizon.

Bugs and feature requests can be submitted to the GitHub issue tracker, preferably after first bringing them up on IRC.

Changelog

Ticket numbers in changelog entries can be looked up by visiting https://github.com/dgw/sopel-wolfram/issue/<number>

sopel-wolfram v0.4.1 “Kibou ni tsuite”

This release named in memory of LuckyNumber78, who changed lives every day simply by being her excitable, fun-loving self. She is missed by many.

Fixed:

  • max_public setting could cause errors because it was treated as a string (#21)

sopel-wolfram v0.4.0 “Mirai no kajitsu”

Added:

  • Support for wolframalpha 3.0 with transitional fallback to 2.4 (#11, #19; see README notes)

  • New configuration option max_public, a number defining the maximum number of lines that can be sent without using NOTICEs. Default: 5 (#13)

  • New configuration option units, to specify whether the API should return metric (default) or nonmetric measurements (#18; see #16)

Updated:

  • Threshold for using NOTICEs is now 5 lines, up from the previous default of 3

Fixed:

  • Non-ASCII text in output is no longer \:encoded (#15)

sopel-wolfram v0.3.1 “Nusumareta kuchibiru”

Updates:

  • Unicode-encode query to avoid UnicodeEncodeError on non-ASCII characters (#10)

sopel-wolfram v0.3.0 “So long!”

Updates:

  • Results longer than 3 lines will be sent via NOTICE instead of flooding channels (#8)

sopel-wolfram v0.2.1 “Mae shika mukanee”

Updates:

  • Output now split into multiple messages when line breaks are present (#4)

  • Tell pip we do not want wolframalpha 3.0 yet (#6)

sopel-wolfram v0.2.0 “Miraibashi”

Updates:

  • Try a lot harder to give useful output (#3)

  • Tell user to try again if an unspecified error occurs (empty error message)

Meta:

  • Cleanup: PEP8 & unused imports

  • Refactor to make future addition of integration tests easier

sopel-wolfram v0.1.2 “Switch”

Updates:

  • Shorten some error messages

  • Identify as “[W|A]” instead of “[Wolfram]” in output for brevity

  • Ensure all module output is prefixed

  • Add more examples to help output and README

Meta:

  • README now includes installation instructions and where to get help/report bugs

sopel-wolfram v0.1.1 “Already”

Updates:

  • Now outputs error if app_id is missing (#1)

Meta:

  • README reformatted (thanks @maxpowa)

  • Begin maintaining version history in NEWS file

sopel-wolfram v0.1.0 “Beginner”

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_modules.wolfram-0.4.1.tar.gz (7.0 kB view details)

Uploaded Source

Built Distributions

sopel_modules.wolfram-0.4.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

sopel_modules.wolfram-0.4.1-py2.py3-none-any.whl (10.4 kB view details)

Uploaded Python 2 Python 3

sopel_modules.wolfram-0.4.1-py2-none-any.whl (10.4 kB view details)

Uploaded Python 2

File details

Details for the file sopel_modules.wolfram-0.4.1.tar.gz.

File metadata

File hashes

Hashes for sopel_modules.wolfram-0.4.1.tar.gz
Algorithm Hash digest
SHA256 7ab7919553a0ff7ad5c35303ba3149fcd19e6e1cfeb201ecb5c36d4f8c4e332a
MD5 1d04c822c1582c9d074b593182299f02
BLAKE2b-256 23ab480c14cdd5956e72316c0b3709aae1105b4dda0773d58ece827fa5745ea9

See more details on using hashes here.

Provenance

File details

Details for the file sopel_modules.wolfram-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for sopel_modules.wolfram-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3501f6911190896fda1202293dcae400c8d23e69fe5157570d191614b26b52a6
MD5 51aa769c222ebe3b13675423a9d6fd67
BLAKE2b-256 86b73d9d55fec20e9194fb60bdbb6e3d4c8509bd81a97912b95220b6ca2e91a2

See more details on using hashes here.

Provenance

File details

Details for the file sopel_modules.wolfram-0.4.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for sopel_modules.wolfram-0.4.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 584a3efa9acd71caabbc692c4742353dbd6fede20b2cdf572778f92e49a7c7af
MD5 f9a1f3d79e2b5b0ad8970239e8a6d08c
BLAKE2b-256 52836ac4fcfe2e25e10bb44a97ca251f02559ae0195794ca9541fbe849fbb28f

See more details on using hashes here.

Provenance

File details

Details for the file sopel_modules.wolfram-0.4.1-py2-none-any.whl.

File metadata

File hashes

Hashes for sopel_modules.wolfram-0.4.1-py2-none-any.whl
Algorithm Hash digest
SHA256 55009fb2ff5619ba63d400c9122ec9283d5c3ff138d4885b0967e38f8b57ec8f
MD5 c5c052bb543d4d58b154605a95d0633d
BLAKE2b-256 3d3689f7a1ae9c3b3fdab9207c198a52aa36b45b96535cabedeeb4e82b08b1ec

See more details on using hashes here.

Provenance

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