docs: update readme
This commit is contained in:
parent
ee50a30c78
commit
805a288f2d
40
README
40
README
|
@ -1,40 +0,0 @@
|
|||
|
||||
generate-year.sh
|
||||
----------------
|
||||
|
||||
usage:
|
||||
./generate-year [year]
|
||||
|
||||
parameter [year] is optional, omit to use current year
|
||||
|
||||
user alias:
|
||||
|
||||
function te {
|
||||
local date=${1:-$(date -I)}
|
||||
local year=$(date -d $date +%Y)
|
||||
|
||||
local timedir="$HOME/plan/time"
|
||||
local archivedir="$timedir/archive"
|
||||
|
||||
if [[ $year < $(date +%Y) ]]; then
|
||||
vim -c "/$date" $archivedir/$year.timedot
|
||||
fi
|
||||
|
||||
vim -c "/$date" $timedir/$year.timedot
|
||||
}
|
||||
|
||||
generate-week.sh
|
||||
----------------
|
||||
|
||||
/!\ deprecated in favour of generate-year.sh.
|
||||
|
||||
cron usage:
|
||||
|
||||
1 0 * * 1 TEMPLATE="work 8" TIME_DIR=~/plan/time /home/varl/bin/generate-week.sh write
|
||||
|
||||
user alias:
|
||||
|
||||
function te () {
|
||||
$EDITOR ~/plan/time/current.timedot
|
||||
}
|
||||
|
41
README.md
Normal file
41
README.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
# log-time
|
||||
|
||||
[![asciicast](https://asciinema.org/a/576937.svg)](https://asciinema.org/a/576937)
|
||||
|
||||
## generate-year.sh
|
||||
|
||||
Generate timedot file with dates for current (or given) year, e.g.
|
||||
`2023.timedot`.
|
||||
|
||||
A user alias to open vim on the current, or given, date is used to log
|
||||
time and modify older entries.
|
||||
|
||||
```
|
||||
usage:
|
||||
./generate-year [year]
|
||||
|
||||
parameter [year] is optional, omit to use current year
|
||||
```
|
||||
|
||||
user alias:
|
||||
|
||||
```
|
||||
function te {
|
||||
local date=${1:-$(date -I)}
|
||||
local year=$(date -d $date +%Y)
|
||||
|
||||
local timedir="$HOME/plan/time"
|
||||
local archivedir="$timedir/archive"
|
||||
|
||||
if [[ $year < $(date +%Y) ]]; then
|
||||
vim -c "/$date" $archivedir/$year.timedot
|
||||
fi
|
||||
|
||||
vim -c "/$date" $timedir/$year.timedot
|
||||
}
|
||||
```
|
||||
|
||||
## generate-week.sh
|
||||
|
||||
Generate timedot file with dates for current week, e.g.
|
||||
`2022-13.timedot`.
|
Loading…
Reference in a new issue