from qpage import *
import webbrowser
if __name__=="__main__":
        try:
            print("QPAGE By Sepand Haghighi")
            print("Version : "+version)
            clear_folder(out_dir) # clear all of files in output directory
            page_name_update() # update page names
            for i in actual_name:
                html_init(i) # create pages html files
            menu_writer() # write menu for each html file
    
            for i in actual_name:
                contain(i) # write contains of each page
                html_end(i) # end tags of each page
            css_creator() # create css file
            print("Homepage is ready")
            print("Upload output folder contains directly to your host")
            print("Please Dont Change HTML Files Name")
            browse=int(input("Preview Homepage?[1] or Not[2]"))
            if browse==1:
                preview()
                
        except FileNotFoundError: # error exception in FileNotFound ( When Something Missed)
            print ("Some File Missed!!")
            print ("Please Check Following :\n 1.Where Is Your Resume File? It should be in doc folder  \n 2.Where is your profile image file? it should be in image folder")
            print (" 3.Where is each page description text file? They Should be in doc folder ")
            input("")
        except ValueError:
            print("Bad Input")
            input("")
            
            

    
    


@@ -17,25 +17,8 @@
 t *%0A
-import webbrowser
 %0Aif 
@@ -25,18 +25,20 @@
 __name__
+ 
 ==
+ 
 %22__main_
@@ -49,21 +49,13 @@
     
-  
-  
 try:%0A
-    
     
@@ -96,28 +96,24 @@
 i%22)%0A        
-    
 print(%22Versi
@@ -122,9 +122,11 @@
  : %22
-+
+ + 
 vers
@@ -138,20 +138,16 @@
         
- 
-   
 clear_fo
@@ -159,16 +159,17 @@
 out_dir)
+ 
  # clear
@@ -210,20 +210,16 @@
         
-  
-  
 page_nam
@@ -228,16 +228,17 @@
 update()
+ 
  # updat
@@ -250,20 +250,16 @@
 e names%0A
-    
         
@@ -288,28 +288,24 @@
             
-    
 html_init(i)
@@ -304,16 +304,17 @@
 _init(i)
+ 
  # creat
@@ -340,20 +340,16 @@
         
- 
-   
 menu_wri
@@ -353,16 +353,17 @@
 writer()
+ 
  # write
@@ -387,25 +387,17 @@
 ml file%0A
-    %0A    
+%0A
         
@@ -430,20 +430,16 @@
         
-  
-  
 contain(
@@ -440,16 +440,17 @@
 ntain(i)
+ 
  # write
@@ -464,36 +464,32 @@
 ns of each page%0A
-    
             html
@@ -495,16 +495,17 @@
 l_end(i)
+ 
  # end t
@@ -529,20 +529,16 @@
         
-    
 css_crea
@@ -542,16 +542,17 @@
 reator()
+ 
  # creat
@@ -566,28 +566,24 @@
 ile%0A        
-    
 print(%22Homep
@@ -601,28 +601,24 @@
 y%22)%0A        
-   
- 
 print(%22Uploa
@@ -670,28 +670,24 @@
 t%22)%0A        
-    
 print(%22Pleas
@@ -730,19 +730,17 @@
     
- 
-   
 browse
-=
+ = 
 int(
@@ -788,20 +788,16 @@
         
-    
 if brows
@@ -797,18 +797,20 @@
 f browse
+ 
 ==
+ 
 1:%0A     
@@ -816,20 +816,16 @@
         
-  
-  
 preview(
@@ -830,29 +830,9 @@
 w()%0A
-                %0A    
+%0A
     
@@ -856,16 +856,17 @@
 ndError:
+ 
  # error
@@ -917,20 +917,16 @@
 Missed)%0A
-    
         
@@ -930,17 +930,16 @@
    print
- 
 (%22Some F
@@ -961,27 +961,35 @@
         
-    
 print
- 
 (
+%0A            
 %22Please 
@@ -1147,18 +1147,13 @@
     
-    
 print
- 
 (%22 3
@@ -1227,36 +1227,32 @@
 lder %22)%0A        
-  
-  
 input(%22%22)%0A      
@@ -1241,28 +1241,24 @@
   input(%22%22)%0A
-    
     except V
@@ -1272,28 +1272,24 @@
 or:%0A        
- 
-   
 print(%22Bad I
@@ -1299,28 +1299,24 @@
 t%22)%0A        
-   
- 
 input(%22%22)%0A  
@@ -1317,42 +1317,4 @@
 %22%22)%0A
-            %0A            %0A%0A    %0A    %0A%0A

reformat file