Changes between Version 11 and Version 12 of WikiStart


Ignore:
Timestamp:
09/01/24 13:56:41 (9 months ago)
Author:
Enrico Schwass
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • WikiStart

    v11 v12  
    1313see source:flowtimer@guix for the development branch
    1414
    15 {{{#!json
    16 {
    17   "phase_list": [
    18     {
    19       "title": "Huddle",
    20       "duration": 10
    21     },
    22     {
    23       "title": "Tasking",
    24       "duration": 5
    25     },
    26     {
    27       "title": "Work",
    28       "duration": 45
    29     },
    30     {
    31       "title": "Break",
    32       "duration": 15
    33     }
    34   ],
    35   "repetitions": 3
    36 }
    37 }}}
    38 
    3915
    4016{{{#!python
    4117
     18import json
    4219from Phase import Phase
    4320from RecurringPhaseSequence import RecurringPhaseSequence
    4421from Schedule import Schedule
    4522
    46 p1 = Phase('Huddle', 10)
    47 p2 = Phase('Tasking', 5)
    48 p3 = Phase('Work', 45)
    49 p4 = Phase('Break', 15)
     23p1 = Phase('Huddle', 600)
     24p2 = Phase('Tasking', 600)
     25p3 = Phase('Work', 2700)
     26p4 = Phase('Sync', 600)
     27p5 = Phase('Break', 900)
    5028
    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)
     29seq1 = RecurringPhaseSequence(title = 'Morning', phases = [p2, p3, p4, p5], repetitions=3)
     30schedule = Schedule(p1, seq1).to_json()
    5431}}}
     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}}}