diff --git a/src/SID/FlashcordCompiler.py b/src/SID/FlashcordCompiler.py index 1db4801..3588a07 100644 --- a/src/SID/FlashcordCompiler.py +++ b/src/SID/FlashcordCompiler.py @@ -1,5 +1,23 @@ +''' +Notice: I'm dog shit at Python. No seriously. +This script compiles every single CSS File in the input_files array to produce a singular file to be uploaded at +https://sirio-network.com/flashcord/sid.css (or lpm.css or stb.css) +I honestly have no idea how this script works and it's half assed (?). +Ever since Flashcord versions "compiled" past or during January 2024, every single file except lpm.css (due to Replugged restrictions) +are minimized manually and are inserted manually at the beginning the following string: + +/* WARNING: The file you have opened is not meant to be edited and isn't user friendly. +Please open https://github.com/SiriusBYT/Flashcord/tree/main/src/ and clone the folder that concerns your installed Flashcord Branch. + +Please remind yourself also to read https://github.com/SiriusBYT/Flashcord/blob/main/LICENSE.md before modifying Flashcord. +If you can't be bothered doing that, just know that: +This license requires that re-users give credit to the creator. It allows re-users to copy and distribute the material in any medium or format in unadapted form and for noncommercial purposes only. +[Flashcord] © 2023 by [SiriusBYT] is licensed under [CC BY-NC-ND 4.0]. (Exceptions to the license's restrictions may and will apply.) */ +''' + def merge_files(): - input_files = ["0-BIOS.css", + input_files = [ + "0-BIOS.css", "0-Kernel_Ring0.css", "0-Kernel_Ring1.css", "0-Kernel_Ring2.css", @@ -13,7 +31,7 @@ def merge_files(): "3-MGM_00-Control.css", "3-MGM_00-Control-MAT.css", "3-MGM_00-Control-AT.css", - "3-MGM_01-ChatEx.css", + "3-MGM_01-ChatEX.css", "3-MGM_01-ChatIn.css", "3-MGM_02-OTUI_Base.css", "3-MGM_02-OTUI_Pop.css", @@ -25,16 +43,15 @@ def merge_files(): "6-CFIX_RTHEME.css", "6-CLIST_RPLUGIN.css", "6-CLIST_RTHEME.css", - "7-Lang.css"] - output_file = "sid.css" # Specify the output file path here - + "7-Lang.css" + ] + output_file = "sid.css" try: with open(output_file, 'w', encoding='utf-8') as out_file: for input_file in input_files: try: with open(input_file, 'r', encoding='utf-8') as in_file: - out_file.write(in_file.read()) - out_file.write('\n') # Add a newline between the content of each file + out_file.write((in_file.read().replace("\n", ""))) # The .replace() frees like 20kb btw LMFAO except FileNotFoundError: print(f"Warning: File '{input_file}' not found. Skipping...") print("Files merged successfully!") @@ -42,4 +59,4 @@ def merge_files(): print(f"Error merging files: {e}") if __name__ == "__main__": - merge_files() \ No newline at end of file + merge_files()