Last active
September 10, 2021 03:09
-
-
Save raine/fdcc934d1ed4f0ae8204f64ff227a943 to your computer and use it in GitHub Desktop.
Simple rust server finder for command-line
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# rust-servers | |
# | |
# Simple rust server finder for command-line. | |
# Useful for getting the map of your server. | |
# | |
# Requirements: | |
# - brew install fzf | |
# - npm install -g ramda-cli | |
SERVERS="http://playrust.io/servers.json" | |
selected=`curl -s $SERVERS | ramda --json-path '*' -c id | fzf -e` || exit 0 | |
echo $selected | ramda -c -o table \ | |
'-> it.mapurl = "http://map.playrust.io/?" + encodeURIComponent(if it.modded then it.endpoint else [ it.level, it.world.size, it.world.seed ].join("_")); it' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment