Jp/en

De Goffiwiki.


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:

message
messages handling
param
Save/load parameters template
file
File sending/receiving
profile
Profile commands
roster
Manage an entity's roster
info
Get various pieces of information on entities
pipe
stream piping through XMPP
blog
blog/microblog management
ad-hoc
Ad-hoc commands
bookmarks
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 souliane@diekulturvermittlung.at -c --pwd MyPassWord souliane@libervia.org < test

Explanation : souliane@diekulturvermittlung.at sends a chat message with the content of the file test to souliane@libervia.org. The argument -c means "connect the profile, if not already connected". MyPassWord is the password of souliane@diekulturvermittlung.at (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 souliane@diekulturvermittlung.at -c --pwd MyPassWord souliane@libervia.org
  • Send a file to a contact:
 jp file send -p souliane@diekulturvermittlung.at -c --pwd MyPassWord test souliane@libervia.org

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.

Autres langues