Update inkycal.py
This commit is contained in:
		| @@ -53,29 +53,41 @@ while True: | |||||||
|       else: |       else: | ||||||
|         print('not required. Continuing...') |         print('not required. Continuing...') | ||||||
|     else: |     else: | ||||||
|       print('Calibration skipped!. Please note that not calibrating epaper', |       print('Calibration skipped!. Please note that not calibrating e-paper', | ||||||
|             'displays causes ghosting') |             'displays causes ghosting') | ||||||
|  |  | ||||||
|     """----------------Generating and assembling images------""" |     """----------------Generating and assembling images------""" | ||||||
|     if top_section == 'Weather': |     if top_section == 'Weather': | ||||||
|       weather.main() |       try: | ||||||
|       weather_image = Image.open(image_path + 'weather.png') |         weather.main() | ||||||
|       image.paste(weather_image, (0, 0)) |         weather_image = Image.open(image_path + 'weather.png') | ||||||
|  |         image.paste(weather_image, (0, 0)) | ||||||
|  |       except: | ||||||
|  |         pass | ||||||
|  |  | ||||||
|     if middle_section == 'Calendar': |     if middle_section == 'Calendar': | ||||||
|       calendar.main() |       try: | ||||||
|       calendar_image = Image.open(image_path + 'calendar.png') |         calendar.main() | ||||||
|       image.paste(calendar_image, (0, middle_section_offset)) |         calendar_image = Image.open(image_path + 'calendar.png') | ||||||
|  |         image.paste(calendar_image, (0, middle_section_offset)) | ||||||
|  |       except: | ||||||
|  |         pass | ||||||
|        |        | ||||||
|     if middle_section == 'Agenda': |     if middle_section == 'Agenda': | ||||||
|       agenda.main() |       try: | ||||||
|       agenda_image = Image.open(image_path + 'agenda.png') |         agenda.main() | ||||||
|       image.paste(agenda_image, (0, middle_section_offset)) |         agenda_image = Image.open(image_path + 'agenda.png') | ||||||
|  |         image.paste(agenda_image, (0, middle_section_offset)) | ||||||
|  |       except: | ||||||
|  |         pass | ||||||
|        |        | ||||||
|     if bottom_section == 'RSS': |     if bottom_section == 'RSS': | ||||||
|       rss.main() |       try: | ||||||
|       rss_image = Image.open(image_path + 'rss.png') |         rss.main() | ||||||
|       image.paste(rss_image, (0, bottom_section_offset)) |         rss_image = Image.open(image_path + 'rss.png') | ||||||
|  |         image.paste(rss_image, (0, bottom_section_offset)) | ||||||
|  |       except: | ||||||
|  |         pass | ||||||
|  |  | ||||||
|     image.save(image_path + 'canvas.png') |     image.save(image_path + 'canvas.png') | ||||||
|     display.reduce_colours(image)     |     display.reduce_colours(image)     | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user