wiki:WikiStart

Version 17 (modified by Enrico Schwass, 9 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 flowtimer.Phase import Phase
from flowtimer.RecurringPhaseSequence import RecurringPhaseSequence
from flowtimer.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 = 'AM', phases = [p2, p3, p4, p5], repetitions=3)
schedule = Schedule(title = 'Morning', blocks= [p1, seq1])
json_string = schedule.to_json()

schedule2 = Schedule.from_json(json_string)
schedule2.tick(60)

schedule2.total_ticks_left() # 14940 
Error: Failed to load processor json
No macro or processor named 'json' found

You can provide a color scheme at start for coloring each Phase.

Error: Failed to load processor bash
No macro or processor named 'bash' found

If a phase with a given title is not found in this scheme, the default scheme is applied.

Error: Failed to load processor json
No macro or processor named 'json' found
Note: See TracWiki for help on using the wiki.