Siebrand has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/290197

Change subject: Refactor export commands
......................................................................

Refactor export commands

Make the features building blocks, with whitespace, so they can be glued 
together.
This will allow adding FORCELANGS, SKIPLANGS and HOURS that are currently used
in the repoexport script.

Change-Id: I96c5b767bd8bd5b14912e4f3197585f2c9e79ab8
---
M repong/repong.php
1 file changed, 9 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/97/290197/1

diff --git a/repong/repong.php b/repong/repong.php
index 91daff6..325b26c 100644
--- a/repong/repong.php
+++ b/repong/repong.php
@@ -42,22 +42,20 @@
        }
 
        public function export() {
-               $base = $this->meta['basepath'];
                $exporter = $this->meta['export'];
-
-               $group = $this->config['group'];
-
-               $lang = '*';
-               $skip = 'en,qqq';
-               $threshold = '35';
+               $group = " --group='" . $this->config['group'] . "'";
+               $lang = " --lang='*'";
+               $skip = " --skip='en,qqq'";
+               $threshold = ' --threshold=35';
+               $base = " --target='" . $this->meta['basepath'] . "'";
 
                if ( isset( $this->config['export-threshold'] ) ) {
                        $threshold = (int)$this->config['export-threshold'];
+                       $threshold = " --threshold='$threshold'";
                }
 
                // First normal export
-               $command = "$exporter --group='$group' --lang='$lang' 
--skip='$skip' " .
-                       "--threshold='$threshold' --target='$base'";
+               $command = "$exporter$group$lang$skip$threshold$base";
                echo "$command\n";
 
                $process = new Process( $command );
@@ -66,7 +64,8 @@
                print $process->getOutput();
 
                // Then message documentation
-               $command = "$exporter --group='$group' --lang=qqq 
--target='$base'";
+               $lang = " --lang='qqq'";
+               $command = "$exporter$group$lang$base";
                echo "$command\n";
 
                $process = new Process( $command );

-- 
To view, visit https://gerrit.wikimedia.org/r/290197
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I96c5b767bd8bd5b14912e4f3197585f2c9e79ab8
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to