This probably took me way longer than it should have but thanks to my learning in the past two weeks, I have now been able to create an overview of back exercises in Logseq and I am able to generate a simple exercise plan.
I thought it might be helpful for others who are completely new at this (like I am) to see how I created this, hence this new post.
Step 1: Create a template for exercises
I created a template for exercises using the following properties:
- Type
- Name
- Sets
- Reps
- Weight
- Difficulty
- Example
For type, I used the values âexercise-backâ and âwarm-upâ and for difficulty the values âeasyâ âmediumâ and âhardâ.
Step 2: Create individual exercise blocks
This is how an individual block looks like. Each exercise is a child block. In the parent block I identify the source of the exercise. For me, the exercises I practiced with today are all children blocks under the parent headers physiotherapy/individual exercises.
Step 3: Generate exercise plan using simple queries
I practiced with three different exercise plans:
- Overview of only easy back exercises
This was the easiest query to generate. I only had to use the âandâ operator to search for all exercises that had the values of being back exercises and have difficulty easy:
{{query (and (property :type exercise-back)(property :difficulty easy))}}
Snapshot of the results:
- Overview of both medium and hard back exercises
For this query I used both the âandâ and the âorâ operators. I used the âandâ operator to indicate that all results had to be back exercises. I then used the âorâ operator to indicate the difficulty of the exercise.
{{query (and (property :type exercise-back) (or (property :difficulty medium)(property :difficulty hard)))}}
Snapshot of the results:
- Overview of hard back exercises and warm up
This one took me ages to figure out. I finally managed with some help from @knowlost who is way more experienced with Boolean logic. The challenge with this query is that the only âwarm upâ exercise I have currently included has difficulty easy, not hard. Somehow I couldnât figure out how to have all hard back exercises show up and only the (easy) exercises that has warm-up as a value.
The solution:
{{query (or (property :type warm-up)(and (property :type exercise-back)(property :difficulty hard)))}}
Snapshot of the results:
And thatâs it!! For now at least. Spent way longer than my dedicated planned time on this today but it was a lot of fun. Looking forward to seeing more examples from others on here and to learn about advanced queries tomorrow!