Important notice; please read: You are being "sold" telescreens!

You are not the customer of Google or Apple, but rather their slave.

With recent announcements such as developer verification, Android is no longer an open platform. Plus, Samsung Android devices have turned into telescreens, now that bootloader unlocking is impossible! Google can refuse to verify developers they don't agree with! And you will have no way to run your own choice of software on these devices!

Similarly, to Apple the EU's DMA is nothing more than a formality, the apps still have to be verified! Remember that these changes are not for privacy or security, they are simply anti-competitive! You are never private or secure from the American company supplying one of these OSes!

When you can, refuse "buying" certified Androids or iThings! What is happening it is not normal, it ought to be illegal, and you do not own these devices! I am outraged, and you should be too!

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

Delete directory contents only

roundabout,
created on Friday, 19 April 2024, 15:02:13 (1713538933), received on Tuesday, 23 April 2024, 11:54:32 (1713873272)
Author identity: vlad <vlad.muntoiu@gmail.com>

dd2d2b862504e1b4b1a5cb9199ff0cc116c12e4f

ampoule_ssg/__init__.py

@@ -17,6 +17,14 @@ def in_directory(directory):

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    os.chdir(cwd)
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        def delete_directory_contents(directory):
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            for root, dirs, files in os.walk(directory):
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                for file in files:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    os.remove(os.path.join(root, file))
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                for dir in dirs:
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    shutil.rmtree(os.path.join(root, dir))
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                        
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                            class Document:
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                def __init__(self, file_name):
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    self.file_name = file_name
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        

@@ -111,7 +119,7 @@ class Site:

                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                def build(self):
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    # Clear the build directory if it exists.
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    if os.path.isdir(self.build_dir):
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    shutil.rmtree(self.build_dir)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                                    delete_directory_contents(self.build_dir)
                                        
                                        
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                    for location, page in self.pages.items():
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        # Create the required directories.
                                        
                                        
                                            
                                            
                                            
                                            
                                        
                                    
                                
                                
                                
                            
                                
                                    
                                        
                                            
                                                        os.makedirs(os.path.join(self.build_dir, os.path.dirname(location)), exist_ok=True)