Changes between Version 11 and Version 12 of WikiStart
- Timestamp:
- 09/01/24 13:56:41 (9 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
WikiStart
v11 v12 13 13 see source:flowtimer@guix for the development branch 14 14 15 {{{#!json16 {17 "phase_list": [18 {19 "title": "Huddle",20 "duration": 1021 },22 {23 "title": "Tasking",24 "duration": 525 },26 {27 "title": "Work",28 "duration": 4529 },30 {31 "title": "Break",32 "duration": 1533 }34 ],35 "repetitions": 336 }37 }}}38 39 15 40 16 {{{#!python 41 17 18 import json 42 19 from Phase import Phase 43 20 from RecurringPhaseSequence import RecurringPhaseSequence 44 21 from Schedule import Schedule 45 22 46 p1 = Phase('Huddle', 10) 47 p2 = Phase('Tasking', 5) 48 p3 = Phase('Work', 45) 49 p4 = Phase('Break', 15) 23 p1 = Phase('Huddle', 600) 24 p2 = Phase('Tasking', 600) 25 p3 = Phase('Work', 2700) 26 p4 = Phase('Sync', 600) 27 p5 = Phase('Break', 900) 50 28 51 seq1 = RecurringPhaseSequence(phase_list = [p1, p2, p3, p4], repetitions=3) 52 unrolled = [[deepcopy(seq) for seq in [each for each in seq1.repetitions * seq1.phase_list]]] 53 schedule = Schedule(unrolled) 29 seq1 = RecurringPhaseSequence(title = 'Morning', phases = [p2, p3, p4, p5], repetitions=3) 30 schedule = Schedule(p1, seq1).to_json() 54 31 }}} 32 33 {{{#!json 34 { "title": "Morning", 35 "blocks": [ 36 {"type": "Phase", 37 "title": "Huddle", 38 "initial_ticks": 600 39 }, 40 {"type": "Sequence", 41 "title": "AM", 42 "sequence": [ 43 { 44 "title": "Tasking", 45 "initial_ticks": 600 46 }, 47 { 48 "title": "Working", 49 "initial_ticks": 2700 50 }, 51 { 52 "title": "Syncing", 53 "initial_ticks": 600 54 }, 55 { 56 "title": "Break", 57 "initial_ticks": 900 58 } 59 ], 60 "initial_repetitions": 3 61 } ] 62 } 63 }}}