Performs Voucherserie export to export file.
438696
public function download()
    {
        $oUtils = \OxidEsales\Eshop\Core\Registry::getUtils();
        $oUtils->setHeader("Pragma: public");
        $oUtils->setHeader("Cache-Control: must-revalidate, post-check=0, pre-check=0");
        $oUtils->setHeader("Expires: 0");
        $oUtils->setHeader("Content-Disposition: attachment; filename=vouchers.csv");
        $oUtils->setHeader("Content-Type: application/csv");
        $sFile = $this->_getExportFilePath();
        if (file_exists($sFile) && is_readable($sFile)) {
            readfile($sFile);
        }
        $oUtils->showMessageAndExit("");
    }
56870
public function export()
    {
        $headers = $this->fileHeaders();
        $rows = $this->rows();

        $writer = Writer::createFromFileObject(new SplTempFileObject());
        $writer->setNewline("\r\n");
        $writer->setOutputBOM(Writer::BOM_UTF8);
        $writer->insertOne($headers);

        foreach ($rows as $r) {
            $writer->insertOne($r);
        }

        $writer->output($this->filename());
    }
433314
public function export()
    {
        $path = $this->module->dataPath;
        FileHelper::createDirectory($path, $this->module->dirMode);

        $summary = $this->collectSummary();
        $dataFile = "$path/{$this->tag}.data";
        $data = [];
        $exceptions = [];
        foreach ($this->module->panels as $id => $panel) {
            try {
                $data[$id] = serialize($panel->save());
            } catch (\Exception $exception) {
                $exceptions[$id] = new FlattenException($exception);
            }
        }
        $data['summary'] = $summary;
        $data['exceptions'] = $exceptions;

        file_put_contents($dataFile, serialize($data));
        if ($this->module->fileMode !== null) {
            @chmod($dataFile, $this->module->fileMode);
        }

        $indexFile = "$path/index.data";
        $this->updateIndexFile($indexFile, $summary);
    }
800886
public function start()
    {
        $sVoucherNr = trim(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("voucherNr"));
        $bRandomNr = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("randomVoucherNr");
        $controllerId = \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestControllerId();

        if ($controllerId == 'voucherserie_generate' && !$bRandomNr && empty($sVoucherNr)) {
            return;
        }

        $this->_aViewData['refresh'] = 0;
        $this->_aViewData['iStart'] = 0;
        $iEnd = $this->prepareExport();
        \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("iEnd", $iEnd);
        $this->_aViewData['iEnd'] = $iEnd;

        // saving export info
        \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("voucherid", \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("voucherid"));
        \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("voucherAmount", abs((int) \OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter("voucherAmount")));
        \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("randomVoucherNr", $bRandomNr);
        \OxidEsales\Eshop\Core\Registry::getSession()->setVariable("voucherNr", $sVoucherNr);
    }
928816
public function exportAction()
    {
        $request = $this->getRequest();
        if (!$request->isPost()) {
            $this->_redirect(self::ADMINHTML_SALES_ORDER_INDEX);
        }

        $orderIds = $this->getRequest()->getPost('order_ids', array());

        try {
            // Build the CSV and retrieve its path
            $filePath = Mage::getModel('australia/shipping_carrier_eparcel_export_csv')->exportOrders($orderIds);

            // Download the file
            $this->_prepareDownloadResponse(basename($filePath), file_get_contents($filePath));
        } catch (Exception $e) {
            Mage::getSingleton('core/session')->addError($e->getMessage());
            $this->_redirect(self::ADMINHTML_SALES_ORDER_INDEX);
        }
    }
353751
public function exportVouchers($iStart)
    {
        $iExported = false;

        if ($oSerie = $this->_getVoucherSerie()) {
            $oDb = \OxidEsales\Eshop\Core\DatabaseProvider::getDb(\OxidEsales\Eshop\Core\DatabaseProvider::FETCH_MODE_ASSOC);

            $sSelect = "select oxvouchernr from oxvouchers where oxvoucherserieid = " . $oDb->quote($oSerie->getId());
            $rs = $oDb->selectLimit($sSelect, $this->iExportPerTick, $iStart);

            if (!$rs->EOF) {
                $iExported = 0;

                // writing header text
                if ($iStart == 0) {
                    $this->write(\OxidEsales\Eshop\Core\Registry::getLang()->translateString("VOUCHERSERIE_MAIN_VOUCHERSTATISTICS", \OxidEsales\Eshop\Core\Registry::getLang()->getTplLanguage(), true));
                }
            }

            // writing vouchers..
            while (!$rs->EOF) {
                $this->write(current($rs->fields));
                $iExported++;
                $rs->fetchRow();
            }
        }

        return $iExported;
    }
