text: from DbxSync.CodeReader import CodeReader
  from DbxSync.CodeTransformer.LinesParser import LinesParser
  from DbxSync.DbxApi.WorkspaceImporter import WorkspaceImporter
  from DbxSync.CodeTransformersApplier import CodeTransformersApplier
  from DbxSync.CodeTransformer.LineStringifier.LineStringifierResolver import LineStringifierResolver
  
  class Uploader:
  
      def __init__(
              self,
              codeReader: CodeReader,
              linesParser: LinesParser,
              codeTransformersApplier: CodeTransformersApplier,
              workspaceImporter: WorkspaceImporter,
              lineStringifierResolver: LineStringifierResolver,
          ):
          self.__codeReader = codeReader
          self.__linesParser = linesParser
          self.__codeTransformersApplier = codeTransformersApplier
          self.__workspaceImporter = workspaceImporter
          self.__lineStringifierResolver = lineStringifierResolver
  
      def upload(self, sourcePath, targetPath):
          code = self.__codeReader.read(sourcePath)
  
          parsedLines = self.__linesParser.parse(code)
  
          outputParsedLines = self.__codeTransformersApplier.transform(parsedLines)
  
          outputLines = []
  
          for outputParsedLine in outputParsedLines:
              lineStringifier = self.__lineStringifierResolver.resolve(outputParsedLine)
              outputLines.append(lineStringifier.toLineString(outputParsedLine))
  
          code = '# Databricks notebook source\n' + '\n'.join(outputLines)
  
          #print(code.encode('utf-8'))
  
          self.__workspaceImporter.importPythonOverwrite(code, targetPath)
  
          print('uploading....')
  