# -*- coding: utf-8 -*-
"""
Created on Wed Nov 24 11:32:43 2021

@author: russ

make singleton class, or module, lets try module
but give access to an instance of parameters


Naming:
    transform       return tuple
    is              return boolean




"""

#import pprint
import os


from   app_global import AppGlobal

# parameters injection  should only be on in testing -- but need for now
# !! this is bad think may have circular imports or smething
import parameters
parameters      = parameters.Parameters()

import string_utils


# next debug
#rint( parameters )
#rint( AppGlobal.parameters )


LINE_JOIN             = AppGlobal.parameters.line_join
    #  something like "\r\n"  use to join lines

# ---- transforms, return tuples
# ------------------------------------------
def transform_back_slash_slash( in_text, ):
    """
    maybe should not be here
    transform semicolins to newlines -- split up a path
    !! look into making a variable transform as in last line
    !  tuple return
    """
    # ret_text = self._transform_replace_( in_text, "\\", "/" )
    ret_text = in_text.replace( "\\", "/" )

    return ( True, "replace \\ to /", ret_text  )

# ------------------------------------------
def transform_space_zip( in_text, ):
    """
    transform semicolins to newlines -- split up a path
    !! look into making a variable transform as in last line
    !  tuple return
    """
    # lines, _   = self.clean_string_to_list( in_text, delete_tailing_spaces = True,
    #                                         delete_comments = False, delete_blank_lines = True)
    # ret_text = self.LINE_JOIN.join( lines )

    # ret_text = _transform_replace_( in_text, " ", "" )

    ret_text = in_text.replace( " ", "" )

    return ( True, "replace space to zip", ret_text  )


if __name__ == "__main__":

    # ------------------------------------------

    #----- run the full app
    import clip_board
    clip_board.main()
    #app  = clip_board.App( None, None )


# =================== eof ================
