Пример #1
0
<?php

include 'catalog.php';
$items = $catalog;
#
# build the final maps
#
$maps = array();
$maps['names'] = make_names_map($items);
$maps['kaomoji'] = get_all_kaomoji($items);
#fprintf(STDERR, "fix Geta Mark ()  '〓' (U+3013)\n");
#$items = fix_geta_mark($items);
$maps["unified_to_docomo"] = make_mapping($items, 'docomo');
$maps["unified_to_kddi"] = make_mapping($items, 'au');
$maps["unified_to_softbank"] = make_mapping($items, 'softbank');
$maps["unified_to_google"] = make_mapping($items, 'google');
$maps["docomo_to_unified"] = make_mapping_flip($items, 'docomo');
$maps["kddi_to_unified"] = make_mapping_flip($items, 'au');
$maps["softbank_to_unified"] = make_mapping_flip($items, 'softbank');
$maps["google_to_unified"] = make_mapping_flip($items, 'google');
$maps["unified_to_html"] = make_html_map($items);
#
# output
# we could just use var_dump, but we get 'better' output this way
#
echo "<" . "?php\n";
echo "\n";
echo "\t#\n";
echo "\t# WARNING:\n";
echo "\t# This code is auto-generated. Do not modify it manually.\n";
echo "\t#\n";
Пример #2
0
<?php

$in = file_get_contents('emoji-data/emoji.json');
$catalog = json_decode($in, true);
#
# build the final maps
#
$maps = array();
$maps['names'] = make_names_map($catalog);
$maps['kaomoji'] = get_all_kaomoji($catalog);
#fprintf(STDERR, "fix Geta Mark ()  '〓' (U+3013)\n");
#$catalog = fix_geta_mark($catalog);
$maps["unified_to_docomo"] = make_mapping($catalog, 'docomo');
$maps["unified_to_kddi"] = make_mapping($catalog, 'au');
$maps["unified_to_softbank"] = make_mapping($catalog, 'softbank');
$maps["unified_to_google"] = make_mapping($catalog, 'google');
$maps["docomo_to_unified"] = make_mapping_flip($catalog, 'docomo');
$maps["kddi_to_unified"] = make_mapping_flip($catalog, 'au');
$maps["softbank_to_unified"] = make_mapping_flip($catalog, 'softbank');
$maps["google_to_unified"] = make_mapping_flip($catalog, 'google');
$maps["unified_to_html"] = make_html_map($catalog);
#
# output
# we could just use var_dump, but we get 'better' output this way
#
echo "<" . "?php\n";
echo "\n";
echo "\t#\n";
echo "\t# WARNING:\n";
echo "\t# This code is auto-generated. Do not modify it manually.\n";
echo "\t#\n";
Пример #3
0
    $map['char_name'] = parse_char_name($tds[2]);
    $map['docomo'] = parse_mobile($tds[3]);
    $map['au'] = parse_mobile($tds[4]);
    $map['softbank'] = parse_mobile($tds[5]);
    $map['google'] = parse_google($tds[6]);
    $mapping[] = $map;
}
fprintf(STDERR, "mapping count:" . count($mapping) . "\n");
//filter invalid mapping
fprintf(STDERR, "filter only_kaomoji ; like e-554 -> [A] -> [A] -> [A] -> [A]\n");
$mapping = filter_only_kaomoji($mapping);
fprintf(STDERR, "mapping count:" . count($mapping) . "\n");
fprintf(STDERR, "filter chars-group ; like #44+#139\n");
$mapping = filter_chars_group($mapping);
fprintf(STDERR, "mapping count:" . count($mapping) . "\n");
$emoji_maps['kaomoji'] = get_all_kaomoji($mapping);
#fprintf(STDERR, "fix Geta Mark ()  '〓' (U+3013)\n");
#$mapping = fix_geta_mark($mapping);
//export mapping array
$emoji_maps["unified_to_docomo"] = make_mapping($mapping, 'unicode', 'docomo');
$emoji_maps["unified_to_kddi"] = make_mapping($mapping, 'unicode', 'au');
$emoji_maps["unified_to_softbank"] = make_mapping($mapping, 'unicode', 'softbank');
$emoji_maps["unified_to_google"] = make_mapping($mapping, 'unicode', 'google');
$emoji_maps["docomo_to_unified"] = make_mapping_flip($mapping, 'unicode', 'docomo');
$emoji_maps["kddi_to_unified"] = make_mapping_flip($mapping, 'unicode', 'au');
$emoji_maps["softbank_to_unified"] = make_mapping_flip($mapping, 'unicode', 'softbank');
$emoji_maps["google_to_unified"] = make_mapping_flip($mapping, 'unicode', 'google');
echo '<' . '?' . 'php' . "\n";
echo '$GLOBALS["emoji_maps"] = ';
echo my_var_export($emoji_maps);
echo ";\n";