Obisidian based life record system

Original link: https://diygod.me/obsidian/

As I mentioned in my 2020 year-end summary , I’ve been using Notion to write bullet notes, and now it’s a little bit different, so let’s take a new look at my current life record system

journal
obsidian-1.png

Weekly and Monthly Diary
obsidian-8.png

Yearbook
obsidian-9.png

Original Notion Bullet Notes
2020-1.jpg

Benefiting from Obsidian’s powerful automation capabilities and high degree of freedom, daily/weekly/monthly/yearly notes are automatically generated through preset templates and linked to each other, and there are few parts that need to be manually processed

At first glance, it looks a little complicated, but it is actually very simple to use, with strong degrees of freedom and scalability. I will introduce it in detail below.

structure

The directory structure is shown in the left column of the diary diagram

 1
2
3
4
5
6
7
8
 ├── OKR.md
└── Journal
└── 2022
├── W1
| └── 2022-01-01.md
| └── 2022-W1.md
├── 2022-01.md
└── 2022.md

The daily diary file YYYY-MM-DD.md will be automatically generated in this week’s folder every day, and a weekly folder [W]ww and weekly diary YYYY-[W]ww.md will be automatically created every week. Automatically generate monthly record YYYY-MM.md , and automatically create a new year folder YYYY and year record YYYY.md

The content of these files is also preset by the template, and has been automatically filled with the date, the OKR score and chart of the current cycle, and even the location, weather, and month information of the current day, and a location for recording the status and dynamics of the day is also set aside.

There is an OKR file outside, which is updated about half a year. It records life goals for the past six months. Some of these goals require continuous efforts every day. A large part of the diary system is built around these goals.

The directory structure is mainly implemented through Periodic Notes , and the templates are mainly implemented through Templater and Dataview and the core plugin Templates

journal

obsidian-1.png

Info

Info is automatically generated information of the day, including links to the year, month, and OKRs, location, weather, moon, etc.

Location, weather, moon phase information comes from Templater’s calling system command function

Get location and weather

 1
 curl wttr.in/ " $(curl -s --header "user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36" https ://api.ip.sb/geoip | /opt/homebrew/bin/jq -r ".city" | sed 's/ /%20/') " \?format= "%l+%c%t"

get moon phase

 1
 curl wttr.in/ " $(curl -s --header "user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.75 Safari/537.36" https ://api.ip.sb/geoip | /opt/homebrew/bin/jq -r ".city" | sed 's/ /%20/') " \?format= "%m"

OKR Tracker

OKR Tracke tracks the completion status of OKRs at the current stage of the day. For example, Sleep:: 10.3 means I slept for 10.3 hours today, Healthy Eating:: 5 means I ate healthy today, :: is the syntax of Dataview, which will add to the current page

 1
2
3
4
5
 page = {
...
"Sleep" : 10.3 ,
"Healthy Eating" : 5 ,
}

Such attributes are convenient for analysis and processing in the weekly calendar.

Among them, there is a special list under O1 KR2, which shows the Toggl Track data of the day through the API. Toggl Track is a time recording application, which records the time I spend in various affairs every day, such as watching the time, brushing the time of station B, working Time, etc., these data can also reflect whether my productivity today is in line with expectations

Notes

This is where I actually keep a diary, mostly running accounts, to make up for my inherently bad memory, and occasionally to write some thoughts

Weekly and Monthly Diary

obsidian-8.png

Jornal List

Jornal List is an automatically generated list of all journals this week/month, implemented through Dataview

Get all journals

 1
2
3
4
5
 // Week
window . pages = dv. pages ( `" ${dv. current().file.folder} "` ). where ( p => p. file . name . match ( new RegExp ( ` ${dv. current() .file.name.split ( '-' )[ 0 ]} -\\d{2}-\\d{2}` ))). sort ( p => p.file.name );

// Month
window . pages = dv. pages (). where ( p => p. file . name . match ( new RegExp ( ` ${dv. current().file.name} -\\d{2}` ))) .sort ( p = > p.file.name );

