将简体或繁体中文转换为拼音的在线工具。
# PHP 命令行转换
composer require overtrue/pinyin
php -r "use Overtrue\Pinyin\Pinyin; echo (new Pinyin)->convert('中国');"
# Python 命令行转换
pip install pypinyin
python3 -c "from pypinyin import pinyin; print(' '.join([item[0] for item in pinyin('中国')]))"
# Linux 命令行工具
apt-get install libpinyin
echo "中国" | pinyin