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