From aa55876b781c1ddda63c71e0cc47dbd552b8e64e Mon Sep 17 00:00:00 2001 From: pseusys Date: Sun, 26 Feb 2023 13:30:38 +0100 Subject: [PATCH] embedding fallback :( --- sources/manager_github.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sources/manager_github.py b/sources/manager_github.py index 8d963f3..69220dc 100644 --- a/sources/manager_github.py +++ b/sources/manager_github.py @@ -147,9 +147,10 @@ class GitHubManager: except UnknownObjectException: GitHubManager.REPO.create_file(chart_path, "Charts Added", data, committer=GitHubManager._get_author()) DBM.g("Lines of code chart created!") + return f"**{FM.t('Timeline')}**\n\n![Lines of Code chart]({chart_path})\n\n" else: DBM.i("Inlining chart...") - chart_path = f"data:image/png;base64,{b64encode(data).decode('utf-8')}" - - return f"**{FM.t('Timeline')}**\n\n![Lines of Code chart]({chart_path})\n\n" + 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"
\n\tBase64 encoded image\n\t```\t\n{encoded_image}\t\n```
\n\n{hint}"