492453
def export(self, output_folder):
        """"""
        if not os.path.exists(output_folder):
            os.makedirs(output_folder)
        self._interact_with_folder(output_folder, 'w')
631691
def export(self, filename, fmt="DER"):
        
        f = open(filename, "wb")
        f.write(self.output(fmt))
        f.close()
1099219
def export_vtkjs(self, filename, compress_arrays=False):
        
        if not hasattr(self, 'ren_win'):
            raise RuntimeError('Export must be called before showing/closing the scene.')
        if isinstance(vtki.FIGURE_PATH, str) and not os.path.isabs(filename):
            filename = os.path.join(vtki.FIGURE_PATH, filename)
        return export_plotter_vtkjs(self, filename, compress_arrays=compress_arrays)
1141270
private void doExportToWave()
	{
		doStopPlaying();
		
		if (currentContainer==null)
	    {
	    	JOptionPane.showMessageDialog(this, "You need to load a file first!", "Ups!", JOptionPane.ERROR_MESSAGE);
	    }
	    else
	    {
	    	do
		    {
				String fileName = Helpers.createLocalFileStringFromURL(currentContainer.getFileURL(), true);
				fileName = fileName.substring(fileName.lastIndexOf(File.separatorChar)+1);
				String exportToWav = exportPath + File.separatorChar + fileName + ".WAV";
				FileChooserResult selectedFile = Helpers.selectFileNameFor(this, exportToWav, "Export to wave", fileFilterExport, 1, false, false);
				if (selectedFile!=null)
				{
					File f = selectedFile.getSelectedFile();
				    if (f!=null)
				    {
				    	if (f.exists())
				    	{
				    		int result = JOptionPane.showConfirmDialog(this, "File already exists! Overwrite?", "Overwrite confirmation", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
				    		if (result==JOptionPane.CANCEL_OPTION) return;
				    		if (result==JOptionPane.NO_OPTION) continue; // Reselect
				    		boolean ok = f.delete();
				    		if (!ok)
				    		{
		        		    	JOptionPane.showMessageDialog(MainForm.this, "Overwrite failed. Is file write protected or in use?", "Failed", JOptionPane.ERROR_MESSAGE);
		        		    	return;
				    		}
				    	}
				    	// get Export Type from selected filechooser index (find the index ;) )
				    	String modFileName = f.getAbsolutePath();
				    	int i = modFileName.lastIndexOf(File.separatorChar);
				    	exportPath = modFileName.substring(0, i);
			    		int result = JOptionPane.showConfirmDialog(this, "Continue playback while exporting?", "Playback?", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);

			    		Mixer mixer = createNewMixer();
				    	mixer.setPlayDuringExport(result==JOptionPane.YES_OPTION);
				    	mixer.setExportFile(f);
				    	playerThread = new PlayThread(mixer, this);
				    	playerThread.start();
			    		
				    	inExportMode = true; // Signal, that we are exporting right now...
				    }
				}
		    	return;
		    }
		    while (true);
	    }
	}
1284470
def export(want)
      begin
        data =
          case File.extname(want.file)
          when '.ass'
            ASS.master(want.subtitles)
            ASS.export(want.subtitles)
          when '.ssa'
            SSA.master(want.subtitles)
            SSA.export(want.subtitles)
          when '.srt'
            SRT.master(want.subtitles)
            SRT.export(want.subtitles)
          when '.yt'
            YT.master(want.subtitles)
            YT.export(want.subtitles)
          else
            fail 'Not supported'
          end
      rescue
        @report << "Failure while exporting #{File.extname(want.file)[1..3].upcase} for #{want.file}"
        raise AbortJob
      ensure
        want.subtitles = nil
      end

      if want.encoding
        begin
          data.encode!(want.encoding)
        rescue
          @report << "Failure while transcoding from #{data.encoding} to #{want.encoding} for #{want.file}"
          raise AbortJob
        end
      end

      begin
        IO.write(want.file, data)
      rescue
        @report << "Failure while writing to #{want.file}"
        raise AbortJob
      end
    end
1163735
public function export ()
		{
			if ($this->_use)
				foreach ($this->messages as $message)
				{
					list($msg, $level, $category, $timestamp, $traces) = $message;

					$user = [];
					try
					{
						if (Yii::$app->user and !Yii::$app->user->isGuest)
							$user = [
								'id'    => Yii::$app->user->id,
								'email' => Yii::$app->user->identity->email,
								'name'  => Yii::$app->user->identity->name
							];
					}
					catch (Exception $e)
					{
					}

					$data = [
						'timestamp' => $timestamp,
						'level'     => Logger::getLevelName($level),
						'tags'      => [ 'category' => $category ],
						'message'   => $msg,
						'user'      => $user
					];
					if (!empty($traces))
					{
						$data[ 'sentry.interfaces.Stacktrace' ] = [
							'frames' => Raven_Stacktrace::get_stack_info($traces),
						];
					}
					$this->_client->capture($data, false);
				}
		}
365718
def applyVoucherCodeTemporarily(sender,**kwargs):
    '''
    
    '''
    logger.debug('Signal fired to apply temporary vouchers.')

    reg = kwargs.pop('registration')
    voucherId = reg.data.get('gift','')

    try:
        voucher = Voucher.objects.get(voucherId=voucherId)
    except ObjectDoesNotExist:
        logger.debug('No applicable vouchers found.')
        return

    tvu = TemporaryVoucherUse(voucher=voucher,registration=reg,amount=0)
    tvu.save()
    logger.debug('Temporary voucher use object created.')
444907
def export(app, local, no_scrub):
    """"""
    log(header, chevrons=False)
    data.export(str(app), local=local, scrub_pii=(not no_scrub))
94146
def export(self, storage_client, overwrite=True):
        
        '''
            
        '''
        
        title = '%s.export' % self.__class__.__name__
        
    # validate storage client
        method_list = [ 'save', 'load', 'list', 'export', 'delete', 'remove', '_import', 'collection_name' ]
        for method in method_list:
            if not getattr(storage_client, method, None):
                from labpack.parsing.grammar import join_words
                raise ValueError('%s(storage_client=...) must be a client object with %s methods.' % (title, join_words(method_list)))
            
    # walk collection folder to find files
        import os
        root_segments = self.collection_folder.split(os.sep)
        count = 0
        skipped = 0
        for file_path in self.localhost.walk(self.collection_folder):
            path_segments = file_path.split(os.sep)
            for i in range(len(root_segments)):
                del path_segments[0]
            record_key = os.path.join(*path_segments)
            record_key = record_key.replace('\\','/')
            
    # read and save files
            record_data = open(file_path, 'rb').read()
            last_modified = os.path.getmtime(file_path)
            outcome = storage_client._import(record_key, record_data, overwrite=overwrite, last_modified=last_modified)
            if outcome:
                count += 1
            else:
                skipped += 1
            
    # report outcome
        plural = ''
        skip_insert = ''
        new_folder = storage_client.collection_name
        if count != 1:
            plural = 's'
        if skipped > 0:
            skip_plural = ''
            if skipped > 1:
                skip_plural = 's'
            skip_insert = ' %s record%s skipped to avoid overwrite.' % (str(skipped), skip_plural)
        exit_msg = '%s record%s exported to %s.%s' % (str(count), plural, new_folder, skip_insert)
        return exit_msg
1371962
def exportFile(self, jobStoreFileID, dstUrl):
        
        self._assertContextManagerUsed()
        self._jobStore.exportFile(jobStoreFileID, dstUrl)
896698
public static base_response export(nitro_service client, application resource) throws Exception {
		application exportresource = new application();
		exportresource.appname = resource.appname;
		exportresource.apptemplatefilename = resource.apptemplatefilename;
		exportresource.deploymentfilename = resource.deploymentfilename;
		return exportresource.perform_operation(client,"export");
	}