diff --git a/README.md b/README.md new file mode 100644 index 0000000..e5e2a5d --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +# Dextensify + +## Copyright: +This repository is licensed under the MIT License. + +``` +Copyright (c) 2023 ading2210 + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +``` \ No newline at end of file diff --git a/build.py b/build.py index 1e01bf2..ee2bb75 100644 --- a/build.py +++ b/build.py @@ -3,15 +3,11 @@ import base64 base_path = pathlib.Path(__file__).resolve().parent -template_path = base_path / "template.html" -out_path = base_path / "generated" +template_path = base_path / "main.html" +out_path = base_path / "data_url.txt" html = template_path.read_text() -out_file = out_path / f"main.html" -out_file.write_text(html) - minified = minify_html.minify(html, minify_js=True, do_not_minify_doctype=True, minify_css=True) html_encoded = base64.b64encode(minified.encode()).decode() data_url = f"data:text/html;base64,{html_encoded}" -data_file = out_path / "data_url.txt" -data_file.write_text(data_url) \ No newline at end of file +out_path.write_text(data_url) \ No newline at end of file diff --git a/data_url.txt b/data_url.txt new file mode 100644 index 0000000..8998f85 --- /dev/null +++ b/data_url.txt @@ -0,0 +1 @@ +data:text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SBBTkQgTk9OSU5GUklOR0VNRU5ULiBJTiBOTyBFVkVOVCBTSEFMTCBUSEUKQVVUSE9SUyBPUiBDT1BZUklHSFQgSE9MREVSUyBCRSBMSUFCTEUgRk9SIEFOWSBDTEFJTSwgREFNQUdFUyBPUiBPVEhFUgpMSUFCSUxJVFksIFdIRVRIRVIgSU4gQU4gQUNUSU9OIE9GIENPTlRSQUNULCBUT1JUIE9SIE9USEVSV0lTRSwgQVJJU0lORyBGUk9NLApPVVQgT0YgT1IgSU4gQ09OTkVDVElPTiBXSVRIIFRIRSBTT0ZUV0FSRSBPUiBUSEUgVVNFIE9SIE9USEVSIERFQUxJTkdTIElOIFRIRQpTT0ZUV0FSRS48L3ByZT48L2RldGFpbHM+PC9kaXY+ \ No newline at end of file diff --git a/template.html b/main.html similarity index 97% rename from template.html rename to main.html index 4acf821..9e35460 100644 --- a/template.html +++ b/main.html @@ -1,7 +1,7 @@ - LTMEAT on generic webpages + Dextensify