def initAlgorithm(self, config):

        #super(MappiaPublisherAlgorithm, self).initAlgorithm()
        """
        Here we define the inputs and output of the algorithm, along
        with some other properties.
        """

        options = OptionsCfg.read()

        #self.addParameter(
        #    QgsProcessingParameterEnum(
        #        self.OPERATION,
        #        self.tr('Operation Type'),
        #        options=[self.tr(curOption) for curOption in OperationType.getOptions()],
        #        defaultValue=9
        #    )
        #)

        #TODO Implement layer attribute later.
        # self.addParameter(
        #     QgsProcessingParameterString(
        #         self.LAYER_ATTRIBUTE,
        #         self.tr('Layer style name (Change to different style names only if interested in publishing multiple (layers or attributes) of the same file.)'),
        #         optional=False,
        #         defaultValue=options['attrName']
        #     )
        # )

        self.addParameter(
            QgsProcessingParameterString(
                self.GITHUB_REPOSITORY,
                self.tr('Repository name (or map group name)'),
                optional=False,
                defaultValue=options['gh_repository']))

        # We add the input vector features source. It can have any kind of
        # geometry.
        layerParam = QgsProcessingParameterMultipleLayers(
            self.LAYERS,
            self.tr('Maps to display online'),
            QgsProcessing.TypeMapLayer,
            defaultValue=[
                layer.dataProvider().dataSourceUri(False)
                for layer in iface.mapCanvas().layers()
            ])
        layerParam.setMinimumNumberInputs(1)
        self.addParameter(layerParam)

        maxZoomParameter = QgsProcessingParameterNumber(
            self.ZOOM_MAX,
            self.tr('Map max Zoom level [1 ~ 13] (lower is faster)'),
            minValue=1,
            maxValue=13,
            defaultValue=options["zoom_max"])
        maxZoomParameter.setFlags(
            maxZoomParameter.flags()
            | QgsProcessingParameterDefinition.FlagAdvanced)
        self.addParameter(maxZoomParameter)

        gitExeParameter = QgsProcessingParameterString(
            self.GIT_EXECUTABLE,
            self.tr('Git client executable path.'),
            optional=True,
            defaultValue=self.getGitDefault(options))
        gitExeParameter.setFlags(
            gitExeParameter.flags()
            | QgsProcessingParameterDefinition.FlagAdvanced)
        self.addParameter(gitExeParameter)

        ghUserParameter = QgsProcessingParameterString(
            self.GITHUB_USER,
            self.tr('Github USERNAME (Credentials for https://github.com)'),
            optional=True,
            defaultValue=options['gh_user'])
        ghUserParameter.setFlags(
            ghUserParameter.flags()
            | QgsProcessingParameterDefinition.FlagAdvanced)
        self.addParameter(ghUserParameter)

        ghPassParameter = QgsProcessingParameterString(
            self.GITHUB_PASS,
            self.tr('Github Access Token'),
            optional=True,
            defaultValue=options['gh_pass'])
        ghPassParameter.setFlags(
            ghPassParameter.flags()
            | QgsProcessingParameterDefinition.FlagAdvanced)
        self.addParameter(ghPassParameter)

        outputDirParameter = QgsProcessingParameterFolderDestination(
            self.OUTPUT_DIRECTORY,
            self.tr('Output directory'),
            optional=True,
            defaultValue=options["folder"])
        outputDirParameter.setFlags(
            outputDirParameter.flags()
            | QgsProcessingParameterDefinition.FlagAdvanced)
        self.addParameter(outputDirParameter)
    def initAlgorithm(self, config):
        print('initAlgorithm()')

        #super(MappiaPublisherAlgorithm, self).initAlgorithm()
        """
        Here we define the inputs and output of the algorithm, along
        with some other properties.
        """

        options = OptionsCfg.read()

        self.last_update_date = options[OptionsCfg.UPDATE_CHECK]

        #self.addParameter(
        #    QgsProcessingParameterEnum(
        #        self.OPERATION,
        #        self.tr('Operation Type'),
        #        options=[self.tr(curOption) for curOption in OperationType.getOptions()],
        #        defaultValue=9
        #    )
        #)

        #TODO Implement layer attribute later.
        # self.addParameter(
        #     QgsProcessingParameterString(
        #         self.LAYER_ATTRIBUTE,
        #         self.tr('Layer style name (Change to different style names only if interested in publishing multiple (layers or attributes) of the same file.)'),
        #         optional=False,
        #         defaultValue=options['attrName']
        #     )
        # )

        self.addParameter(
            QgsProcessingParameterString(
                self.GITHUB_REPOSITORY,
                self.tr('* Repository name (or map group name)'),
                optional=False,
                defaultValue=options['gh_repository']))

        # We add the input vector features source. It can have any kind of
        # geometry.
        layerParam = QgsProcessingParameterMultipleLayers(
            self.LAYERS, self.tr('* Maps to display online'),
            QgsProcessing.TypeMapLayer
            #, defaultValue=[layer.id() for layer in iface.mapCanvas().layers()]#[layer.dataProvider().dataSourceUri(False) for layer in iface.mapCanvas().layers()]
        )
        layerParam.setMinimumNumberInputs(1)
        self.addParameter(layerParam)
        self.m_layerParam = layerParam

        maxZoomParameter = QgsProcessingParameterNumber(
            self.ZOOM_MAX,
            self.tr('Map max Zoom level [1 ~ 13] (lower is faster)'),
            minValue=1,
            maxValue=13,
            defaultValue=options["zoom_max"])
        maxZoomParameter.setFlags(
            maxZoomParameter.flags()
            | QgsProcessingParameterDefinition.FlagAdvanced)
        self.addParameter(maxZoomParameter)

        includeSourceDownload = QgsProcessingParameterBoolean(
            self.INCLUDE_DOWNLOAD,
            self.tr(
                'Upload maps for further download (2GB limit per unique map)'),
            defaultValue=options['include_dl'])
        includeSourceDownload.setFlags(
            includeSourceDownload.flags()
            | QgsProcessingParameterDefinition.FlagAdvanced)
        self.addParameter(includeSourceDownload)

        gitExeParameter = QgsProcessingParameterString(
            self.GIT_EXECUTABLE,
            self.tr('Git client executable path.'),
            optional=True,
            defaultValue=UTILS.getGitDefault(options['git_exe']))
        gitExeParameter.setFlags(
            gitExeParameter.flags()
            | QgsProcessingParameterDefinition.FlagAdvanced)
        self.addParameter(gitExeParameter)

        ghUserParameter = QgsProcessingParameterString(
            self.GITHUB_USER,
            self.tr('Github USERNAME (Credentials for https://github.com)'),
            optional=True,
            defaultValue=options['gh_user'])
        ghUserParameter.setFlags(
            ghUserParameter.flags()
            | QgsProcessingParameterDefinition.FlagAdvanced)
        self.addParameter(ghUserParameter)

        # ghPassParameter = QgsProcessingParameterString(
        #     self.GITHUB_PASS,
        #     self.tr('Github Access Token *'),
        #     optional=True,
        #     defaultValue=options['gh_pass']
        # )
        # ghPassParameter.setFlags(ghPassParameter.flags() | QgsProcessingParameterDefinition.FlagAdvanced)
        # self.addParameter(ghPassParameter)

        askUserConfirmation = QgsProcessingParameterBoolean(
            self.ASK_USER,
            self.tr('Ask user confirmation before each step.'),
            defaultValue=options['ask_user'])
        askUserConfirmation.setFlags(
            askUserConfirmation.flags()
            | QgsProcessingParameterDefinition.FlagAdvanced)
        self.addParameter(askUserConfirmation)

        outputDirParameter = QgsProcessingParameterFolderDestination(
            self.OUTPUT_DIRECTORY,
            self.tr('Output directory'),
            optional=True,
            defaultValue=options["folder"] or None)
        outputDirParameter.setFlags(
            outputDirParameter.flags()
            | QgsProcessingParameterDefinition.FlagAdvanced)
        self.addParameter(outputDirParameter)