mirror of
https://github.com/adulau/dotfiles.git
synced 2024-12-22 08:46:01 +00:00
a basic notes list
This commit is contained in:
parent
42967e714c
commit
710ad77ae0
1 changed files with 6 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
||||||
#
|
#
|
||||||
# new -> create a new note for Today
|
# new -> create a new note for Today
|
||||||
# edit -> edit the note of Today
|
# edit -> edit the note of Today
|
||||||
|
# todo -> list todos []
|
||||||
#
|
#
|
||||||
# Ugly notes script made by Alexandre Dulaunoy
|
# Ugly notes script made by Alexandre Dulaunoy
|
||||||
# and released under the GNU General Public License
|
# and released under the GNU General Public License
|
||||||
|
@ -59,13 +60,17 @@ then
|
||||||
elif [ "${ACTION}" == "edit" ]
|
elif [ "${ACTION}" == "edit" ]
|
||||||
then
|
then
|
||||||
vim ${TODAYPATH}/$( date +%d)
|
vim ${TODAYPATH}/$( date +%d)
|
||||||
|
|
||||||
elif [ "${ACTION}" == "todo" ]
|
elif [ "${ACTION}" == "todo" ]
|
||||||
then
|
then
|
||||||
cd ${NOTESPATH}
|
cd ${NOTESPATH}
|
||||||
find . -type f | grep -v "/\." | xargs -d"\n" grep "\[\]"
|
find . -type f | grep -v "/\." | xargs -d"\n" grep "\[\]"
|
||||||
|
elif [ "${ACTION}" == "list" ]
|
||||||
|
then
|
||||||
|
cd ${NOTESPATH}
|
||||||
|
find . -type f | grep -v "/\." | xargs -d"\n" wc -m | grep -v "total"
|
||||||
else
|
else
|
||||||
echo "unknown action"
|
echo "unknown action"
|
||||||
|
echo "available action : [new|edit|todo]"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue