MCPcopy Create free account
hub / github.com/chubin/cheat.sh / _github_button

Function _github_button

lib/frontend/html.py:56–74  ·  view source on GitHub ↗
(topic_type)

Source from the content-addressed store, hash-verified

54
55
56def _github_button(topic_type):
57
58 full_name = GITHUB_REPOSITORY.get(topic_type, "")
59 if not full_name:
60 return ""
61
62 short_name = full_name.split("/", 1)[1] # pylint: disable=unused-variable
63
64 button = (
65 "<!-- Place this tag where you want the button to render. -->"
66 '<a aria-label="Star %(full_name)s on GitHub"'
67 ' data-count-aria-label="# stargazers on GitHub"'
68 ' data-count-api="/repos/%(full_name)s#stargazers_count"'
69 ' data-count-href="/%(full_name)s/stargazers"'
70 ' data-icon="octicon-star"'
71 ' href="https://github.com/%(full_name)s"'
72 ' class="github-button">%(short_name)s</a>'
73 ) % locals()
74 return button
75
76
77def _render_html(

Callers 1

visualizeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected