Inital commit
This commit is contained in:
commit
a18dff8441
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#ignore all swp files
|
||||||
|
**/*.swp
|
||||||
|
|
||||||
|
#ignore all executables, but still keep the bin folder
|
||||||
|
bin/*
|
||||||
|
!bin/.gitkeep
|
18
Makefile
Normal file
18
Makefile
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
###############################################################################
|
||||||
|
# Tyler Perkins
|
||||||
|
# 21-10-21
|
||||||
|
# Makefile to install stackToDo
|
||||||
|
#
|
||||||
|
|
||||||
|
#Install for one user
|
||||||
|
INSTALL_DIR="$${HOME}/.local/bin"
|
||||||
|
#Install system wide
|
||||||
|
#INSTALL_DIR="/usr/bin"
|
||||||
|
|
||||||
|
install :
|
||||||
|
cp t* $(INSTALL_DIR)/
|
||||||
|
|
||||||
|
uninstall :
|
||||||
|
rm $(INSTALL_DIR)/tpeek
|
||||||
|
rm $(INSTALL_DIR)/tpop
|
||||||
|
rm $(INSTALL_DIR)/tpush
|
27
README.md
Normal file
27
README.md
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
stackToDo
|
||||||
|
=========
|
||||||
|
|
||||||
|
A simple stack based to do program, for those that are easily side tracked
|
||||||
|
(like me). Due to the nature of a stack, it will track how you got side tracked
|
||||||
|
by pushing to it each time you move to a new task without completing it
|
||||||
|
|
||||||
|
Install
|
||||||
|
-------
|
||||||
|
|
||||||
|
```
|
||||||
|
make install
|
||||||
|
```
|
||||||
|
|
||||||
|
Usage and specifics
|
||||||
|
-------------------
|
||||||
|
|
||||||
|
A stack operates as a FILO container. When getting side tracked when performing
|
||||||
|
research, programming, etc, it can be hard to get back to the previous task.
|
||||||
|
Therefore, you can simply `push` a task onto the todo stack. Each task is a
|
||||||
|
127 character string of what was just happening. Be creative, it can be line
|
||||||
|
numbers of a file where you were working, the topic you were arguing in a
|
||||||
|
paper, anything. Once you finish a task, you can `pop` it off the todo stack
|
||||||
|
and get back to what you were previously doing. If you ever forget what you
|
||||||
|
were doing, simply `peek` at the top of the stack to see what you're doing
|
||||||
|
without removing it from the stack. Everything is kept in plaintext, so its
|
||||||
|
easy to parse with other programs.
|
13
tpeek
Executable file
13
tpeek
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#zero arguments
|
||||||
|
if [ "$#" -ne 0 ]; then
|
||||||
|
echo "Usage:" $0
|
||||||
|
echo "Returns what is at the top of the todo stack"
|
||||||
|
fi
|
||||||
|
|
||||||
|
#make correct directories
|
||||||
|
mkdir -p ~/.config/stackToDo
|
||||||
|
touch ~/.config/stackToDo/todo
|
||||||
|
|
||||||
|
tail -1 ~/.config/stackToDo/todo
|
15
tpop
Executable file
15
tpop
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#must have no arguments
|
||||||
|
if [ "$#" -ne 0 ]; then
|
||||||
|
echo "Usage:" $0
|
||||||
|
echo "Remove the last element of the stack and prints it"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#make correct directories
|
||||||
|
mkdir -p ~/.config/stackToDo
|
||||||
|
touch ~/.config/stackToDo/todo
|
||||||
|
|
||||||
|
tail -1 ~/.config/stackToDo/todo
|
||||||
|
sed -i '$ d' ~/.config/stackToDo/todo
|
21
tpush
Executable file
21
tpush
Executable file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
#must have an argument
|
||||||
|
if [ "$#" -eq 0 ]; then
|
||||||
|
echo "Usage:" $0 "[STRING TO PUT ON STACK]"
|
||||||
|
echo "Pushes the given string to the top of the todo stack"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
str="'$*'"
|
||||||
|
|
||||||
|
if [ -z "$str" ]; then
|
||||||
|
echo "Must provide a non empty argument"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
#make correct directories
|
||||||
|
mkdir -p ~/.config/stackToDo
|
||||||
|
touch ~/.config/stackToDo/todo
|
||||||
|
|
||||||
|
echo $str >> ~/.config/stackToDo/todo
|
Reference in New Issue
Block a user