aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulio Capote <jcapote@gmail.com>2022-08-21 19:59:42 +0000
committerJulio Capote <jcapote@gmail.com>2022-08-21 19:59:42 +0000
commitcbb86f13226c1008caf0e6ca531e0751c884006c (patch)
tree6f7d9c6fc62556ec38eed8a90ea5d2d5d9b04bdf
parent4a44130aadb9981260363730393aa4c62208c7a5 (diff)
downloadrecit-cbb86f13226c1008caf0e6ca531e0751c884006c.tar.gz
fix global cmd
-rw-r--r--README.md28
-rw-r--r--lib/loader12
-rwxr-xr-xlibexec/recit-add-entry5
-rwxr-xr-xlibexec/recit-add-project5
-rwxr-xr-xlibexec/recit-edit5
-rwxr-xr-xlibexec/recit-edit-entry5
-rwxr-xr-xlibexec/recit-entries5
-rwxr-xr-xlibexec/recit-recsel-entries9
-rwxr-xr-xlibexec/recit-recsel-projects9
9 files changed, 35 insertions, 48 deletions
diff --git a/README.md b/README.md
index b45d572..73e7cb0 100644
--- a/README.md
+++ b/README.md
@@ -4,9 +4,9 @@ personal productivity system backed by [recfiles](https://en.wikipedia.org/wiki/
# dependencies
-* [recutils](https://www.gnu.org/software/recutils/)
-* uuidgen
-* any perl
+* [recutils](https://www.gnu.org/software/recutils/) (`brew install recutils`)
+* uuidgen (included with most systems)
+* any perl (included with most systems)
# workflows
@@ -20,6 +20,28 @@ You can use `recit` to track things like:
# usage
+ Usage: recit <command> [<args>]
+
+ Some useful recit commands are:
+ add-entry Add entries, optionally for a project and/or a certain time
+ add-project Add Project
+ commands List all recit commands
+ edit Open DB in $EDITOR
+ edit-entry Edit an entry given its UUID
+ entries Display entries, optionally for a project and/or a certain time
+ projects List all Projects
+ setup sets up a new recit database at $HOME/.recit.rec
+ today Show all entries for today
+ tomorrow Show all entries for tomorrow
+
+ See 'recit help <command>' for information on a specific command.
+
+# installation
+
+download the latest releas (or clone the repository) and follow the instructions displayed when running `bin/recit init`.
+
+# getting started
+
`recit setup` gets you started
## add some entries
diff --git a/lib/loader b/lib/loader
deleted file mode 100644
index 9b01d2a..0000000
--- a/lib/loader
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-
-function load_recit {
- local recfile_location
- if [[ -f "$HOME/.recit.location" ]]; then
- recfile_location=$(cat "$HOME/.recit.location")
- else
- echo "$HOME/.recit.location not found"
- exit 1
- fi
- echo "$recfile_location"
-} \ No newline at end of file
diff --git a/libexec/recit-add-entry b/libexec/recit-add-entry
index 93590e1..a41ae6c 100755
--- a/libexec/recit-add-entry
+++ b/libexec/recit-add-entry
@@ -4,10 +4,7 @@
set -e
-# shellcheck source=/dev/null
-source lib/loader
-
-recfile=$(load_recit)
+recfile=$(recit-file)
notes=""
query_time=""
diff --git a/libexec/recit-add-project b/libexec/recit-add-project
index 2f30607..cd0dd51 100755
--- a/libexec/recit-add-project
+++ b/libexec/recit-add-project
@@ -3,10 +3,7 @@
# Summary: Add Project
-# shellcheck source=/dev/null
-source lib/loader
-
-recfile=$(load_recit)
+recfile=$(recit-file)
name=""
while getopts "n:" options; do
diff --git a/libexec/recit-edit b/libexec/recit-edit
index cf3fc43..7431e64 100755
--- a/libexec/recit-edit
+++ b/libexec/recit-edit
@@ -4,10 +4,7 @@
set -e
-# shellcheck source=/dev/null
-source lib/loader
-
-recfile=$(load_recit)
+recfile=$(recit-file)
if [[ -z ${EDITOR+x} ]]; then
echo "$EDITOR is not defined please pass a message"
diff --git a/libexec/recit-edit-entry b/libexec/recit-edit-entry
index 47ca072..9254753 100755
--- a/libexec/recit-edit-entry
+++ b/libexec/recit-edit-entry
@@ -4,10 +4,7 @@
set -e
-# shellcheck source=/dev/null
-source lib/loader
-
-recfile=$(load_recit)
+recfile=$(recit-file)
uuid=$1
diff --git a/libexec/recit-entries b/libexec/recit-entries
index 7fcf438..1ba63b1 100755
--- a/libexec/recit-entries
+++ b/libexec/recit-entries
@@ -3,11 +3,6 @@
# Summary: Display entries, optionally for a project and/or a certain time
set -e
-# shellcheck source=/dev/null
-source lib/loader
-
-recfile=$(load_recit)
-
project=""
query_time=""
diff --git a/libexec/recit-recsel-entries b/libexec/recit-recsel-entries
index 5b6070a..f2ca2f9 100755
--- a/libexec/recit-recsel-entries
+++ b/libexec/recit-recsel-entries
@@ -1,14 +1,11 @@
#!/usr/bin/env bash
set -e
-# shellcheck source=/dev/null
-source lib/loader
-
-recfile=$(load_recit)
+recfile=$(recit-file)
if [[ "$1" = "" ]]; then
- out=$(recsel -t Entry "${recfile}" | recfmt -f share/recit/templates/entries.templ)
+ out=$(recsel -t Entry "$recfile" | recfmt -f share/recit/templates/entries.templ)
else
- out=$(recsel -t Entry "${recfile}" -e "$1" | recfmt -f share/recit/templates/entries.templ)
+ out=$(recsel -t Entry "$recfile" -e "$1" | recfmt -f share/recit/templates/entries.templ)
fi
echo -e "$out"
diff --git a/libexec/recit-recsel-projects b/libexec/recit-recsel-projects
index f7778e9..017e3e4 100755
--- a/libexec/recit-recsel-projects
+++ b/libexec/recit-recsel-projects
@@ -1,14 +1,11 @@
#!/usr/bin/env bash
set -e
-# shellcheck source=/dev/null
-source lib/loader
-
-recfile=$(load_recit)
+recfile=$(recit-file)
if [[ "$1" = "" ]]; then
- out=$(recsel -t Project "${recfile}" | recfmt -f share/recit/templates/projects.templ)
+ out=$(recsel -t Project "$recfile" | recfmt -f share/recit/templates/projects.templ)
else
- out=$(recsel -t Project "${recfile}" -e "$1" | recfmt -f share/recit/templates/projects.templ)
+ out=$(recsel -t Project "$recfile" -e "$1" | recfmt -f share/recit/templates/projects.templ)
fi
echo -e "$out"