Better help sections for each tool

This commit is contained in:
Alex Epstein 2017-07-08 01:55:55 -04:00
parent b4533d163f
commit 5d11d29fb2
12 changed files with 87 additions and 12 deletions

View File

@ -89,7 +89,8 @@ update()
usage()
{
echo "Cheat tool"
echo "Cheat"
echo "Description: Cheatsheets for quick information about multiple programming languages along with terminal commands"
echo "Usage: cheat [flags] [command] or cheat [flags] [programming language] [subject]"
echo " -s Does a search for last argument rather than looking for exact match"
echo " -i Case insensitive search"
@ -104,6 +105,11 @@ usage()
echo " learn Shows a learn-x-in-minutes language cheat sheet perfect for getting started with the language"
echo " 1line A collection of one-liners in this language"
echo " weirdness A collection of examples of weird things in this language"
echo "Examples:"
echo " cheat rust hello"
echo " cheat -r -b -i go"
echo " cheat julia Functions"
echo " cheat -i go operators"
}
getCheatSheet()

View File

@ -160,13 +160,20 @@ getGithubRepoNames()
usage()
{
echo "Cloudup tool"
echo "Usage: cloudup [flags] or cloudup or cloudup [listOfGHRepoNamesSplitBySpaces]"
echo "Cloudup"
echo "Description: Backs up a users github repositories to your bitbucket account."
echo " With no flags cloudup will guide you through backing up a single repository"
echo "Usage: cloudup [flags] or cloudup [flags] [listOfGHRepoNamesSplitBySpaces]"
echo " -p Upload the repositor(y)(ies) as private to bitbucket (must have private repo ability on bitbucket)"
echo " -a Backup all github repositories"
echo " -u Update Bash-Snippet Tools"
echo " -h Show the help"
echo " -v Get the tool version"
echo "Examples:"
echo " cloudup"
echo " cloudup -p -a"
echo " cloudup -p nameOfRepo1 nameOf Repo2"
echo " cloudup nameOfRepo"
}
getConfiguredClient || exit 1

View File

@ -73,13 +73,17 @@ update()
usage()
{
echo "Crypt tool"
echo "Crypt"
echo "Description: A wrapper around openssl that facilitates encrypting and decrypting files."
echo "Usage: crypt [flag] [inputFile] [outputFile]"
echo " -e Encrypt the inputFile and store it in the outputFile"
echo " -d Decrypt the inputFile and store it in the outputFile"
echo " -u Update Bash-Snippet Tools"
echo " -h Show the help"
echo " -v Get the tool version"
echo "Examples:"
echo " crypt -e mySecretFile.txt myEncryptedFile.jpg (change filetype so default program is incorrect)"
echo " crypt -d myEncryptedFile.jpg thisIsNowDecrypted.txt (change filetype back so now default program is correct)"
}
checkOpenSSL || exit 1

View File

@ -196,11 +196,27 @@ update()
usage()
{
echo "Currency tool"
echo "Currency"
echo "Description: A realtime currency converter."
echo " With no flags it will guide you through the currency exchange"
echo "Usage: currency or currency [flag] or currency [base] [exchangeTo] [amount]"
echo " -u Update Bash-Snippet Tools"
echo " -h Show the help"
echo " -v Get the tool version"
echo "Supported Currencies:"
echo " _______________________"
echo "| AUD | BGN | BRL | CAD |"
echo "| CHF | CNY | CZK | DKK |"
echo "| EUR | GBP | HKD | HRK |"
echo "| HUF | IDR | ILS | INR |"
echo "| JPY | KRW | MXN | MYR |"
echo "| NOK | NZD | PHP | PLN |"
echo "| RON | RUB | SEK | SGD |"
echo "| THB | TRY | USD | ZAR |"
echo " _______________________"
echo "Examples:"
echo " currency EUR USD 12.35"
echo " currency"
}
getConfiguredClient || exit 1

View File

