From 53e6f6a7836a0a098c78ac35af755eef68e5aada Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 18 Sep 2014 16:36:58 -0300 Subject: Initial import --- README.md | 0 TODO.md | 0 timelog | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 README.md create mode 100644 TODO.md create mode 100755 timelog diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..e69de29 diff --git a/timelog b/timelog new file mode 100755 index 0000000..289c298 --- /dev/null +++ b/timelog @@ -0,0 +1,49 @@ +#!/bin/bash +# +# Worklog wrapper +# +# Alternatives to current worklog backend: +# +# https://github.com/snaptortoise/worklog +# https://github.com/tormaroe/worklog +# https://github.com/winged/worklog + +BASE="$HOME/file" +CODEBASE="$HOME/code" +GROUP="$1" +ACTION="$2" +BASENAME="`basename $0`" + +if [ -z "$GROUP" ]; then + echo "Usage: $BASENAME [edit]" + exit 1 +fi + +if [ -z "$EDITOR" ]; then + EDITOR="vi" +fi + +if [ -d "$CODEBASE/$GROUP" ] && [ ! -d "$BASE/$GROUP" ]; then + BASE="$CODEBASE" +fi + +mkdir -p $BASE/$GROUP/worklog + +if [ ! -e "$BASE/$GROUP/worklog/projects" ]; then + cat > $BASE/$GROUP/worklog/projects <