MCPcopy Create free account
hub / github.com/fatihak/InkyPi / generate_image

Method generate_image

src/plugins/github/github.py:21–36  ·  view source on GitHub ↗
(self, settings, device_config)

Source from the content-addressed store, hash-verified

19 return template_params
20
21 def generate_image(self, settings, device_config):
22 try:
23 github_type = settings.get('githubType', 'contributions')
24
25 if github_type == 'contributions':
26 return contributions_generate_image(self, settings, device_config)
27 elif github_type == 'sponsors':
28 return sponsors_generate_image(self, settings, device_config)
29 elif github_type == 'stars':
30 return stars_generate_image(self, settings, device_config)
31 else:
32 logger.error(f"Unknown GitHub type: {github_type}")
33 raise ValueError(f"Unknown GitHub type: {github_type}")
34 except Exception as e:
35 logger.error(f"GitHub image generation failed: {str(e)}")
36 raise

Callers

nothing calls this directly

Calls 3

sponsors_generate_imageFunction · 0.85
stars_generate_imageFunction · 0.85

Tested by

no test coverage detected