Package: enderbyteprograms
Enderbyte Programs Internal LibrariesThis is a set of libraries used by Enderbyte Programs software. These libraries will be re-used.The public is welcome to use this if you find it usefulFiles Indexepadvertisements	Enderbyte Programs Advertisement. Get and show enderbyte programs advertisementsepappdata		A class of JSON-based appdata, read and write includedepdoc			Reader for Enderbyte Programs Documentation formatepprodkey		Generation and verification of Enderbyte Programs style product keyspngdim			Calculate PNG dimensions without PILDocumentationepadvertisementsVariablesPOST_MESSAGE		A message shown after the advertisement. Meant to be set to "buy x to remove"ADLIB_BASE		The link to the advertisement list in plaintextADS			A list of advertisementsgen_adverts(message="")message (str, optional): The POST_MESSAGE you wantgen_adverts sends a request to the adlib, downloads the ads and populates the ADS list.class Advertisement(url,msg)url is the url associated with the admsg is the message shown to the user (the ad content).Advertisement class controls advertisements. You propbably won't have to run the init yourself, as gen_adverts do it for youshow(stdscr)stdscr is a curses window object.Shows a cursesplus pop up with the associated adpublic variablesurl,msgepappdataVariablesWINDOWS		If the user is on a Microsoft Windows Operating systemAPP_NAME	The name of your appregister_app_name(name)name (str) is the name of your app. IT MUST BE CALLED BEFORE INITIALIZING AN APP DATA FILE as it will be used to choose a path for your app dataclass AppDataFileThis class behaves like a dictionary except with read and write options to commit to a diskinit(name)name is the name of the individual file. name is defaulted to dataInitialize a new App Data File. A directory is chosen and created at this stage.setdefault(data)data is a dictionary. It sets what default data should be used if the current data is empty or corrupt.loadReturns dictionaryLoads the data from the file path if it exists and returns it as a dictionary. The internal dictionary is also populated. The user is free to use the AppDataFile. THIS MUST BE CALLED BEFORE WRITING!update(data:dict)The internal dictionary within the ApPDatFile object is completely replaced with datawriteWrite app data to the disk** The functionsgetitem, keys, values, items, andsetitemfunction like a dictionary and thus, require no documentation**VARIABLESpath		The file pathdefault		Default datadata		Internal dictionaryepdocVariables(none)class EPDocFileAn object for Enderbyte Programs Documentation FilesVARIABLEStextblocks	Raw blocks of text based on chaptertext		Raw data from filename		The application nameinit(filetext,programname)filetext is the raw text of the documentationprogramname is the application nameWarning, you should not be calling this directly. Useload_from_textorload_from_fileon the module levelloadMust be called. Processes the data and generates chaptersread_from_name(stdscr,block_name)Show the text in cursesplus textview based on a provided namestdscr is a curses window objectblock_name is the chapter name you wish to seeread_from_index(stdscr,index)Show the text in cursesplus textview based on an indexstdscr is a curses window objectindex is the index you wish to readshow_documentation(stdscr)Interactively show the documentationstdscr is a curses window objectload_from_text(text,name)Wrapper to EPDocFile.initload_from_file(file,name)Read the file and return an EPDocFile. Set program name tonameepprodkeyVariablesDATA	The list of valid product keysclass ProductKeyData storage class for a product keyinit(s)S is the string representation of the keyVARIABLESs	String representation of the key
hex	SHA512 representationgenerate_product_keyGenerate and return a ProductKeyload_data(url)Load a key list from the urlcheck(inputs:str)returns booleanCheck if the provided raw string is a valid keypngdimis_png_image(data in bytes)Check if the provided bytes are a valid PNG imageclass PNGImageinit(data)Load PNG images based on byte dataVARIABLESdata	Raw datawidth	Image Widthheight	Image Heightis_valid_minecraft_server_imageChecks if image is a valid minecraft icon (64x64)load(file)Load the path provided and return a PNGImage