cmus_notify package

Submodules

cmus_notify.cmus_notify module

Contains the main code of the package.

cmus_notify.cmus_notify.main()

Main entry point of the package.

cmus_notify.configurations module

Contains the code related to configuration file parsing.

cmus_notify.configurations.parse_configuration_file()

Parse the configuration file. If there are any command-line arguments, override the configuration values with the one from the command line.

Returns:The various options
Return type:dict

cmus_notify.constants module

Contains the constants used by the library.

cmus_notify.formatters module

Contains code to format the current status of Cmus.

cmus_notify.formatters.format_notification_message(status_information, **kwargs)

Format the cmus_notify.types.StatusInformation to be send.

Parameters:status_information (cmus_notify.types.StatusInformation) – The information to be sent

cmus_notify.notifications module

Contains code related to notifications.

class cmus_notify.notifications.Notifier(application_name)

Bases: object

Notifies the system with a notification.

Note

Currently, it only works on Linux

send_notification(title, text, **kwargs)

Send the notification to the OS with a Python library.

Parameters:
  • title (str) – The message’s title
  • text (str) – The message’s body

cmus_notify.options module

Contains the code related to options parsing.

cmus_notify.options.parse_arguments()

Create an argparse.ArgumentParser and parse the command-line arguments.

cmus_notify.parsers module

Contains the code related to parsing Cmus output.

cmus_notify.parsers.parse_status_information(informations)

Parse the status informations from the informations list.

Parameters:informations (str) – The list containing the various song’s information
Returns:collections.defaultdict

cmus_notify.types module

Contains the types related to Cmus output.

class cmus_notify.types.StatusInformation(**kwargs) → None

Bases: object

The status information of Cmus

Module contents