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)
|
||||
else
|
||||
echo "Shellnotes is not installed. Try running 'sh install.sh'."
|
||||
cd ~/.shellnotes/util/failed
|
||||
g++ ufailed.cpp -o ufailed
|
||||
~/.shellnotes/util/failed/ufailed
|
||||
rm -f ufailed
|
||||
cd ~/.shellnotes/util/exec
|
||||
./ufailed
|
||||
cd $dir
|
||||
return 0
|
||||
fi
|
||||
|
@ -122,10 +120,8 @@ else
|
|||
echo -ne ">>>>>>>>>>>>>>>>>>>>$LGREEN[done]$NC "
|
||||
else
|
||||
echo -ne ">>>>>>>>>>>>>>>>>>>>$RED[failed]$NC "
|
||||
cd ~/.shellnotes/util/failed
|
||||
g++ ufailed.cpp -o ufailed
|
||||
~/.shellnotes/util/failed/ufailed
|
||||
rm -f ufailed
|
||||
cd ~/.shellnotes/util/exec
|
||||
./ufailed
|
||||
return 0
|
||||
fi
|
||||
echo -ne '\n'
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
A easy, simple and fast way to keep notes via your linux terminal.
|
||||
|
||||
# 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 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 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!
|
||||
With shellnotes, you can make, find, list, edit or delete your notes from wherever you are, whenever you want.
|
||||
|
||||
# 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 runs __exclusively__ in your terminal, its source files are stored in your home folder.
|
||||
* 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 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.
|
||||
* 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 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
|
||||
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
|
||||
echo "Shellnotes is already installed."
|
||||
echo "If you want to update, please run 'update.sh'."
|
||||
cd ~/.shellnotes/util/failed
|
||||
g++ ifailed.cpp -o ifailed
|
||||
~/.shellnotes/util/failed/ifailed
|
||||
rm -f ifailed
|
||||
cd $dir
|
||||
cd ~/.shellnotes/util/exec
|
||||
./ifailed
|
||||
|
||||
else
|
||||
mkdir ~/.shellnotes
|
||||
mv docs ~/.shellnotes/
|
||||
|
@ -41,7 +39,8 @@ else
|
|||
sudo apt install python3-pip
|
||||
pip install pathlib
|
||||
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
|
||||
|
||||
|
@ -89,10 +88,8 @@ else
|
|||
clear
|
||||
echo "Your shell is not supported by shellnotes."
|
||||
echo "Installation Failed."
|
||||
cd ~/.shellnotes/util/failed
|
||||
g++ ifailed.cpp -o ifailed
|
||||
~/.shellnotes/util/failed/ifailed
|
||||
rm -f ifailed
|
||||
cd ~/.shellnotes/util/exec
|
||||
./ifailed
|
||||
cd $dir
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -37,10 +37,8 @@ if [[ "$input" == "1" ]]; then
|
|||
|
||||
else
|
||||
echo "This program name is invalid or not a text editor."
|
||||
cd ~/.shellnotes/util/failed
|
||||
g++ sdfailed.cpp -o sdfailed
|
||||
~/.shellnotes/util/failed/sdfailed
|
||||
rm -f sdfailed
|
||||
cd ~/.shellnotes/util/exec
|
||||
./sdfailed
|
||||
fi
|
||||
|
||||
|
||||
|
@ -56,10 +54,8 @@ elif [[ "$input" == "2" ]]; then
|
|||
echo "Please restart your terminal."
|
||||
fi
|
||||
echo "This program name is invalid or not a text editor."
|
||||
cd ~/.shellnotes/util/failed
|
||||
g++ sdfailed.cpp -o sdfailed
|
||||
~/.shellnotes/util/failed/sdfailed
|
||||
rm -f sdfailed
|
||||
cd ~/.shellnotes/util/exec
|
||||
./sdfailed
|
||||
fi
|
||||
|
||||
|
||||
|
@ -71,6 +67,8 @@ elif [[ "$input" == "3" ]]; then
|
|||
if [ -d $name ]; then
|
||||
if [[ "$name" == "$input3" ]]; then
|
||||
echo "This is already the default notes folder."
|
||||
cd ~/.shellnotes/util/exec
|
||||
./sdfailed
|
||||
else
|
||||
mv $DEFAULT_PATH/* $name
|
||||
echo "$name" > ~/.shellnotes/util/sd/sd-input3.txt
|
||||
|
@ -80,10 +78,8 @@ elif [[ "$input" == "3" ]]; then
|
|||
|
||||
else
|
||||
echo "This directory does not exist."
|
||||
cd ~/.shellnotes/util/failed
|
||||
g++ sdfailed.cpp -o sdfailed
|
||||
~/.shellnotes/util/failed/sdfailed
|
||||
rm -f sdfailed
|
||||
cd ~/.shellnotes/util/exec
|
||||
./sdfailed
|
||||
fi
|
||||
|
||||
|
||||
|
|
24
uninstall.sh
24
uninstall.sh
|
@ -70,20 +70,16 @@ if [ $option = "1" ]; then
|
|||
fi
|
||||
else
|
||||
echo "Your shell is not supported."
|
||||
cd ~/.shellnotes/util/failed
|
||||
g++ uninfailed.cpp -o uninfailed
|
||||
~/.shellnotes/util/failed/uninfailed
|
||||
rm -f uninfailed
|
||||
cd ~/.shellnotes/util/exec
|
||||
./uninfailed
|
||||
cd $dir
|
||||
fi
|
||||
esac
|
||||
else
|
||||
echo "An error occured."
|
||||
echo "Shellnotes is not installed."
|
||||
cd ~/.shellnotes/util/failed
|
||||
g++ uninfailed.cpp -o uninfailed
|
||||
~/.shellnotes/util/failed/uninfailed
|
||||
rm -f uninfailed
|
||||
cd ~/.shellnotes/util/exec
|
||||
./uninfailed
|
||||
cd $dir
|
||||
fi
|
||||
|
||||
|
@ -91,10 +87,8 @@ if [ $option = "1" ]; then
|
|||
elif [ $option = "2" ]; then
|
||||
if grep 'return' <~/.shellnotes/.shellnotes.sh >/dev/null; then
|
||||
echo "Shellnotes is already disabled."
|
||||
cd ~/.shellnotes/util/failed
|
||||
g++ disfailed.cpp -o disfailed
|
||||
~/.shellnotes/util/failed/disfailed
|
||||
rm -f disfailed
|
||||
cd ~/.shellnotes/util/exec
|
||||
./disfailed
|
||||
cd $dir
|
||||
else
|
||||
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."
|
||||
else
|
||||
echo "Shellnotes is already enabled."
|
||||
cd ~/.shellnotes/util/failed
|
||||
g++ enfailed.cpp -o enfailed
|
||||
~/.shellnotes/util/failed/enfailed
|
||||
rm -f enfailed
|
||||
cd ~/.shellnotes/util/exec
|
||||
./enfailed
|
||||
cd $dir
|
||||
fi
|
||||
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)
|
||||
else
|
||||
echo "Shellnotes is not installed. Try running 'sh install.sh'."
|
||||
cd ~/.shellnotes/util/failed
|
||||
g++ ufailed.cpp -o ufailed
|
||||
~/.shellnotes/util/failed/ufailed
|
||||
rm -f ufailed
|
||||
cd ~/.shellnotes/util/exec
|
||||
./ufailed
|
||||
return 0
|
||||
fi
|
||||
clear
|
||||
|
@ -25,10 +23,8 @@ dir="$(pwd)"
|
|||
if [ "$VER" = "$NEW_VER" ]; then
|
||||
echo "No new update found."
|
||||
echo "Shellnotes is up to date (version $VER)."
|
||||
cd ~/.shellnotes/util/failed
|
||||
g++ ufailed.cpp -o ufailed
|
||||
~/.shellnotes/util/failed/ufailed
|
||||
rm -f ufailed
|
||||
cd ~/.shellnotes/util/exec
|
||||
./ufailed
|
||||
cd $dir
|
||||
else
|
||||
echo "Good news!"
|
||||
|
@ -46,10 +42,8 @@ else
|
|||
else
|
||||
sleep 0.5
|
||||
echo "Update Failed."
|
||||
cd ~/.shellnotes/util/failed
|
||||
g++ ufailed.cpp -o ufailed
|
||||
~/.shellnotes/util/failed/ufailed
|
||||
rm -f ufailed
|
||||
cd ~/.shellnotes/util/exec
|
||||
./ufailed
|
||||
cd $dir
|
||||
return 0
|
||||
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