From c4cac889005d065ec38549d29f64dde800ac1ba3 Mon Sep 17 00:00:00 2001 From: Delasie Torkornoo Date: Wed, 5 Jun 2024 13:59:12 -0400 Subject: [PATCH] fix: added meta data to generated HTML --- readalongs/text/make_package.py | 5 +++++ readalongs/text/util.py | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/readalongs/text/make_package.py b/readalongs/text/make_package.py index bf016a38..72a35757 100644 --- a/readalongs/text/make_package.py +++ b/readalongs/text/make_package.py @@ -20,6 +20,7 @@ from lxml import etree +from readalongs._version import __version__ from readalongs.log import LOGGER JS_BUNDLE_URL = "https://unpkg.com/@readalongs/web-component@^1.4.0/dist/bundle.js" @@ -33,6 +34,9 @@ + + + {title} @@ -164,4 +168,5 @@ def create_web_component_html( header=header, subheader=subheader, theme=theme, + studio_version=__version__, ) diff --git a/readalongs/text/util.py b/readalongs/text/util.py index 09de4874..f8a54ced 100644 --- a/readalongs/text/util.py +++ b/readalongs/text/util.py @@ -19,6 +19,8 @@ from lxml import etree +from readalongs._version import __version__ + # removed "try: unicode() except" block (was for Python 2), but this file uses unicode() # too many times, so define it anyway. unicode = str @@ -207,6 +209,9 @@ def copy_file_to_zip(zip_path, origin_path, destination_path): + + + {title} @@ -245,6 +250,7 @@ def save_minimal_index_html( header=header, subheader=subheader, version=CURRENT_WEB_APP_VERSION, + studio_version=__version__, ) )