pymensago/userprofile.py
def make_path_dblocal(profile: Profile, path: str) -> RetVal:
	'''Converts a Mensago path to an absolute path that references the local filesystem

	Parameters:
	  * profile: the active profile
	  * path: a string containing a single Mensago path
	
	Returns:
	  * path: (str) The converted path
	'''
	
	# Load the folder mappings. We'll need these in a bit.
	status = load_folder_maps(profile.db)
	if status.error():
		return status
	maps = status['maps']

	parts = path.strip().replace(f'/ wsp {profile.wid} ', '').split(' ')
	
	for i in range(len(parts)):
		if parts[i] in maps:
			parts[i] = maps[parts[i]]

	out = '/'.join(parts)
	if out[0] != '/':
		out = '/' + out
	return RetVal().set_value('path', out)
Converts a Mensago path to an absolute path that references the local filesystem

	Parameters:
	  * profile: the active profile
	  * path: a string containing a single Mensago path
	
	Returns:
	  * path: (str) The converted path
	
Converts a Mensago path to an absolute path that references the local filesystem
Converts a Mensago path to an absolute path that references the local filesystem
def make_path_dblocal(profile: Profile, path: str) -> RetVal:
	status = load_folder_maps(profile.db)
	if status.error():
		return status
	maps = status['maps']
	parts = path.strip().replace(f'/ wsp {profile.wid} ', '').split(' ')
	for i in range(len(parts)):
		if parts[i] in maps:
			parts[i] = maps[parts[i]]
	out = '/'.join(parts)
	if out[0] != '/':
		out = '/' + out
	return RetVal().set_value('path', out)
def make_path_dblocal ( profile : Profile , path : str ) -> RetVal : status = load_folder_maps ( profile . db ) if status . error ( ) : return status maps = status [ 'maps' ] parts = path . strip ( ) . replace ( f'/ wsp {profile.wid} ' , '' ) . split ( ' ' ) for i in range ( len ( parts ) ) : if parts [ i ] in maps : parts [ i ] = maps [ parts [ i ] ] out = '/' . join ( parts ) if out [ 0 ] != '/' : out = '/' + out return RetVal ( ) . set_value ( 'path' , out )
Converts a Mensago path to an absolute path that references the local filesystem
Converts a Mensago path to an absolute path that references the local filesystem
'''Converts a Mensago path to an absolute path that references the local filesystem

	Parameters:
	  * profile: the active profile
	  * path: a string containing a single Mensago path
	
	Returns:
	  * path: (str) The converted path
	''' # Load the folder mappings. We'll need these in a bit.
(str) The converted path
( str ) The converted path
profile
Profile
path
str
* profile
the active profile
the active profile
* path
a string containing a single Mensago path
a string containing a single Mensago path