2019-02-26 16:23:58 +01:00
|
|
|
from DebugInterface import DebugInterface
|
2019-02-28 15:17:43 +01:00
|
|
|
from Assets import weathericons
|
2019-02-26 16:23:58 +01:00
|
|
|
|
|
|
|
class DebugConsole (DebugInterface):
|
|
|
|
"""Defines concrete console export of debug objects"""
|
|
|
|
def print_event (self, event):
|
|
|
|
print("\nCalendarEvent:")
|
|
|
|
print("---------------------")
|
|
|
|
print('Begin datetime: ' + str(event.begin_datetime))
|
|
|
|
print('End datetime: ' + str(event.end_datetime))
|
2019-04-02 14:36:17 +02:00
|
|
|
print('Duration: ' + str(event.duration))
|
|
|
|
print('All day: ' + str(event.allday))
|
|
|
|
print('RRULE: ' + str(event.rrule))
|
2019-02-26 16:23:58 +01:00
|
|
|
print('Title: ' + str(event.title))
|
|
|
|
print('Description: ' + str(event.description))
|
|
|
|
print('Attendees: ' + str(event.attendees))
|
|
|
|
print('Highlight: ' + str(event.highlight))
|
|
|
|
print('Calendar name: ' + str(event.calendar_name))
|
|
|
|
print('Location: ' + str(event.location))
|
|
|
|
print('Fetch datetime: ' + str(event.fetch_datetime))
|
|
|
|
|
|
|
|
def print_forecast (self, forecast):
|
|
|
|
print("\nWeatherForecast:")
|
|
|
|
print("---------------------")
|
|
|
|
print('Air temperature: ' + str(forecast.air_temperature))
|
|
|
|
print('Air humidity: ' + str(forecast.air_humidity))
|
|
|
|
print('Air pressure: ' + str(forecast.air_pressure))
|
|
|
|
print('Rain probability: ' + str(forecast.rain_probability))
|
|
|
|
print('Rain amount: ' + str(forecast.rain_amount))
|
|
|
|
print('Snow amount: ' + str(forecast.snow_amount))
|
|
|
|
print('Sunrise-time: ' + str(forecast.sunrise))
|
|
|
|
print('Sunset time: ' + str(forecast.sunset))
|
|
|
|
print('Moon phase: ' + str(forecast.moon_phase))
|
|
|
|
print('Wind speed: ' + str(forecast.wind_speed))
|
|
|
|
print('Cloudiness: ' + str(forecast.clouds))
|
|
|
|
print('Icon code: ' + str(forecast.icon))
|
|
|
|
print('weather-icon name: ' + str(weathericons[forecast.icon]))
|
|
|
|
print('Short description: ' + str(forecast.short_description))
|
|
|
|
print('Detailed description: ' + str(forecast.detailed_description))
|
|
|
|
print('Units: ' + str(forecast.units))
|
|
|
|
print('Datetime: ' + str(forecast.datetime))
|
|
|
|
print('Location: ' + str(forecast.location))
|
|
|
|
print('Fetch datetime: ' + str(forecast.fetch_datetime))
|
|
|
|
|
2019-02-27 17:13:59 +01:00
|
|
|
def print_line (self, content):
|
2019-02-26 16:23:58 +01:00
|
|
|
if content is None:
|
|
|
|
return
|
|
|
|
print(str(content))
|