+# Timetra is a time tracking application and library.
+# Copyright © 2010-2012 Andrey Mikhaylenko
+# This file is part of Timetra.
+# Timetra is free software: you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published
+# by the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+# Timetra is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU Lesser General Public License for more details.
+# You should have received a copy of the GNU Lesser General Public License
+# along with Timer. If not, see <http://gnu.org/licenses/>.
+:copyright: Andy Mikhaylenko, 2012
+from timetra import storage
+ for f in reversed(facts):
+ if f.activity == 'sleeping':
+ after_sleep = reversed(remainder)
+ message = u'Please plan the day'
+ if any(True for x in after_sleep if x.activity == 'sorting-tasks'):
+ message = u'You seem to have planned the day, OK'
+ """ Returns a generator or messages that give some hints re given day.
+ facts = storage.get_facts_for_day()
+ rules = [check_planning_after_sleep]