コード例 #1
0
#!/usr/bin/php -q
<?php 
require_once "csread.inc";
require_once "wikitable.inc";
$rectype = "ARMO";
$csread = new MWRead();
$wk = new MWTable($rectype);
//$csread->set_doprint();
$csread->set_filestoread('all');
$csread->request_data($rectype, CSRead::KEEPOPT_ALL | CSRead::KEEPOPT_ENCH);
$cs = $csread->read();
$styles = $cs->get_item_groups($rectype, 'styles');
$ex_styles = $cs->get_item_groups($rectype, 'styles', 'parentonly');
$stats = $wk->get_columns('summable');
$sumdata = array();
foreach ($styles as $style) {
    $sumdata[$style] = array();
    foreach ($stats as $stat) {
        $sumdata[$style][$stat] = 0;
    }
    $set = $cs->get_item_set($rectype, $style);
    print "{$style}\n";
    foreach ($set as $key => $item) {
        print "  {$key} ";
        if (!is_null($item)) {
            print $item->edid() . " " . $item->name() . " " . $item->get('skill') . " " . $item->get_index('ENAM');
        }
        print "\n";
    }
    foreach ($set as $key => $item) {
        if (is_null($item)) {