Skip to main content

Adium Shell

https://pypip.in/v/adium-sh/badge.png

Adium Shell (adium-sh) is a command-line tool and Python wrapper for Adium.

Description

adium-sh provides shell utilities and Python wrapper based on AppleScript support of Adium.

Feature

The current features are:

  • Set default service and account

  • Send messages using exact account name or alias

  • Receive and reply to messages using patterns or external API (SimSimi currently supported)

  • React to events

Installation

$ pip install adium-sh

Usage

You must specify the account and service to associate with the current use, either as command-line arguments or in the config file. When specifying them as arguments, you must put them before the sub-commands.

Send messages

Send a message using account name:

$ adiumsh -s GTalk -t yourname@gmail send -b buddy@gmail.com
Hello, there
<<EOF

Send a message using alias:

$ adiumsh -s GTalk -t yourname@gmail.com send -a 'John Smith'
Hello, there
<<EOF

Set default configuration file at ~/.adiumsh:

[default]
service = GTalk
account = yourname@gmail.com

Then you can send messages without specifying -s/--service and -t/--account:

$ adiumsh send -a 'John Smith'

You can also pass as argument your message:

$ adiumsh send -a 'John Smith' -m 'Hello, there'

Receive messages

You must specify a chat method to receive messages. By default, adium-sh uses “Simple Chat”, which basically replies to received messages according to the patterns you set. You must set the patterns in the config file, possibly like the following settings:

[default]
service = GTalk
account = yourname@gmail.com

[chat-default]
type = wildcard
patterns =
    *hello*: hi
    *what*: sorry
    *: I'm not available now

Then, you can invoke the “receive” sub-command with the -c/--chat arguments:

$ adiumsh receive -c default

The patterns is a list of string pairs where each pair is separated by a colon. The string to the left of the colon is the pattern against which the received text will be matched, and the right one is the corresponding reply text. There is also a “type” option in the chat section, which defaults to “wildcard” that uses globbing pattern matching; another value to it is “regex”, which uses regular expression.

You can also use “SimSimi Chat” which hits the SimSimi API with the messages received. You have to set the API key in the config file and the key type (“trial”, which is default, or “paid”):

[chat-simi]
simi-key = some-really-long-key
simi-key-type = trial

Then, invoke “receive” with this chat from command line:

$ adiumsh receive -c simi

Set the default chat in the default settings:

[default]
service = GTalk
account = yourname@gmail.com
chat = default

[chat-default]
patterns =
    *hello*: hi
    *what*: sorry
    *: I'm not available now

[chat-another]
patterns =
    *: not here

Now you can also switch between chats from the command line other than the default:

$ adiumsh receive -c another

TODO

  • Complete Python wrapper API to AppleScript support

  • Exhaustive commands based on the wrapper

Metadata

Release files for adium-sh 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for adium-sh 0.2.4
File Size Uploaded Provenance
adium-sh-0.2.4.tar.gz 11.4 kB Without provenance Details

Release files / adium-sh-0.2.4.tar.gz

Download URL adium-sh-0.2.4.tar.gz
Size 11.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5a8a3d7a9bd9d43a2a9096d697a639116bbc1de52c3c7415029d2dd0743e2459
BLAKE2b-256 checksum
How to use checksums
8b68e06599b0198c34b91d90136ad16b12193d6cf2924abcd6577a3df7549568
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for adium-sh 0.2.4

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page