コード例 #1
0
    def command_productive_pie_all(self, update=None, context=None):
        focused, = self.parse_args(
            context,
            int)  # taking a boolean value as int. Expecting only 0 or 1.

        pie_file = get_productivity_pie(data=self.datafolder.data,
                                        save=True,
                                        focused=bool(focused))

        self.send_image(pie_file, update)
コード例 #2
0
    def command_productive_pie_year(self, update=None, context=None):
        year, focused = self.parse_args(context, int, int)
        f = TimeFilter_Year(year)

        pie_file = get_productivity_pie(data=f % self.datafolder.data,
                                        selected_time=f._selected_time,
                                        save=True,
                                        focused=bool(focused))

        self.send_image(pie_file, update)
コード例 #3
0
    def command_productive_pie_today(self, update=None, context=None):
        focused, = self.parse_args(
            context,
            int)  # taking a boolean value as int. Expecting only 0 or 1.
        f = TimeFilter_Days(1)

        pie_file = get_productivity_pie(data=f % self.datafolder.data,
                                        selected_time=f._selected_time,
                                        save=True,
                                        focused=bool(focused))

        self.send_image(pie_file, update)
コード例 #4
0
    def command_productive_pie_yesterday(self, update=None, context=None):
        focused, = self.parse_args(
            context,
            int)  # taking a boolean value as int. Expecting only 0 or 1.

        stop_time = get_midnight(datetime.datetime.now())
        start_time = get_midnight(stop_time - datetime.timedelta(days=1))

        f = TimeFilter_DateRange(start_time, stop_time)

        pie_file = get_productivity_pie(data=f % self.datafolder.data,
                                        selected_time=f._selected_time,
                                        save=True,
                                        focused=bool(focused))

        self.send_image(pie_file, update)
コード例 #5
0
from TimeCsv.functions.sleep import get_sleep_statistics
from TimeCsv.functions.blog import get_blog_statistics
from TimeCsv.functions.productivity import get_productivity_pie

if __name__ == '__main__':
	# get_sleep_statistics()
	# get_blog_statistics()
	get_productivity_pie(save=False)