A mirror of my website's source code.

By using this site, you agree to have cookies stored on your device, strictly for functional purposes, such as storing your session and preferences.

Dismiss

Add a variable that tracks the final file location of list files

steve0greatness,
created on Saturday, 20 January 2024, 06:26:40 (1705732000), received on Monday, 6 May 2024, 02:55:35 (1714964135)
Author identity: Steve0Greatness <75220768+Steve0Greatness@users.noreply.github.com>

7ea67d14de9a07fe8bd7078593ccdcca227f2b05

build.py

@@ -186,8 +186,9 @@ def RenderLists():

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                Lists = GetLists()
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                CreateDirectory(BUILD_DIRECTORY + "/list/")
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                for List in Lists:
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                print("%s -> %s" % ("lists/" + List["filename"], BUILD_DIRECTORY + "/list/" + List["filename"].replace(".yml", ".html")))
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                with open(BUILD_DIRECTORY + "/list/" + List["filename"].replace(".yml", ".html"), "w") as file:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                FileLocation = BUILD_DIRECTORY + "/list/" + List["filename"].replace(".yml", ".html")
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                print("%s -> %s" % ("lists/" + List["filename"], FileLocation))
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                with open(FileLocation, "w") as file:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        file.write(RenderTemplate("list.html", Content=List["content"], Title=List["title"]))
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            if __name__ == "__main__":