Skip to main content

A module and command to turn English into Pirate speak.

Project description

Arrr.py - Pirate Speak for Python

A simple script / module to turn plain English into Pirate speak. Arrr.

Someone mentioned something called “Pirate Python”, I idly wondered if anyone had made an English to Pirate-ish module/command written in Python (they hadn’t), I realised I had a burning desire to make one, and things got out of hand. :-)

We have an entirely serious code of conduct and a not-so-serious code of mis-conduct for those of a more Piratical disposition.

Installation

To install simply type:

$ pip install arrr

…and the package will download from PyPI. If you wish to upgrade to the latest version, use the following command:

$ pip install --no-cache --upgrade arrr

Command Usage

Once installed, you’ll find you have a pirate command to use in your shell.

To read the (non-Pirate friendly) help, simply type:

$ pirate --help

or:

$ pirate -h

To translate plain English into something Pirate-ish simply call the command followed by some English sentence:

$ pirate hello there. how are you today?
Ahoy there. Weigh anchor and hoist the mizzen! How are ye today?

The pirate command will reply with a Pirate-ish equivalent (as shown above).

Using the API

The arrr module’s API is fully documented below. All you really need is to import the translate function and use that to return Pirate-ish sentences from a given input in English:

from arrr import translate


english = "Hello there. How are you?"
pirate = translate(english)
print(pirate)

The script above will print output similar to that for the command-line usage example shown above.

Development

The source code is hosted in GitHub. Please feel free to fork the repository and contribute. Assuming you have Git installed you can download the code from the canonical repository with the following command:

$ git clone https://github.com/ntoll/arrr.git

Ensure you have the correct dependencies for development installed by creating a virtualenv and running:

$ pip install -r requirements.txt

Pull requests are most welcome! Honestly, the arrr module was cobbled together in about 5 minutes and I went overboard (geddit?) with creating a simple yet well packaged and documented project so arrr can act as a good example for beginner developers.

If you find any bugs, submit a new issue.

Release History

1.0.0.beta.3

  • Better arrrg parsing contributed by Tony “buccaneer baloney” Shaw.

  • Corrections of speeling mistaiks by Esteve “make mine an Aranjuez” Fernandez.

1.0.0.beta.2

  • Major code optimizations by old salty sea dog Terry Jones.

  • A more terrifying logo by Cap’n Steve “Inkspot” Hawkes.

  • Addition of a code of mis-conduct (for Pirates) by terror of the seas, Tim “No beard” Golden.

1.0.0.beta.1

  • Minor documentation fixes.

  • Minor corrections in the code.

1.0.0.alpha.1

  • Initial release.

  • Very simple implementation.

  • Documentation.

  • No tests.

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

arrr-1.0.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

arrr-1.0.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: arrr-1.0.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for arrr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 365b15d62813002f2f9dcbe0ae6744a5718617d44aac12390e996e8b055baeed
MD5 da9794430738d6af6189f202495efa47
BLAKE2b-256 8ce48f5de0fe5e7021df94a13d966ed69da1469fe0e708349dc5e466bb5a55ec

See more details on using hashes here.

File details

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

File metadata

  • Download URL: arrr-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.2

File hashes

Hashes for arrr-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7dfdbf36d04ac75368ed2cb896fd578ac965f05217774b9869db10e8af442e87
MD5 d6f4bcdd7dc78a117ff95ed039d4634f
BLAKE2b-256 7915a8494b0687fc8c65030c962cee3216fee6334fcc324685881d00d9764ab2

See more details on using hashes here.

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