Beispiel #1
0
// along with this program; if not, write to the Free Software Foundation,
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
//
if (PHP_SAPI !== 'cli') {
    die('This script must be runned from command-line');
}
$mem = memory_get_usage(true);
/***/
require_once __DIR__ . '/../vendor/autoload.php';
/***/
if (!file_exists(__DIR__ . '/config.php')) {
    die('- unable to find config.php' . PHP_EOL);
}
$config = (require_once __DIR__ . '/config.php');
/***/
$app = new \RyzomExtra\Export\Application();
$app['data.path'] = $config['data.path'];
$app['cache.path'] = $config['cache.path'];
if ($config['encoder'] == 'json') {
    $app['encoder'] = $app->share(function () {
        return new \RyzomExtra\Export\Encoder\JsonEncoder();
    });
}
// sheet_id.bin
$app->exportSheetIds();
// .packed_sheets
$app->exportSheets(array('sitem', 'skill_tree', 'sbrick', 'sphrase'));
// visual_slot.tab
$app->exportVisualSlots();
// <sheet>_words_<lang>.txt
$langArray = array('en', 'fr', 'de', 'ru', 'es');
Beispiel #2
0
// along with this program; if not, write to the Free Software Foundation,
// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301  USA
//
if (PHP_SAPI !== 'cli') {
    die('This script must be runned from command-line');
}
$mem = memory_get_usage(true);
/***/
require_once __DIR__ . '/../vendor/autoload.php';
/***/
if (!file_exists(__DIR__ . '/config.php')) {
    die('- unable to find config.php' . PHP_EOL);
}
$config = (require_once __DIR__ . '/config.php');
/***/
$app = new \RyzomExtra\Export\Application();
$app['data.path'] = $config['data.path'];
$app['cache.path'] = $config['cache.path'];
// sheet_id.bin
$app->exportSheetIds();
// .packed_sheets
$app->exportSheets(array('sitem', 'skill_tree', 'sbrick', 'sphrase'));
// visual_slot.tab
$app->exportVisualSlots();
// <sheet>_words_<lang>.txt
$langArray = array('en', 'fr', 'de', 'ru', 'es');
$sheets = array('uxt', 'skill', 'faction', 'place', 'item', 'creature', 'sbrick', 'sphrase', 'title', 'outpost');
foreach ($langArray as $lang) {
    $app->exportTranslations($lang, $sheets);
}
printf("+ DEBUG: memory used %s bytes\n", number_format(memory_get_usage(true) - $mem));