scripts: Add script for getting week work from obsidian
This commit is contained in:
parent
a5aec159a9
commit
6def530022
1 changed files with 15 additions and 0 deletions
15
scripts/get_week_work.sh
Executable file
15
scripts/get_week_work.sh
Executable file
|
|
@ -0,0 +1,15 @@
|
||||||
|
##!/usr/bin/env bash
|
||||||
|
|
||||||
|
OBSIDIAN_PATH="/home/user/Documents/t0xa_vault"
|
||||||
|
_1_DAYS_AGO=$(date -d "now - 1 days" +'%Y-%m-%d')
|
||||||
|
_2_DAYS_AGO=$(date -d "now - 2 days" +'%Y-%m-%d')
|
||||||
|
_3_DAYS_AGO=$(date -d "now - 3 days" +'%Y-%m-%d')
|
||||||
|
_4_DAYS_AGO=$(date -d "now - 4 days" +'%Y-%m-%d')
|
||||||
|
_5_DAYS_AGO=$(date -d "now - 5 days" +'%Y-%m-%d')
|
||||||
|
_6_DAYS_AGO=$(date -d "now - 6 days" +'%Y-%m-%d')
|
||||||
|
_7_DAYS_AGO=$(date -d "now - 7 days" +'%Y-%m-%d')
|
||||||
|
GREP_STRING="$_1_DAYS_AGO|$_2_DAYS_AGO|$_3_DAYS_AGO|$_4_DAYS_AGO|$_5_DAYS_AGO|$_6_DAYS_AGO|$_7_DAYS_AGO"
|
||||||
|
|
||||||
|
grep -rEl "\| ($GREP_STRING)" $OBSIDIAN_PATH | sed 's|.*/||' | sort -u
|
||||||
|
|
||||||
|
|
||||||
Loading…
Reference in a new issue