render list

 1
 dv. paragraph ( window . pages . file . link . join ( ', ' ))

Summary

This is the place for summaries and reflections at the end of the month, corresponding to the Notes in the diary

OKR Tracker

Process and analyze the OKR data in all diaries here, and finally generate scores, corresponding to the OKR Tracker in the diary

It is implemented through Dataview. Taking sleep as an example, ≥ 6.5 hours and ≤ 8.5 hours are counted as effective sleep, and the percentage of effective sleep days to the total number of days is the score

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
 let count = 0 ;
let total = 0 ;
for ( let page of window . pages ) {
if (page[ 'Sleep' ]) {
count++;
if (page[ 'Sleep' ] >= 6.5 && page[ 'Sleep' ] <= 8.5 ) {
total++;
}
}
}
const score = (total / count * 100 ). toFixed ( 2 );
dv.el ( 'div' , score + '%' , {
cls : score > 80 ? 'score-class1' : score > 50 ? 'score-class2' : 'score-class3'
});

Add a little CSS by yourself, > 80 points are displayed in green, 50-80 points are displayed in yellow, < 50 points are displayed in red, so that you can clearly see the sleep situation of this week/month, the picture is the yellow range, no Great but acceptable, need more attention next month

Statistics

Here, the sleep and exercise data are generated into statistical charts. It can be clearly seen that the sleep duration is quite unstable, and the number of exercise days and durations are very small.

The statistical chart is drawn by Obsidian Charts , and the sleep chart code is as follows

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
twenty one
twenty two
twenty three
twenty four
25
26
27
28
29
30
 const times = [];
for ( let page of window . pages ) {
times. push (page[ 'Sleep' ]);
}

const chartData = {
type : 'line' ,
data : {
labels : window . pages . file . name . array (),
datasets : [{
label : 'Sleep Time' ,
data : times,
pointBackgroundColor : '#6c40d6' ,
borderColor : '#6c40d65c' ,
tension : 0.4 ,
spanGaps : true ,
}],
},
options : {
scales : {
y : {
type : 'linear' ,
min : 2 ,
max : 13
}
}
}
}

window . renderChart (chartData, this . container );

Finance

This month’s financial data pie chart, generated by MoneyWiz

Yearbook

obsidian-9.png

The annual diary is also very similar to the weekly diary and monthly diary, but by expanding the time scale, many new and useful conclusions can be drawn

For example, in the same sleep and exercise statistics chart, on the annual scale, it can be seen that my sleep began to get out of control at the end of May. During this period, the exercise was also interrupted, and it was relieved from the middle of June.

There are also new weight and body fat statistics charts, you can see that my weight and body fat are steadily declining, and my health has improved significantly

There is also a new heat map in the yearbook, which records the days when the goal is reached, which is drawn by the Heatmap Calendar , taking sleep as an example

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
 const calendarData = {
entries : [],
}

const pages = window.pages
.where ( p => p.Sleep && p.Sleep >= 6.5 && p.Sleep <= 8.5 )
.sort ( p = > p.file.name );

for ( let page of pages){
calendarData. entries . push ({
date : page.file.name ,
intensity : page. Sleep ,
})
}

renderHeatmapCalendar ( this . container , calendarData);

limited

Bullet Notes has a very important task list module. As shown in the screenshot of Bullet Notes above, I used to write all the task lists for a week in the notes in advance, but now the diaries are automatically generated on the same day and cannot be planned in advance, so I put The task list is managed by the tick list. Of course, the tick list is also very useful, but this will reduce the linkage with the diary. Manual addition will cause a lot of repetitive work, which is not very cool.

Finally, it should be noted that even if there is such a life management system, it does not mean that life will be as expected. Just like the sleep out-of-control incident at the end of May in the example above, it will still happen once you relax and out of control, and the notes will tell me that life is out of control, But how to get back on track and catch up with OKR still depends on self-control and persistence with regular summaries, reflections and improvements

This article is reprinted from: https://diygod.me/obsidian/
This site is for inclusion only, and the copyright belongs to the original author.

Leave a Comment