def initAlgorithm(self, config): """ Here we define the inputs and output of the algorithm, along with some other properties. """ self.addParameter( QgsProcessingParameterFile(self.INPUT, self.tr('Input csv file'), extension='csv')) # encoding of input file encParam = QgsProcessingParameterEnum( self.ENCODING, self.tr('select encoding of the file')) encParam.setOptions(self.encode) encParam.setAllowMultiple(False) encParam.setDefaultValue(QVariant('SJIS')) # file encoding self.addParameter(encParam) #self.addParameter(self #) # We add a feature sink in which to store our processed features (this # usually takes the form of a newly created vector layer when the # algorithm is run in QGIS). self.addParameter( QgsProcessingParameterFeatureSink(self.OUTPUT, self.tr('Output layer')))