| 
						
						
							
								
							
						
						
					 | 
					 | 
					@ -113,6 +113,7 @@ def exists(**_args):
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return os.path.exists(_path)
 | 
					 | 
					 | 
					 | 
					    return os.path.exists(_path)
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def html(_uri,_config) :
 | 
					 | 
					 | 
					 | 
					def html(_uri,_config) :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # _html = (open(uri)).read()   
 | 
					 | 
					 | 
					 | 
					    # _html = (open(uri)).read()   
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					    
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _path = _realpath(_uri,_config) 
 | 
					 | 
					 | 
					 | 
					    _path = _realpath(_uri,_config) 
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _context = str(_config['system']['context'])
 | 
					 | 
					 | 
					 | 
					    _context = str(_config['system']['context'])
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    # if '/' in _context :
 | 
					 | 
					 | 
					 | 
					    # if '/' in _context :
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					 | 
					@ -123,14 +124,15 @@ def html(_uri,_config) :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _layout = _config['layout']
 | 
					 | 
					 | 
					 | 
					    _layout = _config['layout']
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    if 'location' in _layout :
 | 
					 | 
					 | 
					 | 
					    if 'location' in _layout :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if not _config :
 | 
					 | 
					 | 
					 | 
					        if not _config :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _api = os.sep.join(['api/disk/read?uri=',_layout['root']])
 | 
					 | 
					 | 
					 | 
					            _api = os.sep.join(['api/disk/read?uri=',copy.copy(_layout['root']) ])
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        else:
 | 
					 | 
					 | 
					 | 
					        else:
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            
 | 
					 | 
					 | 
					 | 
					            
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _api = os.sep.join([f'{_context}/api/disk/read?uri=',_layout['root']])
 | 
					 | 
					 | 
					 | 
					            _api = os.sep.join([f'{_context}/api/disk/read?uri=',copy.copy(_layout['root'])])
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					 | 
					            
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					        if f"{_layout['root']}{os.sep}" in _html :
 | 
					 | 
					 | 
					 | 
					        if f"{_layout['root']}{os.sep}" in _html :
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					            _html = _html.replace(f"{_layout['root']}",_api)
 | 
					 | 
					 | 
					 | 
					            _html = _html.replace('/api/disk/read?uri=','').replace(f"{_layout['root']}",_api)
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    _html = mistune.html(_html).replace(""",'"').replace("<","<").replace(">",">") if _uri[-2:] in ['md','MD','Md','mD'] else _html
 | 
					 | 
					 | 
					 | 
					    _html = mistune.html(_html).replace(""",'"').replace("<","<").replace(">",">") if _uri[-2:] in ['md','MD','Md','mD'] else _html
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    
 | 
					 | 
					 | 
					 | 
					    # _html = _html.replace(f'{os.sep}{_layout["root"]}',_layout['root'])
 | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					   
 | 
					 | 
					 | 
					 | 
					   
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					    return _html
 | 
					 | 
					 | 
					 | 
					    return _html
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					 | 
					def plugins (**_args):
 | 
					 | 
					 | 
					 | 
					def plugins (**_args):
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					 | 
					
 
 |