{"id":23058094,"url":"https://github.com/samwhelp/prototype-cns11643-to-cin","last_synced_at":"2025-04-03T06:16:15.852Z","repository":{"id":90412131,"uuid":"44600538","full_name":"samwhelp/prototype-cns11643-to-cin","owner":"samwhelp","description":"prototype-cns11643-to-cin","archived":false,"fork":false,"pushed_at":"2016-09-29T00:19:16.000Z","size":1782,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-08T20:12:28.212Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samwhelp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-20T11:02:38.000Z","updated_at":"2016-09-14T07:33:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"7a5e0e3f-975a-4a71-91d8-219e2cfc70ec","html_url":"https://github.com/samwhelp/prototype-cns11643-to-cin","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samwhelp%2Fprototype-cns11643-to-cin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samwhelp%2Fprototype-cns11643-to-cin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samwhelp%2Fprototype-cns11643-to-cin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samwhelp%2Fprototype-cns11643-to-cin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samwhelp","download_url":"https://codeload.github.com/samwhelp/prototype-cns11643-to-cin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246944385,"owners_count":20858772,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-16T02:14:23.221Z","updated_at":"2025-04-03T06:16:15.807Z","avatar_url":"https://github.com/samwhelp.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# prototype-cns11643-to-cin\n\n## 緣起\n\n這個專案只是因應「[這篇討論](http://www.ubuntu-tw.org/modules/newbb/viewtopic.php?post_id=346876#forumpost346876)」，簡單寫出來的轉換程式，\n\n用意只是要提供「樓主」另一種方式來解決問題(改用寫script的方式)。\n\n## 前置作業\n\n安裝「php5-cli」\n\n``` sh\n$ sudo apt-get install php5-cli\n```\n\n## Clone\n\n``` sh\n$ git clone https://github.com/samwhelp/prototype-cns11643-to-cin.git\n```\n\n切換到專案資料夾\n\n``` sh\n$ cd prototype-cns11643-to-cin\n```\n\n## 使用方式\n\n### 轉換產生cin檔\n\n切換資料夾\n\n``` sh\n$ cd bin\n```\n\n執行下面的指令\n\n``` sh\n$ ./cin.php\n```\n\n或是執行\n\n``` sh\n$ php cin.php\n```\n\n就會產生「prototype-cns11643-to-cin/var/CnsPhonetic.cin」這個檔。\n\n注意: 此轉換的過程，除了轉換CNS的對照表之外，還加入了「注音符號」。\n\n### 批次轉換Unicode碼，變成文字。\n\n編輯「var/Unicode.list」。\n\n```\n$ vi var/UniCode.list\n```\n\n切換資料夾\n\n``` sh\n$ cd bin\n```\n\n執行下面的指令\n\n``` sh\n$ ./uni.php\n```\n\n就會執行轉換，產生「var/Unicode.txt」。\n\n\n## 注意事項\n\n「Asset/CNS11643」這個資料夾裡面的檔案是來自於「[http://data.gov.tw/iisi/logaccess/20?dataUrl=http://www.cns11643.gov.tw/AIDB/Open_Data.zip\u0026ndctype=TXT\u0026ndcnid=5961](http://data.gov.tw/iisi/logaccess/20?dataUrl=http://www.cns11643.gov.tw/AIDB/Open_Data.zip\u0026ndctype=TXT\u0026ndcnid=5961)」，並不是全部，有些檔被我刪掉了。\n\n「Asset/CNS11643」這個資料夾裡面的檔案的版權屬於該單位所有。\n\n上面的下載連結來自於「[這一頁](http://data.gov.tw/node/5961)」的「資料資源: TXT」。\n\n下載指令。\n\n``` sh\n$ wget -c \"http://data.gov.tw/iisi/logaccess/20?dataUrl=http://www.cns11643.gov.tw/AIDB/Open_Data.zip\u0026ndctype=TXT\u0026ndcnid=5961\" -O Open_Data.zip\n```\n\n其餘參考「[這篇討論串](http://www.ubuntu-tw.org/modules/newbb/viewtopic.php?post_id=326994#forumpost326994)」。\n\n\n## 相關專案\n\n* [CinConvert](https://github.com/samwhelp/CinConvert)\n* [util-cns11643-to-cin-nodejs](https://github.com/samwhelp/util-cns11643-to-cin-nodejs)\n* [util-cns11643-to-cin-gjs](https://github.com/samwhelp/util-cns11643-to-cin-gjs)\n* [util-cns11643-to-cin-php](https://github.com/samwhelp/util-cns11643-to-cin-php)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamwhelp%2Fprototype-cns11643-to-cin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamwhelp%2Fprototype-cns11643-to-cin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamwhelp%2Fprototype-cns11643-to-cin/lists"}