Advertisement
zDimacedRuler

Yearly Template

Feb 7th, 2024
804
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 10.20 KB | Source Code | 0 0
  1. ---
  2. creation_date: <% tp.file.creation_date() %>
  3. cssClasses: cards, cards-cols-3
  4. tags:
  5. ---
  6. ## <% tp.file.title %>
  7. %%Goals I want to achieve this Year%%
  8. <<[[<%tp.date.now("YYYY", "-1", tp.file.title, "YYYY") %>]] | [[<%tp.date.now("YYYY", "1", tp.file.title, "YYYY") %>]]>>
  9. ## Active Goals
  10. -
  11.  
  12. ## Goals Completed
  13. -
  14.  
  15. >[!Quote]+ Remember
  16. > ![[<%tp.date.now("YYYY", "-1", tp.file.title, "YYYY") %>#Where I see myself In one year]]
  17.  
  18. ## Review
  19. ### Where AM I now
  20.  
  21. ### Where I see myself In one year
  22.  
  23. ### Places I Have Been
  24. ```dataview
  25. TABLE
  26. FROM "Journal"
  27. WHERE Location!=null
  28. WHERE file.day.year = number(this.file.name)
  29. Group By split(Location, ":")[0] AS Location
  30. ```
  31.  
  32. ---
  33. ### Things I Consumed
  34.  
  35. #### Books I Completed
  36. ```dataview
  37. TABLE completed_on AS "Completed On"
  38. FROM "References/Books"
  39. WHERE completed_on AND date(completed_on).year = number(this.file.name)
  40. SORT completed_on
  41. ```
  42.  
  43. #### Movies I Watched
  44. ```dataview
  45. TABLE watched_on AS "Watched On"
  46. FROM "References/Movies And Series"
  47. WHERE contains(status, "3_Completed")
  48. WHERE contains(type, "movie")
  49. WHERE date(watched_on).year = number(this.file.name)
  50. SORT watched_on
  51. ```
  52.  
  53. ---
  54. ### Statistics
  55. ```dataviewjs
  56. dv.span("#### Meditation🧘 Calendar")
  57. const calendarData = {
  58.     year: <% tp.file.title %>,
  59.     colors: {
  60.         blue:        ["#8cb9ff", "#69a3ff", "#428bff", "#1872ff", "#0058e2"],
  61.         green:       ["#c6e48b", "#7bc96f", "#49af5d", "#2e8840", "#196127"],
  62.         red:         ["#ff9e82", "#ff7b55", "#ff4d1a", "#e73400", "#bd2a00"],
  63.         orange:      ["#ffa244", "#fd7f00", "#dd6f00", "#bf6000", "#9b4e00"],
  64.         pink:        ["#ff96cb", "#ff70b8", "#ff3a9d", "#ee0077", "#c30062"],
  65.         orangeToRed: ["#ffdf04", "#ffbe04", "#ff9a03", "#ff6d02", "#ff2c01"]
  66.     },
  67.     showCurrentDayBorder: true, // (optional) defaults to true
  68.     entries: [],                // (required) populated in the DataviewJS loop below
  69. }
  70.  
  71. //DataviewJS loop
  72. for (let page of dv.pages('"Journal/Diary"').where(p => p.Meditation)) {
  73.     //dv.span("<br>" + page.file.name) // uncomment for troubleshooting
  74.     calendarData.entries.push({
  75.         date: page.file.name,
  76.         intensity: page.Meditation_Duration,
  77.         color: "orange",
  78.         content: await dv.span(`[](${page.file.name})`), //for hover preview
  79.     })
  80. }
  81.  
  82. renderHeatmapCalendar(this.container, calendarData)
  83. ```
  84. ```tracker
  85. searchType: dvField
  86. searchTarget: Meditation_Duration
  87. startDate: <% tp.file.title %>-01-01
  88. endDate: <% tp.file.title %>-12-31
  89. folder: Journal/Diary
  90. summary:
  91.     template: "Number of Days I Meditated: {{numDaysHavingData()}} days\nLongest Streak: {{maxStreak()}} days\nTotal Hours Meditated: {{sum()/60}} hrs\nAverage Meditation Time: {{average()}} mins"
  92. ```
  93.  
  94. ```dataviewjs
  95. dv.span("#### Reading📚 Calendar")
  96. const calendarData = {
  97.     year: <% tp.file.title %>,
  98.     colors: {
  99.         blue:        ["#8cb9ff", "#69a3ff", "#428bff", "#1872ff", "#0058e2"],
  100.         green:       ["#c6e48b", "#7bc96f", "#49af5d", "#2e8840", "#196127"],
  101.         red:         ["#ff9e82", "#ff7b55", "#ff4d1a", "#e73400", "#bd2a00"],
  102.         orange:      ["#ffa244", "#fd7f00", "#dd6f00", "#bf6000", "#9b4e00"],
  103.         pink:        ["#ff96cb", "#ff70b8", "#ff3a9d", "#ee0077", "#c30062"],
  104.         orangeToRed: ["#ffdf04", "#ffbe04", "#ff9a03", "#ff6d02", "#ff2c01"]
  105.     },
  106.     showCurrentDayBorder: true,
  107.     entries: [],                // (required) populated in the DataviewJS loop below
  108. }
  109.  
  110. //DataviewJS loop
  111. for (let page of dv.pages('"Journal/Diary"').where(p => p.Reading)) {
  112.     //dv.span("<br>" + page.file.name) // uncomment for troubleshooting
  113.     calendarData.entries.push({
  114.         date: page.file.name,
  115.         intensity: page.Reading_Duration,
  116.         color: "red",
  117.         content: await dv.span(`[](${page.file.name})`), //for hover preview
  118.     })
  119. }
  120.  
  121. renderHeatmapCalendar(this.container, calendarData)
  122. ```
  123. ```tracker
  124. searchType: dvField
  125. searchTarget: Reading_Duration
  126. startDate: <% tp.file.title %>-01-01
  127. endDate: <% tp.file.title %>-12-31
  128. folder: Journal/Diary
  129. summary:
  130.     template: "Number of Days I Read: {{numDaysHavingData()}} days\nLongest Streak: {{maxStreak()}} days\nTotal Hrs Read: {{sum()/60}} hrs\nAverage Reading Time: {{average()}} mins"
  131. ```
  132.  
  133. ```dataviewjs
  134. dv.span("#### Writing🖋 Calendar")
  135. const calendarData = {
  136.     year: <% tp.file.title %>,
  137.     colors: {
  138.         blue:        ["#8cb9ff", "#69a3ff", "#428bff", "#1872ff", "#0058e2"],
  139.         green:       ["#c6e48b", "#7bc96f", "#49af5d", "#2e8840", "#196127"],
  140.         red:         ["#ff9e82", "#ff7b55", "#ff4d1a", "#e73400", "#bd2a00"],
  141.         orange:      ["#ffa244", "#fd7f00", "#dd6f00", "#bf6000", "#9b4e00"],
  142.         pink:        ["#ff96cb", "#ff70b8", "#ff3a9d", "#ee0077", "#c30062"],
  143.         orangeToRed: ["#ffdf04", "#ffbe04", "#ff9a03", "#ff6d02", "#ff2c01"]
  144.     },
  145.     showCurrentDayBorder: true, // (optional) defaults to true
  146.     entries: [],                // (required) populated in the DataviewJS loop below
  147. }
  148.  
  149. //DataviewJS loop
  150. for (let page of dv.pages('"Journal/Diary"').where(p => p.Writing)) {
  151.     //dv.span("<br>" + page.file.name) // uncomment for troubleshooting
  152.     calendarData.entries.push({
  153.         date: page.file.name,
  154.         intensity: page.Writing_Duration,
  155.         color: "green",
  156.         content: await dv.span(`[](${page.file.name})`), //for hover preview
  157.     })
  158. }
  159.  
  160. renderHeatmapCalendar(this.container, calendarData)
  161. ```
  162. ```tracker
  163. searchType: dvField
  164. searchTarget: Writing_Duration
  165. startDate: <% tp.file.title %>-01-01
  166. endDate: <% tp.file.title %>-12-31
  167. folder: Journal/Diary
  168. summary:
  169.     template: "Number of Days I Wrote: {{numDaysHavingData()}} days\nLongest Streak: {{maxStreak()}} days\nTotal Hrs Wrote: {{sum()/60}} hrs\nAverage Writing Time: {{average()}} mins"
  170. ```
  171.  
  172. ```dataviewjs
  173. dv.span("#### Excercise🦾 Calendar")
  174. const calendarData = {
  175.     year: <% tp.file.title %>,
  176.     colors: {
  177.         blue:        ["#8cb9ff", "#69a3ff", "#428bff", "#1872ff", "#0058e2"],
  178.         green:       ["#c6e48b", "#7bc96f", "#49af5d", "#2e8840", "#196127"],
  179.         red:         ["#ff9e82", "#ff7b55", "#ff4d1a", "#e73400", "#bd2a00"],
  180.         orange:      ["#ffa244", "#fd7f00", "#dd6f00", "#bf6000", "#9b4e00"],
  181.         pink:        ["#ff96cb", "#ff70b8", "#ff3a9d", "#ee0077", "#c30062"],
  182.         orangeToRed: ["#ffdf04", "#ffbe04", "#ff9a03", "#ff6d02", "#ff2c01"]
  183.     },
  184.     showCurrentDayBorder: true, // (optional) defaults to true
  185.     entries: [],                // (required) populated in the DataviewJS loop below
  186. }
  187.  
  188. //DataviewJS loop
  189. for (let page of dv.pages('"Journal/Diary"').where(p => p.Exercise)) {
  190.     //dv.span("<br>" + page.file.name) // uncomment for troubleshooting
  191.     calendarData.entries.push({
  192.         date: page.file.name,
  193.         intensity: page.Exercise_Duration,
  194.         color: "blue",
  195.         content: await dv.span(`[](${page.file.name})`), //for hover preview
  196.     })
  197. }
  198.  
  199. renderHeatmapCalendar(this.container, calendarData)
  200. ```
  201. ```tracker
  202. searchType: dvField
  203. searchTarget: Exercise_Duration
  204. startDate: <% tp.file.title %>-01-01
  205. endDate: <% tp.file.title %>-12-31
  206. folder: Journal/Diary
  207. summary:
  208.     template: "Number of Days I Excercised: {{numDaysHavingData()}} days\nLongest Streak: {{maxStreak()}} days\nTotal Hrs Excercised: {{sum()/60}} hrs\nAverage Excercising Time: {{average()}} mins"
  209. ```
  210. ### Spends
  211. ```dataview
  212. TABLE sum(rows.L.Cost) AS "Sum(₹)"
  213. FROM "Journal/Diary"
  214. FLATTEN file.lists as L
  215. Where L.Item!=null
  216. WHERE file.day.year = number(this.file.name)
  217. Group by L.Category As Category
  218. ```
  219. ```dataview
  220. TABLE WITHOUT ID " Total Sum: " + sum(rows.L.Cost) As Sum
  221. FROM "Journal/Diary"
  222. FLATTEN file.lists as L
  223. Where L.Item!=null
  224. WHERE file.day.year = number(this.file.name)
  225. Group By number(this.file.name) AS "Total Sum(₹)"
  226. ```
  227. ### Months
  228. #### [[<%tp.date.now("YYYY-MM", "PM", tp.file.title, "YYYY") %>]]: `= [[<%tp.date.now("YYYY-MM", "PM", tp.file.title, "YYYY") %>]].Monthly_Highlight`
  229. #### [[<%tp.date.now("YYYY-MM", "P1M", tp.file.title, "YYYY") %>]]: `= [[<%tp.date.now("YYYY-MM", "P1M", tp.file.title, "YYYY") %>]].Monthly_Highlight`
  230. #### [[<%tp.date.now("YYYY-MM", "P2M", tp.file.title, "YYYY") %>]]: `= [[<%tp.date.now("YYYY-MM", "P2M", tp.file.title, "YYYY") %>]].Monthly_Highlight`
  231. #### [[<%tp.date.now("YYYY-MM", "P3M", tp.file.title, "YYYY") %>]]: `= [[<%tp.date.now("YYYY-MM", "P3M", tp.file.title, "YYYY") %>]].Monthly_Highlight`
  232. #### [[<%tp.date.now("YYYY-MM", "P4M", tp.file.title, "YYYY") %>]]: `= [[<%tp.date.now("YYYY-MM", "P4M", tp.file.title, "YYYY") %>]].Monthly_Highlight`
  233. #### [[<%tp.date.now("YYYY-MM", "P5M", tp.file.title, "YYYY") %>]]: `= [[<%tp.date.now("YYYY-MM", "P5M", tp.file.title, "YYYY") %>]].Monthly_Highlight`
  234. #### [[<%tp.date.now("YYYY-MM", "P6M", tp.file.title, "YYYY") %>]]: `= [[<%tp.date.now("YYYY-MM", "P6M", tp.file.title, "YYYY") %>]].Monthly_Highlight`
  235. #### [[<%tp.date.now("YYYY-MM", "P7M", tp.file.title, "YYYY") %>]]: `= [[<%tp.date.now("YYYY-MM", "P7M", tp.file.title, "YYYY") %>]].Monthly_Highlight`
  236. #### [[<%tp.date.now("YYYY-MM", "P8M", tp.file.title, "YYYY") %>]]: `= [[<%tp.date.now("YYYY-MM", "P8M", tp.file.title, "YYYY") %>]].Monthly_Highlight`
  237. #### [[<%tp.date.now("YYYY-MM", "P9M", tp.file.title, "YYYY") %>]]: `= [[<%tp.date.now("YYYY-MM", "P9M", tp.file.title, "YYYY") %>]].Monthly_Highlight`
  238. #### [[<%tp.date.now("YYYY-MM", "P10M", tp.file.title, "YYYY") %>]]: `= [[<%tp.date.now("YYYY-MM", "P10M", tp.file.title, "YYYY") %>]].Monthly_Highlight`
  239. #### [[<%tp.date.now("YYYY-MM", "P11M", tp.file.title, "YYYY") %>]]: `= [[<%tp.date.now("YYYY-MM", "P11M", tp.file.title, "YYYY") %>]].Monthly_Highlight`
  240.  
  241. ### My Trips
  242. ```dataview
  243. TABLE WITHOUT ID
  244.     ("![|80](" + banner + ")") as Poster, file.link As Trip
  245. FROM "Journal/Event And Trips"
  246. WHERE date(trip_date).year = number(this.file.name)
  247. SORT trip_date DESC
  248. ```
  249. ### My Wins
  250. ```dataview
  251. LIST "<small>**" + My_Win + "**</small>"
  252. FROM "Journal/Diary"
  253. WHERE win
  254. WHERE file.cday.year = number(this.file.name)
  255. ```
  256.  
  257. ---
  258. ##
  259. > MOC::
  260. > Related::
  261. ```dataview
  262. TABLE WITHOUT ID  file.link + "<br>" + "<small>*Modified: "+file.mtime+"*</small> | <small>Created: "+file.ctime+"</small>" AS "See Also"
  263. FROM !outgoing([[#this.file.name]]) AND [[#this.file.name]]
  264. SORT file.name
  265. ```
  266.  
  267.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement