WhatsAmi - ARexx plugins and the WHATSAMI ARexx port
====================================================

PLUGINS
-------
A plugin is an ARexx script in the "Plugins" drawer next to WhatsAmi, named
<Id>.rexx (no spaces). Turn plugins on in Settings -> Plugins; every plugin
gets an icon in the left bar under "Status". Clicking the icon shows the
plugin's panel in place of the chat list (click it again, or Chats, to go back).

The first comment of the script describes the plugin (keys may have -PL/-EN/-DE
language variants):

  /* WhatsAmi plugin
  WA-NAME: Weather            name in the left bar tooltip and in Settings
  WA-NAME-PL: Pogoda
  WA-ICON: sun                sun, rss, cpu, reply, chat, heart, person, doc,
                              play, location - or up to 3 letters, e.g. "TV"
  WA-DESC: Weather now and for 3 days
  WA-INTERVAL: 1800           refresh every N seconds (0 = only when opened)
  WA-OPEN: 1                  also send OPEN when the panel is opened
  */

WhatsAmi starts the script with RX (RexxMast is started when needed):

  rx Plugins/<Id>.rexx <Id> <EVENT> [argument]

  REFRESH         fill the panel (first opening, the Refresh button, interval)
  CLICK <arg>     the user clicked an item with the action "run:<arg>"
  OPEN            the panel was opened (only with WA-OPEN: 1)

Read them with:   PARSE ARG id event arg
Then talk to WhatsAmi with ADDRESS WHATSAMI and OPTIONS RESULTS.
Texts may be UTF-8 (recommended) or in the Amiga charset; HTML entities
(&amp; &#233; ...) are decoded.

PANEL COMMANDS
--------------
  PANEL <id> CLEAR             remove all lines
  PANEL <id> TITLE <text>      panel title (default: WA-NAME)
  PANEL <id> STATUS <text>     small line under the title
  PANEL <id> HEAD <text>       bold heading
  PANEL <id> TEXT <text>       text (wrapped)
  PANEL <id> ITEM <action> <text>   clickable item; action is one word:
                                 url:<address>  open in the web browser
                                 insert         put <text> into the message field
                                 send           send <text> to the open chat
                                 run:<arg>      run the script with CLICK <arg>
                                 none           nothing
  PANEL <id> SEP               separator line
  PANEL <id> BADGE <n>         number on the left bar icon (0 = none)
  PANEL <id> DONE              refresh finished ("Refreshing..." disappears)

OTHER COMMANDS                                  RESULT
--------------
  VERSION                                       WhatsAmi version, e.g. 1.06
  LANG                                          pl / en / de
  HTTPGET <https://address> <file>              HTTP status (200 = ok)
        Downloads with WhatsAmi's own AmiSSL in the background (the window
        keeps working). https only, redirects are not followed.
  SEND <who> <text>                             OK (rc 5 = not connected)
        who: CURRENT, a chat name, a phone number with country code, or a JID
  INSERT <text>                                 puts text into the message field
  SCREENSHOT <file>                             saves the front screen as JPEG
  SENDFILE <file> [PHOTO]                       sends a file (or a picture as a photo) to the open chat
  OPENCHAT <who>                                JID of the opened chat
  OPENPANEL <id>                                shows the panel of plugin <id>
  OPENURL <address>                             opens the web browser
  CURRENT / CURRENTNAME                         JID / name of the open chat
  UNREAD                                        number of unread chats
  STATUS <text>                                 text in the status bar
  SHOW                                          brings the window to front
  ASK <title>|<label>|<default>                 text typed by the user (UTF-8);
                                                rc 5 = cancelled
  PORT                                          port name (WHATSAMI)

Example (send from a Shell):
  rx "ADDRESS WHATSAMI; 'SEND +48600100200 Hello from ARexx'"

The included plugins (Pogoda = weather, RSS, Odpowiedzi = quick replies,
Amiga = system status) are plain ARexx - copy one and change it.
Their settings are kept next to them (*.cfg, *.txt, *.state).
