Log directly from executables
This commit is contained in:
parent
82b6edebcd
commit
10118774f3
12 changed files with 40 additions and 65 deletions
|
@ -15,10 +15,8 @@ if [ -e ~/.shellnotes/ver/.shellnotes_version ]; then
|
||||||
NEW_VER=$(curl -s https://raw.githubusercontent.com/dmarakom6/shellnotes/master/ver/.shellnotes_version)
|
NEW_VER=$(curl -s https://raw.githubusercontent.com/dmarakom6/shellnotes/master/ver/.shellnotes_version)
|
||||||
else
|
else
|
||||||
echo "Shellnotes is not installed. Try running 'sh install.sh'."
|
echo "Shellnotes is not installed. Try running 'sh install.sh'."
|
||||||
cd ~/.shellnotes/util/failed
|
cd ~/.shellnotes/util/exec
|
||||||
g++ ufailed.cpp -o ufailed
|
./ufailed
|
||||||
~/.shellnotes/util/failed/ufailed
|
|
||||||
rm -f ufailed
|
|
||||||
cd $dir
|
cd $dir
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
@ -122,10 +120,8 @@ else
|
||||||
echo -ne ">>>>>>>>>>>>>>>>>>>>$LGREEN[done]$NC "
|
echo -ne ">>>>>>>>>>>>>>>>>>>>$LGREEN[done]$NC "
|
||||||
else
|
else
|
||||||
echo -ne ">>>>>>>>>>>>>>>>>>>>$RED[failed]$NC "
|
echo -ne ">>>>>>>>>>>>>>>>>>>>$RED[failed]$NC "
|
||||||
cd ~/.shellnotes/util/failed
|
cd ~/.shellnotes/util/exec
|
||||||
g++ ufailed.cpp -o ufailed
|
./ufailed
|
||||||
~/.shellnotes/util/failed/ufailed
|
|
||||||
rm -f ufailed
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
echo -ne '\n'
|
echo -ne '\n'
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
A easy, simple and fast way to keep notes via your linux terminal.
|
A easy, simple and fast way to keep notes via your linux terminal.
|
||||||
|
|
||||||
# What is shellnotes?
|
# What is shellnotes?
|
||||||
Shellnotes is a note system for advanced linux and terminal users. It is made out of a lot of other commands and scripts, and has tons of abilities, like a logging system, an auto-update feature, and much more!
|
Shellnotes is a note system for advanced linux and terminal users. It is made out of commands and scripts, and has tons of abilities.
|
||||||
Shellnotes uses your favourite text editor to save notes on the go. If you are the type of guy that has his terminal open 24/7, you can also save notes __directly__ via terminal!
|
Shellnotes uses your favourite text editor to save notes on-the-go. If you are the type of guy that has his terminal open 24/7, you can also save notes __directly__ via terminal!
|
||||||
With shellnotes, you can make, find, list, edit or delete your notes from wherever you are, whenever you want.
|
With shellnotes, you can make, find, list, edit or delete your notes from wherever you are, whenever you want.
|
||||||
|
|
||||||
# Why use shellnotes?
|
# Why use shellnotes?
|
||||||
|
@ -13,13 +13,13 @@ With shellnotes, you can make, find, list, edit or delete your notes from wherev
|
||||||
* It can suit both dynamic and regular users, as it brings a classic TUI experience as well as some more modern abilities.
|
* It can suit both dynamic and regular users, as it brings a classic TUI experience as well as some more modern abilities.
|
||||||
* It runs __exclusively__ in your terminal, its source files are stored in your home folder.
|
* It runs __exclusively__ in your terminal, its source files are stored in your home folder.
|
||||||
* It's lightweight
|
* It's lightweight
|
||||||
* It's [more than just a program for taking notes.](#learn-everything-shellnotes-can-do). It has a ton of other interesting abilities.
|
* It's [more than just a program for taking notes](#learn-everything-shellnotes-can-do). It has a ton of other interesting abilities.
|
||||||
* It's portable and compatible with most shells.
|
* It's portable and compatible with most shells.
|
||||||
* It matches all the users' experience, by creating the appropriate environment for both beginners and advanced users linux users.
|
* It matches all users, by creating the appropriate environment for both beginners and advanced linux users.
|
||||||
* Even if you delete shellnotes, your notes will stay where they are.
|
* Even if you delete shellnotes, your notes will stay where they are.
|
||||||
* It has a simple file organization system and [TUI](https://en.wikipedia.org/wiki/Text-based_user_interface).
|
* It has a simple file organization system and [TUI](https://en.wikipedia.org/wiki/Text-based_user_interface).
|
||||||
* It's easy to install, delete, update or use.
|
* It's easy to install, delete, update or use.
|
||||||
* It's mostly written in [shell](https://en.wikipedia.org/wiki/Shell_script), which is the language for Unix/Linux [CLI](https://en.wikipedia.org/wiki/Command-line_interface) applications.
|
* It's mostly written in [shell](https://en.wikipedia.org/wiki/Shell_script), which is the language for Unix/Linux [CLI](https://en.wikipedia.org/wiki/Command-line_interface) in-terminal applications.
|
||||||
|
|
||||||
# How to install
|
# How to install
|
||||||
After downloading the source code, navigate to the folder where it's stored, and execute the install script (`install.sh`), using the `sh` command.
|
After downloading the source code, navigate to the folder where it's stored, and execute the install script (`install.sh`), using the `sh` command.
|
||||||
|
|
17
install.sh
17
install.sh
|
@ -11,11 +11,9 @@ VER_TO_INSTALL=3.0 #This is used when updating, it will be changed in every new
|
||||||
if [ -e ~/.shellnotes/.shellnotes.sh ]; then
|
if [ -e ~/.shellnotes/.shellnotes.sh ]; then
|
||||||
echo "Shellnotes is already installed."
|
echo "Shellnotes is already installed."
|
||||||
echo "If you want to update, please run 'update.sh'."
|
echo "If you want to update, please run 'update.sh'."
|
||||||
cd ~/.shellnotes/util/failed
|
cd ~/.shellnotes/util/exec
|
||||||
g++ ifailed.cpp -o ifailed
|
./ifailed
|
||||||
~/.shellnotes/util/failed/ifailed
|
|
||||||
rm -f ifailed
|
|
||||||
cd $dir
|
|
||||||
else
|
else
|
||||||
mkdir ~/.shellnotes
|
mkdir ~/.shellnotes
|
||||||
mv docs ~/.shellnotes/
|
mv docs ~/.shellnotes/
|
||||||
|
@ -41,7 +39,8 @@ else
|
||||||
sudo apt install python3-pip
|
sudo apt install python3-pip
|
||||||
pip install pathlib
|
pip install pathlib
|
||||||
sudo apt update
|
sudo apt update
|
||||||
chmod +x ~/.shellnotes.sh
|
sudo chmod a+rwx ~/.shellnotes/util/exec/*
|
||||||
|
sudo chmod +x ~/.shellnotes/.shellnotes.sh
|
||||||
|
|
||||||
echo "$VER_TO_INSTALL" > ~/.shellnotes/ver/.shellnotes_version
|
echo "$VER_TO_INSTALL" > ~/.shellnotes/ver/.shellnotes_version
|
||||||
|
|
||||||
|
@ -89,10 +88,8 @@ else
|
||||||
clear
|
clear
|
||||||
echo "Your shell is not supported by shellnotes."
|
echo "Your shell is not supported by shellnotes."
|
||||||
echo "Installation Failed."
|
echo "Installation Failed."
|
||||||
cd ~/.shellnotes/util/failed
|
cd ~/.shellnotes/util/exec
|
||||||
g++ ifailed.cpp -o ifailed
|
./ifailed
|
||||||
~/.shellnotes/util/failed/ifailed
|
|
||||||
rm -f ifailed
|
|
||||||
cd $dir
|
cd $dir
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -37,10 +37,8 @@ if [[ "$input" == "1" ]]; then
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "This program name is invalid or not a text editor."
|
echo "This program name is invalid or not a text editor."
|
||||||
cd ~/.shellnotes/util/failed
|
cd ~/.shellnotes/util/exec
|
||||||
g++ sdfailed.cpp -o sdfailed
|
./sdfailed
|
||||||
~/.shellnotes/util/failed/sdfailed
|
|
||||||
rm -f sdfailed
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -56,10 +54,8 @@ elif [[ "$input" == "2" ]]; then
|
||||||
echo "Please restart your terminal."
|
echo "Please restart your terminal."
|
||||||
fi
|
fi
|
||||||
echo "This program name is invalid or not a text editor."
|
echo "This program name is invalid or not a text editor."
|
||||||
cd ~/.shellnotes/util/failed
|
cd ~/.shellnotes/util/exec
|
||||||
g++ sdfailed.cpp -o sdfailed
|
./sdfailed
|
||||||
~/.shellnotes/util/failed/sdfailed
|
|
||||||
rm -f sdfailed
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -71,6 +67,8 @@ elif [[ "$input" == "3" ]]; then
|
||||||
if [ -d $name ]; then
|
if [ -d $name ]; then
|
||||||
if [[ "$name" == "$input3" ]]; then
|
if [[ "$name" == "$input3" ]]; then
|
||||||
echo "This is already the default notes folder."
|
echo "This is already the default notes folder."
|
||||||
|
cd ~/.shellnotes/util/exec
|
||||||
|
./sdfailed
|
||||||
else
|
else
|
||||||
mv $DEFAULT_PATH/* $name
|
mv $DEFAULT_PATH/* $name
|
||||||
echo "$name" > ~/.shellnotes/util/sd/sd-input3.txt
|
echo "$name" > ~/.shellnotes/util/sd/sd-input3.txt
|
||||||
|
@ -80,10 +78,8 @@ elif [[ "$input" == "3" ]]; then
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "This directory does not exist."
|
echo "This directory does not exist."
|
||||||
cd ~/.shellnotes/util/failed
|
cd ~/.shellnotes/util/exec
|
||||||
g++ sdfailed.cpp -o sdfailed
|
./sdfailed
|
||||||
~/.shellnotes/util/failed/sdfailed
|
|
||||||
rm -f sdfailed
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
26
uninstall.sh
26
uninstall.sh
|
@ -70,31 +70,25 @@ if [ $option = "1" ]; then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Your shell is not supported."
|
echo "Your shell is not supported."
|
||||||
cd ~/.shellnotes/util/failed
|
cd ~/.shellnotes/util/exec
|
||||||
g++ uninfailed.cpp -o uninfailed
|
./uninfailed
|
||||||
~/.shellnotes/util/failed/uninfailed
|
|
||||||
rm -f uninfailed
|
|
||||||
cd $dir
|
cd $dir
|
||||||
fi
|
fi
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
echo "An error occured."
|
echo "An error occured."
|
||||||
echo "Shellnotes is not installed."
|
echo "Shellnotes is not installed."
|
||||||
cd ~/.shellnotes/util/failed
|
cd ~/.shellnotes/util/exec
|
||||||
g++ uninfailed.cpp -o uninfailed
|
./uninfailed
|
||||||
~/.shellnotes/util/failed/uninfailed
|
cd $dir
|
||||||
rm -f uninfailed
|
|
||||||
cd $dir
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
elif [ $option = "2" ]; then
|
elif [ $option = "2" ]; then
|
||||||
if grep 'return' <~/.shellnotes/.shellnotes.sh >/dev/null; then
|
if grep 'return' <~/.shellnotes/.shellnotes.sh >/dev/null; then
|
||||||
echo "Shellnotes is already disabled."
|
echo "Shellnotes is already disabled."
|
||||||
cd ~/.shellnotes/util/failed
|
cd ~/.shellnotes/util/exec
|
||||||
g++ disfailed.cpp -o disfailed
|
./disfailed
|
||||||
~/.shellnotes/util/failed/disfailed
|
|
||||||
rm -f disfailed
|
|
||||||
cd $dir
|
cd $dir
|
||||||
else
|
else
|
||||||
sed -i '2 i\return 0 #Shellnotes is disabled by the user. Do not change this line.' ~/.shellnotes/.shellnotes.sh
|
sed -i '2 i\return 0 #Shellnotes is disabled by the user. Do not change this line.' ~/.shellnotes/.shellnotes.sh
|
||||||
|
@ -106,10 +100,8 @@ elif [ $option = "3" ]; then
|
||||||
echo "Shellnotes is now enabled. Please restart your terminal."
|
echo "Shellnotes is now enabled. Please restart your terminal."
|
||||||
else
|
else
|
||||||
echo "Shellnotes is already enabled."
|
echo "Shellnotes is already enabled."
|
||||||
cd ~/.shellnotes/util/failed
|
cd ~/.shellnotes/util/exec
|
||||||
g++ enfailed.cpp -o enfailed
|
./enfailed
|
||||||
~/.shellnotes/util/failed/enfailed
|
|
||||||
rm -f enfailed
|
|
||||||
cd $dir
|
cd $dir
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
18
update.sh
18
update.sh
|
@ -13,10 +13,8 @@ if [ -e ~/.shellnotes/ver/.shellnotes_version ]; then
|
||||||
NEW_VER=$(curl -s https://raw.githubusercontent.com/dmarakom6/shellnotes/master/ver/.shellnotes_version)
|
NEW_VER=$(curl -s https://raw.githubusercontent.com/dmarakom6/shellnotes/master/ver/.shellnotes_version)
|
||||||
else
|
else
|
||||||
echo "Shellnotes is not installed. Try running 'sh install.sh'."
|
echo "Shellnotes is not installed. Try running 'sh install.sh'."
|
||||||
cd ~/.shellnotes/util/failed
|
cd ~/.shellnotes/util/exec
|
||||||
g++ ufailed.cpp -o ufailed
|
./ufailed
|
||||||
~/.shellnotes/util/failed/ufailed
|
|
||||||
rm -f ufailed
|
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
clear
|
clear
|
||||||
|
@ -25,10 +23,8 @@ dir="$(pwd)"
|
||||||
if [ "$VER" = "$NEW_VER" ]; then
|
if [ "$VER" = "$NEW_VER" ]; then
|
||||||
echo "No new update found."
|
echo "No new update found."
|
||||||
echo "Shellnotes is up to date (version $VER)."
|
echo "Shellnotes is up to date (version $VER)."
|
||||||
cd ~/.shellnotes/util/failed
|
cd ~/.shellnotes/util/exec
|
||||||
g++ ufailed.cpp -o ufailed
|
./ufailed
|
||||||
~/.shellnotes/util/failed/ufailed
|
|
||||||
rm -f ufailed
|
|
||||||
cd $dir
|
cd $dir
|
||||||
else
|
else
|
||||||
echo "Good news!"
|
echo "Good news!"
|
||||||
|
@ -46,10 +42,8 @@ else
|
||||||
else
|
else
|
||||||
sleep 0.5
|
sleep 0.5
|
||||||
echo "Update Failed."
|
echo "Update Failed."
|
||||||
cd ~/.shellnotes/util/failed
|
cd ~/.shellnotes/util/exec
|
||||||
g++ ufailed.cpp -o ufailed
|
./ufailed
|
||||||
~/.shellnotes/util/failed/ufailed
|
|
||||||
rm -f ufailed
|
|
||||||
cd $dir
|
cd $dir
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
BIN
util/exec/disfailed
Normal file
BIN
util/exec/disfailed
Normal file
Binary file not shown.
BIN
util/exec/enfailed
Normal file
BIN
util/exec/enfailed
Normal file
Binary file not shown.
BIN
util/exec/ifailed
Normal file
BIN
util/exec/ifailed
Normal file
Binary file not shown.
BIN
util/exec/sdfailed
Normal file
BIN
util/exec/sdfailed
Normal file
Binary file not shown.
BIN
util/exec/ufailed
Normal file
BIN
util/exec/ufailed
Normal file
Binary file not shown.
BIN
util/exec/uninfailed
Normal file
BIN
util/exec/uninfailed
Normal file
Binary file not shown.
Loading…
Reference in a new issue