De Goffiwiki
Aller à : navigation, rechercher

Jp is Salut à Toi's non-interactive command-line interface. It allows one to send or receive files directly from a shell, pipe commands to or from XMPP, use XMPP easily in a script, etc.

The following sub-commands are supported:

messages handling
Save/load parameters template
File sending/receiving
Profile commands
Manage an entity's roster
Get various pieces of information on entities
stream piping through XMPP
blog/microblog management
Ad-hoc commands
manage bookmarks

For getting some help about a command, type e.g.:

 jp message --help

If the command message contains subcommands, this will only list those subcommands without giving a lot of information about them. Then you can type e.g:

 jp message send --help

This will display all the arguments that you need to know in order to use the subcommand send.

Examples of usage:

  • Send a message to a contact:
 cat "Salut" > test
 jp message send -p -c --pwd MyPassWord < test

Explanation : sends a chat message with the content of the file test to The argument -c means "connect the profile, if not already connected". MyPassWord is the password of (and you ought to think twice before using this option because it makes your password directly readable from the screen and it also saves it to your shell history).

Of course you can also use the pipe operator to feed your messages:

 env | grep PYTHON | jp message send -p -c --pwd MyPassWord
  • Send a file to a contact:
 jp file send -p -c --pwd MyPassWord test

This will send the file test to the contact. This is completely different than jp message send as you really send a file and not a message, your contact can choose in which directory it will be saved on his drive. You can send binary file such as images or videos.