Created
April 22, 2015 12:04
-
-
Save pierew/61376800e93a43f7bb78 to your computer and use it in GitHub Desktop.
iarchwiki - Please install to /usr/local/bin/
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
#!/bin/bash | |
function dependencies() { | |
echo "Check for dependencies" | |
echo "Check: w3m" | |
if [[ "" =~ "$(which w3m)" ]]; then | |
echo "w3m [Install]" | |
sudo pacman -Sy --noconfirm w3m | |
fi | |
echo "w3m [OK]" | |
echo "Check: arch-wiki-lite" | |
if [[ "" =~ "$(which wiki-search-html)" ]]; then | |
echo "arch-wiki-lite [Install]" | |
yaourt -Sy --noconfirm arch-wiki-lite | |
fi | |
echo "arch-wiki-lite [OK]" | |
} | |
function iwiki() { | |
clear | |
echo "#############################################" | |
echo "# Arch Wiki HTML Search Offline Interactive #" | |
echo "#############################################" | |
echo "# Controls: #" | |
echo "# * Press CTRL+C for Quit #" | |
echo "# * Press q for Quit Terminal Browser #" | |
echo "#############################################" | |
export wiki_browser=$(which w3m) | |
read -p "Enter Keyword to search: " SEARCH | |
wiki-search-html $SEARCH | |
read -p "Choose a Option: " OPTION | |
wiki-search-html $OPTION | |
unset SEARCH | |
unset OPTION | |
iwiki | |
} | |
dependencies | |
iwiki |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment