wiki:WikiStart

Version 12 (modified by Enrico Schwass, 17 months ago) ( diff )

--

Welcome to Playground project

Various code samples

SplitLists

SplitListsRecursivly

Sample project flowtimer

see source:flowtimer@master for the master branch

see source:flowtimer@guix for the development branch

import json
from Phase import Phase
from RecurringPhaseSequence import RecurringPhaseSequence
from Schedule import Schedule

p1 = Phase('Huddle', 600)
p2 = Phase('Tasking', 600)
p3 = Phase('Work', 2700)
p4 = Phase('Sync', 600)
p5 = Phase('Break', 900)

seq1 = RecurringPhaseSequence(title = 'Morning', phases = [p2, p3, p4, p5], repetitions=3)
schedule = Schedule(p1, seq1).to_json()
{ "title": "Morning",
  "blocks": [
      {"type": "Phase",
       "title": "Huddle",
       "initial_ticks": 600
      },
      {"type": "Sequence",
       "title": "AM",
       "sequence": [
           {
               "title": "Tasking",
               "initial_ticks": 600
           },
           {
               "title": "Working",
               "initial_ticks": 2700
           },
           {
               "title": "Syncing",
               "initial_ticks": 600
           },
           {
               "title": "Break",
               "initial_ticks": 900
           }
       ],
       "initial_repetitions": 3
      }  ]
}
Note: See TracWiki for help on using the wiki.