From c918ad4689f2bdf8bb425d3998c32a551d4462b9 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 14 Feb 2014 19:13:01 +0100 Subject: specs for periodically MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/__main__.py | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/__main__.py b/src/__main__.py index e0266c8..d6ae045 100755 --- a/src/__main__.py +++ b/src/__main__.py @@ -20,23 +20,39 @@ from colour import * from curve import * -temperature(6500, lambda T : divide_by_maximum(series_d(T)), True) -temperature(6500, lambda T : clip_whitepoint(simple_whitepoint(T)), True) -temperature(6500, cmf_2deg, True) -temperature(6500, cmf_10deg, True) -rgb_contrast(1.0, 1.0, 1.0) -cie_contrast(1.0) -rgb_brightness(1.0, 1.0, 1.0) -cie_brightness(1.0) -gamma(1.0, 1.0, 1.0) -sigmoid(None, None, None) -manipulate(lambda r : r, lambda g : g, lambda b : b) -clip() +def periodically(year, month, day, hour, minute, second, weekday): + ''' + Invoked periodically + + @param year:int The year + @param month:int The month, 1 = January, 12 = December + @param day:int The day, minimum value is 1, probable maximum value is 31 (*) + @param hour:int The hour, minimum value is 0, maximum value is 23 + @param minute:int The minute, minimum value is 0, maximum value is 59 + @param second:int The second, minimum value is 0, probable maximum value is 60 (**) + @param weekday:int The weekday, 1 = Monday, 7 = Sunday + + (*) Can be exceeded it the calendar system is changed, like in 1712-(02)Feb-30 + (**) See https://en.wikipedia.org/wiki/Leap_second + ''' + temperature(6500, lambda T : divide_by_maximum(series_d(T)), True) + temperature(6500, lambda T : clip_whitepoint(simple_whitepoint(T)), True) + temperature(6500, cmf_2deg, True) + temperature(6500, cmf_10deg, True) + rgb_contrast(1.0, 1.0, 1.0) + cie_contrast(1.0) + rgb_brightness(1.0, 1.0, 1.0) + cie_brightness(1.0) + gamma(1.0, 1.0, 1.0) + sigmoid(None, None, None) + manipulate(lambda r : r, lambda g : g, lambda b : b) + clip() ## Set globals accessible by rc -global DATADIR, i_size, o_size, r_curve, g_curve, b_curve, clip_result +periodically = None +global DATADIR, i_size, o_size, r_curve, g_curve, b_curve, clip_result, periodically ## Load extension and configurations via ponysayrc -- cgit v1.2.3-70-g09d2