dev-master
9999999-deva tool for auto-correct chinese typesetting.
MIT
The Requires
The Development Requires
dev-release/1.0.0
dev-release/1.0.0a tool for auto-correct chinese typesetting.
MIT
The Requires
The Development Requires
a tool for auto-correct chinese typesetting.
此工具針對「檔案」校正中文文案的排版,統一中文文案與排版格式皆參考中文文案排版指北。, (*2)
此工具是基於 NauxLiu/auto-correct 做出來的「自動中文排版工具」。, (*3)
, (*4)
** 此工具只在 Command-Line 模式中運行 **, (*5)
, (*6)
透過 Composer:, (*7)
$ composer require wadehuang1993/auto-correct-chinese-typesetting --prefer-stable dev-master
或將 AutoCorrectChineseTypesetting Clone 下來即可。, (*8)
AutoCorrectChineseTypesetting 必須在 PHP-CLI 模式下進行:, (*9)
在 Command-Line 模式中:, (*10)
cd path/to/AutoCorrectChineseTypesetting php AutoCorrect.php -i InputFile -o OutputFile
若 OutputFile 沒定義的話,預設輸出的檔案名稱會與輸入檔案名稱相同。, (*11)
-i 要做排版的檔案名稱。 -o 輸出的檔案名稱(可選)。 -a 新增校正辭彙庫(可選,可多次新增)。 -h 查看使用說明。
-a
參數提供了新增辭彙庫的功能:, (*12)
-a
參數加載辭彙庫。辭彙庫必須為 *.php
檔案,其內容為:, (*13)
<?php return [ # '校正前的字詞' => '校正後的字詞', /** * ...將您的新詞彙加入於此。 */ 'docker' => 'Docker', 'deploy' => 'Deploy', 'zf1' => 'ZendFramework 1', 'zf2' => 'ZendFramework 2', ];
cd path/to/AutoCorrectChineseTypesetting
php AutoCorrect.php -i InputFile -a dictionary/AAA.php -a dictionary/BBB.php
, (*14)
此版本目前只有測試過 txt 檔案可正常排版。, (*15)
a tool for auto-correct chinese typesetting.
MIT
a tool for auto-correct chinese typesetting.
MIT