@ -36,6 +36,8 @@ httpGet()
}
# Parse arguments passed + help formatting
usage() {
echo "Geo"
echo "Description: Provides quick access for wan, lan, router, dns, mac, and ip geolocation data"
echo "Usage: geo [flag]"
echo " -w Returns WAN IP"
echo " -l Returns LAN IP(s)"
@ -43,6 +45,9 @@ usage() {
echo " -d Returns DNS Nameserver"
echo " -m Returns MAC address for interface. Ex. eth0"
echo " -g Returns Current IP Geodata"
echo "Examples:"
echo " geo -g"
echo " geo -wlrdgm eth0"
echo "Custom Geo Output =>"
echo "[all] [query] [city] [region] [country] [zip] [isp]"
echo "Example: geo -a 8.8.8.8 -o city,zip,isp"

View File

@ -147,11 +147,15 @@ update()
usage()
{
echo "Movies tool"
echo "Movies"
echo "Description: Provides relevant information about a certain movie."
echo "Usage: movies [flag] or movies [movieToSearch]"
echo " -u Update Bash-Snippet Tools"
echo " -h Show the help"
echo " -v Get the tool version"
echo "Examples:"
echo " movies Argo"
echo " movies Inception"
}
getConfiguredPython || exit 1

View File

@ -95,11 +95,17 @@ checkInternet()
usage()
{
echo "Qrify"
echo "Usage: qrify [stringtoturnintoqrcode]"
echo "Description: Converts strings or urls into a qr code."
echo " -u Update Bash-Snippet Tools"
echo " -m Enable multiline support (feature not working yet)"
echo " -h Show the help"
echo " -v Get the tool version"
echo "Examples:"
echo " qrify this is a test string"
echo " qrify -m two\\\\nlines"
echo " qrify github.com # notice no http:// or https:// this will fail"
}

View File

@ -106,11 +106,15 @@ update()
usage()
{
echo "Short tool"
echo "Short"
echo "Description: Unmasks shortended urls."
echo "Usage: short [shortURL] or short [flag]"
echo " -u Update Bash-Snippet Tools"
echo " -h Show the help"
echo " -v Get the tool version"
echo "Example:"
echo " Input: short tinyurl.com/jhkj"
echo " Output: http://possiblemaliciouswebsiteornot.com"
}
expandURL()

View File

@ -158,11 +158,15 @@ update()
usage()
{
echo "Stocks tool"
echo "Usage: stocks [flag or company]"
echo "Stocks"
echo "Description: Finds the latest information on a certain stock."
echo "Usage: stocks [flag] or stocks [company/ticker]"
echo " -u Update Bash-Snippet Tools"
echo " -h Show the help"
echo " -v Get the tool version"
echo "Examples:"
echo " stocks AAPL"
echo " stocks Tesla"
}
getConfiguredPython || exit 1

View File

@ -188,20 +188,27 @@ printInfo()
usage()
{
echo "Taste tool"
echo "Taste"
echo "Description: A recommendation engine that provides 3 similar items based on some input topic."
echo " Taste also has the ability to provide information on the item of interest."
echo " Supports: shows, books, music, artists, movies, authors, games"
echo "Usage: taste [flag] [item]"
echo " -i Get more information on similar items"
echo " -s Get information on the item itself"
echo " -u Update Bash-Snippet Tools"
echo " -h Show the help"
echo " -v Get the tool version"
echo "Examples:"
echo " taste -i Kendrick Lamar"
echo " taste Catcher in the Rye"
echo " taste -s Red Hot Chili Peppers"
}
if [[ $apiKey == "" ]];then
echo "Error: API key not setup properly"
echo "To get an API key visit https://tastedive.com/account/api_access"
echo 'After getting the API key run the following command: export TASTE_API_KEY="yourAPIKeyGoesHere"'
echo "After following all the steps and issues still persist try adding TASTE_API_KEY manually to your .bashrc"
echo "After following all the steps and issues still persist try adding export TASTE_API_KEY manually to your .bash_profile"
exit 1
fi
getConfiguredPython || exit 1

View File

@ -107,7 +107,9 @@ update()
usage()
{
echo "Weather tool"
echo "Weather"
echo "Description: Provides a 3 day forecast on your current location or a specified location."
echo " With no flags Weather will default to your current location."
echo "Usage: weather or weather [flag] or weather [country] or weather [city] [state]"
echo " weather [i] get weather in imperial units"
echo " weather [m] get weather in metric units"
@ -115,6 +117,11 @@ usage()
echo " -u Update Bash-Snippet Tools"
echo " -h Show the help"
echo " -v Get the tool version"
echo "Examples:"
echo " weather"
echo " weather Tokyo"
echo " weather Moon"
echo " weather m"
}
getConfiguredClient || exit 1

View File

@ -157,12 +157,17 @@ searchview()
usage()
{
echo "Ytview"
echo "Description: Search and play youtube videos right from the terminal."
echo "Usage: ytview [flag] [string] or ytview [videoToSearch]"
echo " -s Searches youtube"
echo " -c Shows the latest videos of a channel"
echo " -u Update Bash-Snippet Tools"
echo " -h Show the help"
echo " -v Get the tool version"
echo "Examples:"
echo " ytview -s Family Guy Chicken Fight"
echo " ytview -c Numberphile"
}
getConfiguredClient || exit 1