mirror of
https://github.com/nmasur/dotfiles
synced 2024-11-10 02:52:55 +00:00
migrate journal to main dir
This commit is contained in:
parent
b09c6c6f90
commit
213e471769
@ -4,28 +4,28 @@ function notes --description "Notes functions"
|
|||||||
|
|
||||||
function journal --description "Create today's journal"
|
function journal --description "Create today's journal"
|
||||||
set today (date -j +"%Y-%m-%d_%a")
|
set today (date -j +"%Y-%m-%d_%a")
|
||||||
set today_journal $HOME/Documents/notes/journal/$today.md
|
set today_journal $HOME/Documents/notes/$today.md
|
||||||
if [ -f $today_journal ]
|
if [ -f $today_journal ]
|
||||||
echo "Already exists."
|
echo "Already exists."
|
||||||
else
|
else
|
||||||
set yesterday (date -jv "-1d" +"%Y-%m-%d_%a")
|
set yesterday (date -jv "-1d" +"%Y-%m-%d_%a")
|
||||||
set tomorrow (date -jv "+1d" +"%Y-%m-%d_%a")
|
set tomorrow (date -jv "+1d" +"%Y-%m-%d_%a")
|
||||||
set weather (curl "https://wttr.in/?format=1")
|
set weather (curl "https://wttr.in/?format=1")
|
||||||
printf "[[journal/$yesterday|Previous]] - [[calendar|Index]] - [[journal/$tomorrow|Next]]\n\n---\n\n$weather\n\n # Tasks\n\n\n# Log\n\n\n# Communication\n\n---\n\n# Meetings\n\n" > $today_journal
|
printf "[[$yesterday|Previous]] - [[calendar|Index]] - [[$tomorrow|Next]]\n\n---\n\n$weather\n\n # Tasks\n\n\n# Log\n\n\n# Communication\n\n---\n\n# Meetings\n\n" > $today_journal
|
||||||
echo "New journal added."
|
echo "New journal added."
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function today --description "Open today's journal"
|
function today --description "Open today's journal"
|
||||||
set today (date -j +"%Y-%m-%d_%a")
|
set today (date -j +"%Y-%m-%d_%a")
|
||||||
set today_journal $HOME/Documents/notes/journal/$today.md
|
set today_journal $HOME/Documents/notes/$today.md
|
||||||
if [ -f $today_journal ]
|
if [ -f $today_journal ]
|
||||||
vim $today_journal
|
vim $today_journal
|
||||||
else
|
else
|
||||||
set yesterday (date -jv "-1d" +"%Y-%m-%d_%a")
|
set yesterday (date -jv "-1d" +"%Y-%m-%d_%a")
|
||||||
set tomorrow (date -jv "+1d" +"%Y-%m-%d_%a")
|
set tomorrow (date -jv "+1d" +"%Y-%m-%d_%a")
|
||||||
set weather (curl "https://wttr.in/?format=1")
|
set weather (curl "https://wttr.in/?format=1")
|
||||||
printf "[[journal/$yesterday|Previous]] - [[calendar|Index]] - [[journal/$tomorrow|Next]]\n\n---\n\n$weather\n\n # Tasks\n\n\n# Log\n\n\n# Communication\n\n---\n\n# Meetings\n\n" > $today_journal
|
printf "[[$yesterday|Previous]] - [[calendar|Index]] - [[$tomorrow|Next]]\n\n---\n\n$weather\n\n # Tasks\n\n\n# Log\n\n\n# Communication\n\n---\n\n# Meetings\n\n" > $today_journal
|
||||||
echo "New journal added."
|
echo "New journal added."
|
||||||
vim $today_journal
|
vim $today_journal
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user