File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33
44(import ../date )
55
6- (def task- body-indentation " " )
6+ (def body-indentation " " )
77
88(defn- plan-title [plan ]
99 (string " # " (plan :title )))
1010
1111(defn- checkbox [done ]
1212 (if done " [X]" " [ ]" ))
1313
14- (defn- serialize-event [event ]
14+ (defn- serialize-event-title [event ]
1515 (string " - " (event :title )))
1616
17+ (defn- serialize-event-body [event ]
18+ (def body (event :body ))
19+ (if (or (nil? body ) (empty? body ))
20+ " "
21+ (string " \n "
22+ (string/join
23+ (map (fn [line ] (string body-indentation line )) body )
24+ " \n " ))))
25+
26+ (defn- serialize-event [event ]
27+ (string
28+ (serialize-event-title event )
29+ (serialize-event-body event )))
30+
1731(defn- task-mark [task ]
1832 (if (task :missed-on )
1933 (string " (missed on " (date/format (task :missed-on ) true ) " )" )
2842 " "
2943 (string " \n "
3044 (string/join
31- (map (fn [line ] (string task- body-indentation line )) body )
45+ (map (fn [line ] (string body-indentation line )) body )
3246 " \n " ))))
3347
3448(defn- serialize-task [task ]
35- (string (serialize-task-title task )
49+ (string
50+ (serialize-task-title task )
3651 (serialize-task-body task )))
3752
3853(defn- plan-inbox [plan serialize-empty-inbox ]
Original file line number Diff line number Diff line change 1515 :days @[(day/build-day (d/date 2020 8 3 ))
1616 (day/build-day (d/date 2020 8 2 ))
1717 (day/build-day (d/date 2020 8 1 )
18- @[(event/build-event " Talked to Mike" )]
18+ @[(event/build-event " Talked to Mike" @[ " - He has a new car " ] )]
1919 @[(task/build-task " Develop photos" false )
2020 (task/build-task " Pay bills" true @[" - Electricity" " - Water" ])
2121 (task/build-missed-task " Organize photos" (d/date 2020 7 20 ))])
3838 ## 2020-08-01, Saturday
3939
4040 - Talked to Mike
41+ - He has a new car
4142 - [ ] Develop photos
4243 - [X] Pay bills
4344 - Electricity
You can’t perform that action at this time.
0 commit comments