You've already forked wakapi-readme-stats
embedding fallback :(
This commit is contained in:
@@ -147,9 +147,10 @@ class GitHubManager:
|
|||||||
except UnknownObjectException:
|
except UnknownObjectException:
|
||||||
GitHubManager.REPO.create_file(chart_path, "Charts Added", data, committer=GitHubManager._get_author())
|
GitHubManager.REPO.create_file(chart_path, "Charts Added", data, committer=GitHubManager._get_author())
|
||||||
DBM.g("Lines of code chart created!")
|
DBM.g("Lines of code chart created!")
|
||||||
|
return f"**{FM.t('Timeline')}**\n\n\n\n"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
DBM.i("Inlining chart...")
|
DBM.i("Inlining chart...")
|
||||||
chart_path = f"data:image/png;base64,{b64encode(data).decode('utf-8')}"
|
hint = f"You can use [this website](https://codebeautify.org/base64-to-image-converter) to view the generated image."
|
||||||
|
encoded_image = f"data:image/png;base64,{b64encode(data).decode('utf-8')}"
|
||||||
return f"**{FM.t('Timeline')}**\n\n\n\n"
|
return f"<details>\n\t<summary>Base64 encoded image</summary>\n\t```\t\n{encoded_image}\t\n```</details>\n\n{hint}"
|
||||||
|
|||||||
Reference in New Issue
Block a user