README
js8-cli
Use JS8Call's JSON API via the command line.
This program is essentially just a cli wrapper for lib-js8call.
Installation
Make sure you have a recent version of NodeJS installed.
npm install -g @trippnology/js8-cli
Usage
Usage: js8-cli [options] [command]
Options:
-v, --vers output the current version
-h, --help display help for command
Commands:
inbox.get_messages View a list of your inbox messages
inbox.store_message <callsign> <text> Store a message in your inbox for later transmission
mode.get_speed The current TX speed. 0 = normal, 1 = fast, 2 = turbo, 4 = slow
rig.get_freq The current station frequency
rig.set_freq <offset> [frequency] Change the offset and/or frequency
tx.send_message <text> Transmit a message
tx.set_text <text> Set the text in the TX window
help [command] display help for command
More commands coming soon, as they are added to lib-js8call
.
Providing dynamic input
You can provide dynamic input to commands in a couple of different ways.
Stdin
echo -n "hello, world!" | js8-cli tx.send_message
# -n option omits the newline at the end
cat some-file.txt | js8-cli tx.send_message
Command expansion
This method allows more control over the final output.
js8-cli tx.send_message "$(some-command)"
Posting a report to the WX group, using data from the local disk:
js8-cli tx.send_message "@WX Report from JO02mm: $(cat ~/weather-station/conditions.txt)"
# Outputs:
# @WX Report from JO02mm: 10.5c 93% 1012mb
The same method can be used for other types of telemetry (such as battery level), data from web APIs, or whatever else you come up with. Remember to put quotes around anything that may contain spaces.
Contributing
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature develop
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
History
TODO: Write history
Credits
TODO: Write credits
License
UNLICENSED