Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
570 commits
Select commit Hold shift + click to select a range
7d514de
取消不規範的簡繁轉換:棂<=>櫺
danny0838 Jul 12, 2020
d9378b3
修正簡繁轉換:旋<=>旋鏇
danny0838 Jul 9, 2020
29814ee
取消不規範的簡繁轉換:沈=>沉
danny0838 Jul 9, 2020
ce0f118
取消簡繁轉換:几=>機
danny0838 Jul 9, 2020
20322e8
修正簡繁轉換:「菕<=>芲(U+82B2)」改為「菕<=>𰰨(U+30C28)」
danny0838 Jun 29, 2020
fb1d137
修正簡繁轉換:「鋂<=>镅」改為「鋂<=>𰾄」
danny0838 Jun 30, 2020
cb638fb
修正簡繁轉換:「鑀<=>锿」改為「鑀<=>𰾭」
danny0838 Jun 30, 2020
b76593f
修正簡繁轉換:「鏚<=>戚」改為「鏚<=>𬭭」
danny0838 Jun 30, 2020
28ee405
修正簡繁轉換:「𣍐<=>𠊉」改為「𣍐<=>𫧃」
danny0838 Jun 30, 2020
b0f1015
修正簡繁轉換:「鷿<=>䴙」改為「鷿<=>𬸯」
danny0838 Jun 30, 2020
51952ab
修正簡繁轉換:「𪈼<=>𪉓」改為「𪈼<=>𱊜」
danny0838 Jun 30, 2020
88bfe19
修正簡繁轉換:「𪋿<=>𪎍」改為「𪋿<=>𫧮」
danny0838 Jun 30, 2020
77e81eb
修正簡繁轉換:「㘔<=>㗷」改為「㘔<=>𫬐」
danny0838 Jun 30, 2020
f2a79f3
修正簡繁轉換:「繐<=>穗」改為「繐<=>𰬸」
danny0838 Jun 30, 2020
c6dabc0
修正簡繁轉換:「譅=>䜧」改為「譅<=>𰶎」
danny0838 Jun 30, 2020
a151e99
修正簡繁轉換:「㸇<=>𤎺」改為「𤓎<=>𤎺」、「㸇=>𤎺」
danny0838 Jun 30, 2020
77838c7
fix access violation when configDirectory is empty
Jul 14, 2020
d1de2ed
修正地名「於潜」
Felix2yu Jul 14, 2020
65464a9
修正格式
Felix2yu Jul 14, 2020
d9d707e
加入簡繁轉換:沾<=>沾/霑
danny0838 Jul 14, 2020
839fb7e
加入簡繁轉換:跖<=>蹠/跖
danny0838 Jul 14, 2020
012b12e
加入簡繁轉換:玩<=>玩/翫
danny0838 Jul 14, 2020
be55257
加入簡繁轉換:璇<=>璇/璿
danny0838 Jul 14, 2020
d1cab74
Remove wrong word: 朱熔基
sgalal Aug 1, 2020
ed61876
Rename file to python.yml
mingruimingrui Aug 9, 2020
8651e6a
Rename workflow to CI
mingruimingrui Aug 9, 2020
d847950
Test github actions to build python packages
mingruimingrui Aug 9, 2020
87ea248
Renamed step to unit-test
mingruimingrui Aug 9, 2020
0c4ef0b
Allow workflow to be triggered on feature branch
mingruimingrui Aug 9, 2020
962388d
Fixed workflow_dispatch
mingruimingrui Aug 9, 2020
2593326
Fixed matrix
mingruimingrui Aug 9, 2020
04887d4
Use absolute path to conda.bat in windows image
mingruimingrui Aug 9, 2020
ef4a7ad
Remove input field
mingruimingrui Aug 9, 2020
858375a
install curl for miniconda
mingruimingrui Aug 9, 2020
3a99db6
Switch to wildcard pattern to find files to cache
mingruimingrui Aug 9, 2020
151df5a
Fixed typo
mingruimingrui Aug 9, 2020
a41c165
Moved conda init out of script
mingruimingrui Aug 9, 2020
973917c
Use later version of cmake
mingruimingrui Aug 9, 2020
0a9863e
Fix typo
mingruimingrui Aug 9, 2020
ba13c2f
Switch to better maintained pypi version of cmake
mingruimingrui Aug 9, 2020
d1a238e
Remove steps to cache output files
mingruimingrui Aug 9, 2020
f777094
Uncommented code to perform upload of files to pypi
mingruimingrui Aug 9, 2020
6775a83
Added PYPI_TOKEN env variable
mingruimingrui Aug 9, 2020
26d9a4c
Remove unused artifacts
mingruimingrui Aug 9, 2020
ff7b1f0
加入簡繁轉換:毫无 => 毫無(#521) (#522)
timxx Sep 4, 2020
bada87e
Add link to opencc-js
sgalal Sep 11, 2020
5da7bac
Fix docker twine environment variables (#525)
mingruimingrui Sep 30, 2020
5c5a769
Add 海内存知己 (#527)
sgalal Oct 1, 2020
9e4f9e2
宏->宏 should be more common than 宏->巨集 (#528)
sgalal Oct 4, 2020
8885017
Fix 計算發現 心理发展 張必須發皆白 (#529)
sgalal Oct 4, 2020
8ac264f
Add 計算
sgalal Oct 4, 2020
6d3d685
fix #523: {MarisaDict,DartsDict}::Match() does not check for exact match
lotem Dec 16, 2020
8eb3659
Add options for using system versions of libraries (#547)
Dec 26, 2020
e80b51c
TS: 夥 => 伙 夥
svenper Feb 21, 2021
fd11974
詞典排序
BYVoid Feb 25, 2021
181316d
Update the node dependencies.
BYVoid Feb 25, 2021
76ca80e
Fix the `rapidjson not found` issue when using system deps.
BYVoid Feb 25, 2021
89728d2
Update the node.js versions to 10, 12, 14 in CI configurations.
BYVoid Feb 25, 2021
dcad71e
Add platform `arm64` in addition to `amd64` in .travis.yml.
BYVoid Feb 25, 2021
26c2c53
Update the bundled marisa-trie lib to 0.2.6.
BYVoid Feb 25, 2021
cc7f2bb
Fix a bug in the calculation of DictGroup::keyMaxLength.
BYVoid Feb 25, 2021
192fcce
Format code and add some test cases.
BYVoid Feb 25, 2021
a49fad4
Fix a severe performance bug in `Conversion::Convert` that caused O(N…
BYVoid Feb 25, 2021
3659efc
Stop building with g++-4.8 in Travis CI.
BYVoid Feb 25, 2021
ace10e3
Fix a build error in VS.
BYVoid Feb 25, 2021
3dda953
Bump to `-std=c++14` in `CMakeLists.txt`.
BYVoid Feb 25, 2021
33bfbb4
Fix a build warning in `PhraseExtract.cpp`.
BYVoid Feb 25, 2021
c21e6bd
Add separate custom target for copying of libopencc library to direct…
BYVoid Feb 25, 2021
327bb72
Update benchmark and readme.
BYVoid Feb 25, 2021
10b66c3
Check offset bounds in BinaryDict::NewFromFile method
Mar 1, 2021
3d8b6cc
Throw an exception when the input text dictionary has duplicated keys.
BYVoid Mar 1, 2021
9b26dd3
Fix type 'contain' -> 'contains'.
BYVoid Mar 1, 2021
87a08ff
Bump version to 1.1.2.
BYVoid Mar 1, 2021
1d11c49
Ignore pybind in the npm package.
BYVoid Mar 1, 2021
29224a7
Update Github CI badges.
BYVoid Mar 4, 2021
7cde316
Make BinaryDict.hpp and DartsDict.hpp usable alone (#550)
Mar 4, 2021
2b9f851
Follow upstream instructions to include system pybind11 (#566)
felixonmars Mar 5, 2021
debebf4
Replace std::tmpnam with mkstemp (#308).
BYVoid Mar 9, 2021
6e8418f
Fix a failure when std::getenv("TMPDIR") returns nullptr.
BYVoid Mar 10, 2021
1e4bb54
Fix wrong conversion: 回应 should be converted to 回應 (#572)
ayaka14732 Mar 24, 2021
ffb7967
新增“視訊會議“,"视频会议"會被直接翻譯成”影片會議“ (#576)
allennaur Apr 1, 2021
3b629a9
Support nodejs 16 in macos (#597)
yoyo930021 Jun 19, 2021
d38a7e7
視頻通話 -> 視訊通話
yunchn Jul 2, 2021
e178442
Add link to opencc-extension in README (#600)
Jul 3, 2021
c6bcc78
Add support for Python 3.9 (#603)
AntonOfTheWoods Jul 29, 2021
74c039b
更正含「里」地名的錯誤轉換 (#607)
SteveLz Aug 4, 2021
ad1adec
Fix compile error with std::max in VS 2017
lotem Aug 14, 2021
927cfdf
修复JPvariants的“焰” (#612)
garywill Aug 22, 2021
9f36ab6
Add 斗轉 (Fix #584)
ayaka14732 Sep 3, 2021
43e3a64
Add 李白 (Fix #578)
ayaka14732 Sep 3, 2021
a1de27a
Add 衍生 (Fix #549)
ayaka14732 Sep 3, 2021
f6b515e
Bump version to 1.1.3
ayaka14732 Sep 3, 2021
97a8ece
Fix a type in readme.
BYVoid Oct 10, 2021
48681a7
Allow and skip empty lines in the text dictionary.
BYVoid Oct 10, 2021
0d9273a
增加轉換:浜<=>濱/浜 (#608)
SteveLz Oct 10, 2021
6031e09
Add pure Go version link. (#624)
huacnlee Nov 19, 2021
d56b66c
For opencc::ConvertDictionary() parameters, pass references instead o…
Prcuvu Nov 20, 2021
f22ad7b
Update README.md.
Prcuvu Nov 20, 2021
1020910
Remove builds for Python 2.7 and node 10 (#638)
AntonOfTheWoods Nov 24, 2021
4d70201
Update dictionary
sgalal Nov 24, 2021
b2ce1fe
Add support for Python 3.10 (#639)
AntonOfTheWoods Dec 3, 2021
a280f76
Feat: add iOSOpenCC library (#648)
OHeroJ Dec 10, 2021
6380cb2
碟符 -> 磁碟機代號 (#650)
hms5232 Feb 27, 2022
4a07718
Update TWPhrasesOther, 借記卡/簽帳金融卡 (#660)
PeterDaveHello Feb 27, 2022
69f4ffc
Provide the duplicate key when Lexicon.IsUnique check fails (#669)
myl7 Mar 24, 2022
6316b34
Add 虛擬機器
sgalal Apr 24, 2022
0f23ef1
Remove 盼既示覆
sgalal Apr 24, 2022
165bf59
Remove 皮膚 -> 面板
sgalal Apr 24, 2022
0f36d6e
Drop tests of Python 3.5
sgalal May 4, 2022
92e8bda
Add new simp-trad pairs (#677)
ayaka14732 May 4, 2022
274b54e
Fix 喫-related entries in s2t dictionary (#682)
ayaka14732 May 26, 2022
17df75d
Remove rare word 算发 (#683)
ayaka14732 May 26, 2022
ea76c64
Add new simp-trad pairs (#684)
ayaka14732 May 26, 2022
dbfae90
fix JPVariants.txt 繫 (#685)
garywill May 30, 2022
d975362
fix JPVariants.txt 醱 (#687)
garywill May 30, 2022
608567b
fix JPVariants.txt 潑 (#686)
garywill May 30, 2022
a751ac6
fix JPVariants.txt 竈 (#688)
garywill May 30, 2022
e649d3f
加入《通用規範漢字表》定義的簡繁轉換 (#484)
danny0838 Jun 1, 2022
24edc05
剋 -> 克 剋 (#671)
tusooa Jun 1, 2022
599bb90
Update version for 1.1.4 release + clean obsoletes (#692)
AntonOfTheWoods Jun 4, 2022
273ff67
Fix typo in NEWS.md
ayaka14732 Jun 4, 2022
10571e3
新增轉換:驒→騨 (#694)
SteveLz Jun 13, 2022
ddb58ef
Revert "新增轉換:驒→騨 (#694)" (#696)
ayaka14732 Jun 13, 2022
9ff72e6
Set soversion number to project version (#708)
dirkmueller Aug 2, 2022
8885d6d
Add "clib\__init__.py" in “python\opencc” (#693)
forfudan Aug 14, 2022
3401f38
Add support for apple silicon build tag (#716)
p208p2002 Sep 21, 2022
48f8dbc
修復與「涌」相關的錯誤轉換 (#663)
groverlynn Oct 31, 2022
a63f88c
fix: 汇丰 - 滙豐,汇业 -> 滙業 (#719)
huacnlee Nov 8, 2022
ce81fcc
fix build on win arm64 (#731)
eagleoflqj Nov 14, 2022
ce8ee9b
修正誤轉換 (#734)
groverlynn Nov 22, 2022
3d82c6b
Update node.js versions to 18 and drop the out-of-support 12 and 14 (…
groverlynn Nov 22, 2022
8a6b924
Add python 3.11 support (#727) (#728)
AntonOfTheWoods Dec 4, 2022
0a7632c
Release 1.1.5 (#742)
AntonOfTheWoods Dec 4, 2022
266366b
Fix macos not building with cpp 14 compat (#744)
AntonOfTheWoods Dec 6, 2022
717ed15
Bump gtest and benchmark to work w/ latest runners (#747)
AntonOfTheWoods Dec 8, 2022
eff147c
Release 1.1.6 (#748)
AntonOfTheWoods Dec 8, 2022
7c75cdf
Fix 恒生 -> 恒生,恒指 -> 恒指, 恒大 -> 恒大。 (#741)
huacnlee Dec 8, 2022
67cdb4d
修复此项目作为子其他cmake项目的子项目时,导致install失败的问题 (#723)
dnasdw Dec 8, 2022
07fcd41
Fix typos (#699)
kianmeng Dec 8, 2022
2dcf14d
Fix missing c++ version bump (#749)
AntonOfTheWoods Dec 8, 2022
cddc422
fix cpp example (#750)
eagleoflqj Dec 16, 2022
b8a190a
Add support of CMake config modules (#763)
WhiredPlanck Feb 6, 2023
e48e3cd
Fix broken DIR_LIBRARY usages (#764)
WhiredPlanck Feb 6, 2023
df3a21f
Set missing OPENCC_INCLUDE_DIR for CMake config modules (#766)
WhiredPlanck Feb 16, 2023
a5549b5
Add target_include_directories command to CMakeLists.txt (#769)
WhiredPlanck Feb 16, 2023
71b7fe1
斗宿->斗宿 (#737)
groverlynn Jul 17, 2023
ed155e7
add mingw-w64 ci
eagleoflqj Aug 30, 2023
4ebae73
Add support for py3.12, node20, remove EOL py3.7, node16 (#820)
AntonOfTheWoods Oct 15, 2023
99653a8
Add 禁用 / 停用 in TWPhrasesIT (#810)
PeterDaveHello Oct 15, 2023
2dd6a5e
Add Python package build validation AND Release 1.1.7 (#824)
AntonOfTheWoods Oct 15, 2023
68aea78
Add Dart binding (#869)
lindeer Jun 19, 2024
7cd3fdf
Remove redundant slash in CMakeLists.txt (#853)
doggy8088 Jun 19, 2024
6fe7d56
build: Update to `manylinux2014` in build scripts and setup.py (#874)…
ferstar Jul 15, 2024
8bc864d
Introduce Bazel.
BYVoid Jul 15, 2024
54aa87f
googletest
BYVoid Jul 15, 2024
e77b4df
darts-clone.
BYVoid Jul 15, 2024
b73e7aa
marisa-trie.
BYVoid Jul 15, 2024
48fe7e1
Add root package and github CI for Bazel.
BYVoid Jul 15, 2024
feffbb7
fix: release sdist to PyPI (#797)
frostming Jul 17, 2024
ca3d0e7
Fix the build warning / error in Segments.hpp (string conversion).
BYVoid Jul 24, 2024
25c06c2
几 (#792)
groverlynn Jul 24, 2024
28ba3c9
新增转换 道咸 -> 道咸 (#786)
amorphobia Jul 24, 2024
075775a
地名更正补充 (#760)
SteveLz Jul 24, 2024
61810ea
[fix] typo fix 影象 -> 影像 (#779)
ZoneTwelve Jul 24, 2024
7a3110f
栗→栗 (#837)
SteveLz Jul 24, 2024
d2256b3
Add 處理程序 in TWPhrasesIT (#825)
PeterDaveHello Jul 24, 2024
99b01b8
Sort all text dictionaries (will add a test to ensure this).
BYVoid Jul 24, 2024
0b1d6a3
「杠」星名修正 (#878)
SteveLz Jul 25, 2024
1be247f
「里」「余」更正 (#877)
SteveLz Jul 25, 2024
55d00f4
Add more build targets under src.
BYVoid Jul 16, 2024
688505d
Add config_test and simple_converter_test with Bazel runfiles.
BYVoid Jul 16, 2024
7d83012
Add DictionaryTest to ensure all text dictionaries are sorted.
BYVoid Jul 24, 2024
ad28f41
tclap
BYVoid Jul 18, 2024
8ec353b
Bazel for opencc command line tools.
BYVoid Jul 25, 2024
2a818ac
Add bazel branch into github bazel workflow.
BYVoid Jul 25, 2024
97f1261
Bazel genrule for marisa binary dictionaries (ocd2).
BYVoid Jul 25, 2024
b31a7c5
Add genrule for merging and reversing text dictionaries.
BYVoid Jul 25, 2024
a1e2800
Support additional lookup paths in the opencc command line converter.
BYVoid Jul 25, 2024
c083546
Bazel test for CommandLineConvertTest.
BYVoid Jul 25, 2024
2591b9e
Add optional paths to the constructor of SimpleConverter.
BYVoid Jul 25, 2024
0d0b721
Encapsulate data into the top-level opencc target and add bazel_openc…
BYVoid Jul 25, 2024
54cec60
Fix build failure.
BYVoid Jul 25, 2024
9f42c60
Sort STPhrases.txt.
BYVoid Jul 25, 2024
37625b6
Fix the init of CONFIG_TEST_DIR_PATH.
BYVoid Jul 26, 2024
65c5a55
Change "python" to "python3" in node gypi.
BYVoid Jul 26, 2024
78b7192
Fix VS build warnings.
BYVoid Jul 26, 2024
e3769c9
Minor fixes for Bazel.
BYVoid Jul 26, 2024
0c118d4
Update README.md with Bazel and adjust CI icons.
BYVoid Jul 26, 2024
9e0e976
Bump the version to 1.1.8.
BYVoid Jul 26, 2024
08584b3
Remove 藍牙/藍芽 mapping in TWPhrasesIT (#808)
PeterDaveHello Jul 26, 2024
3f86268
新增 命名空間 => 名字空間 (#698)
fish0373 Jul 26, 2024
835774d
Remove 实时技术/實時技術 mapping with 实时/即時 in STPhrases (#826)
PeterDaveHello Jul 26, 2024
fd47e4a
CMakeLists.txt: Fix capitalization of repo URL (#785)
ryandesign Jul 26, 2024
b902c42
牀」簡體部分修正為「床」 TWPhrasesIT 修正部分科技用語 (#707)
zhtw2013 Jul 26, 2024
9206007
不轉換「尼乾子」「尼乾陀 」
BYVoid Jul 26, 2024
23d2f1d
增加轉換:氷、砺、庄 (#609)
SteveLz Jul 26, 2024
47e6d60
Sort dictionary.
BYVoid Jul 26, 2024
2d5817d
Change back the "python3" in node gyp action back to "python" for com…
BYVoid Jul 26, 2024
707f29e
Add MSVC Github CI config and add os for Bazel, CMake, Node CI, and u…
BYVoid Jul 26, 2024
dadb9d3
Update README.md with more CI icons.
BYVoid Jul 26, 2024
b4fdac1
Update the bundled googletest to 1.15, pybind11 to 2.13.1.
BYVoid Jul 26, 2024
7963e74
Update the bundled tclap to 1.2.5.
BYVoid Jul 26, 2024
10a9331
添加「返佣」
BYVoid Jul 26, 2024
b7bf099
Remove .travis.yml
BYVoid Jul 26, 2024
b5c5388
Update cpack and npm ignored files.
BYVoid Jul 26, 2024
fec047f
防止「摩爾線程」「字節跳動」在臺灣用語模式下轉換。
BYVoid Jul 26, 2024
3511e50
更新測試(摩爾線程、字節跳動)
BYVoid Jul 26, 2024
a020198
Add make bazel and make bazel-clean.
BYVoid Jul 27, 2024
645be5d
Fix warnings about signed and unsigned comparisons.
BYVoid Jul 27, 2024
57cfcef
Change back offset in BinaryDict to size_t, because "size_t" on MSVC …
BYVoid Jul 27, 2024
d4dbf66
Fix MSVC warning C4005: 'NOMINMAX': macro redefinition.
BYVoid Jul 27, 2024
44f1f2e
1.1.8更新記錄。
BYVoid Jul 27, 2024
6c42a5d
Introduce 'argv0' parameter to SimpleConverter, and fix Bazel bundled…
BYVoid Jul 28, 2024
6f8ae64
Change googletest to bazel dev_dependency.
BYVoid Jul 29, 2024
fd8d011
Add Installation details in readme.
BYVoid Jul 29, 2024
0f066ea
Test of Github FUNDING.yml
BYVoid Jul 29, 2024
7b59e82
Fix npmignore.
BYVoid Jul 30, 2024
2ef04bb
Bump the version to 1.1.9.
BYVoid Jul 30, 2024
56963d2
Apply patch to rapidjson.
BYVoid Jul 30, 2024
c463826
Use Python 3.
BYVoid Jul 30, 2024
194827e
Add Bazel Python library and test. (#882)
BYVoid Jul 30, 2024
431f385
Add back Config::NewFromFile with one argument to maintain the ABI co…
BYVoid Aug 3, 2024
d6c7f06
Fix missing cstdint for GCC 15
liangyongxiang Aug 26, 2024
795dcb8
Update STPhrases: 林俊杰 -> 林俊傑
PhantomPower82 Aug 11, 2024
54a4488
Add more 不断发 phrases
Benau Sep 9, 2024
2cfe7ae
fix errors when build is required during "npm install opencc"
Oct 20, 2024
ffd782d
Upgrade nan from 2.20.0 to 2.22.0 to fix build errors under Node.js 23
Nov 2, 2024
3e20fb4
fix build errors under Node.js 23 and macOS
Nov 2, 2024
8bc4f88
STPhrases「谷阳」等 (#881)
SteveLz Nov 14, 2024
b712f90
Fix build for gcc 15 (#934)
epico Feb 12, 2025
8831388
Rename `longbridgeapp` to `longbridge`. (#924)
huacnlee Feb 12, 2025
993fc17
Depend on cmake only if there is no system package (#932)
mgorny Feb 12, 2025
1eedfc7
Update STPhrases.txt: 刪除侮辱性詞彙
sncix Mar 21, 2025
3d0a621
Fix crash when read the config file
Mar 25, 2025
d7d8685
Add typing (#945)
C0rn3j Apr 30, 2025
ab3196f
Unify macOS naming (#944)
C0rn3j Apr 30, 2025
db98275
Set default language version through variable (#937)
wdhongtw Apr 30, 2025
dc99b36
Fix "python" command in gyp. (#959)
BYVoid May 1, 2025
08a0bde
里、雲、沖、托、范等地名更正 (#939)
SteveLz May 1, 2025
bb55243
Drop Node 18 and x86 (Win). (#960)
BYVoid May 1, 2025
5b3519a
Update STPhrases.txt (#948)
Lepton-Lee May 2, 2025
dfd56b4
Update nan
soruly May 8, 2025
901689a
Fix deprecated declarations in C++17
WhiredPlanck Jul 4, 2025
0da143e
ci: add macos-14 to GitHub Actions matrix
ferstar Aug 15, 2025
1e73a47
fix: accept conda Terms of Service in Linux, macOS and Windows PyPI r…
ferstar Aug 15, 2025
3290b16
fix: support ARM64 architecture in macOS PyPI release script
ferstar Aug 15, 2025
83052ff
Update STPhrases.txt
sncix Aug 23, 2025
0df28b3
Merge pull request #974 from ferstar/ci/macos-14-support
lotem Nov 10, 2025
05cd7bb
nodejs workflow: test latest and LTS versions (#999)
lotem Dec 24, 2025
9529976
fix: tw2sp 「軟體動物」 不應轉換為 「軟件動物」
frankslin Jan 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
49 changes: 49 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
version: "{build}"
skip_branch_with_pr: true
skip_tags: true
build: off

os: Visual Studio 2019

environment:
matrix:
# Build Node.js
- nodejs_version: stable
- nodejs_version: 22
- nodejs_version: 20

# Build plain C++
- nodejs_version: none

platform:
- x64

for:
- matrix:
except:
- nodejs_version: none
install:
- ps: Install-Product node $env:nodejs_version $env:platform
- npm -g i npm@latest
build_script:
- appveyor-retry call npm install --build-from-source
test_script:
- npm test

- matrix:
only:
- nodejs_version: none
build_script:
- SET arch=%platform%
- IF "%platform%"=="x86" SET arch=Win32

- cmake -A%arch% -S. -Bbuild -DCMAKE_INSTALL_PREFIX:PATH=. -DENABLE_GTEST:BOOL=ON -DENABLE_BENCHMARK:BOOL=ON -DCMAKE_BUILD_TYPE=Release
- cmake --build build --config Release --target install
test_script:
- cd build
- ctest --verbose -C Release
after_build:
- 7z a OpenCC.zip build/bin build/include build/lib build/share
artifacts:
- path: OpenCC.zip
name: OpenCC
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.2.1
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github: BYVoid
24 changes: 24 additions & 0 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Bazel

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-14]

steps:
- uses: actions/checkout@v4
- uses: bazelbuild/setup-bazelisk@v3
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: bazel build //:opencc
- run: bazel test --test_output=all //src/... //data/... //test/... //python/...
22 changes: 22 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: CMake

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build-and-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-14]
steps:
- uses: actions/checkout@v4
- name: make build
run: make build VERBOSE=1 REL_BUILD_DOCUMENTATION=OFF
- name: make test
run: make test VERBOSE=1
- name: make benchmark
run: make benchmark VERBOSE=1
32 changes: 32 additions & 0 deletions .github/workflows/mingw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: mingw-w64

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
- uses: actions/checkout@v4
- name: Install dependencies
run: pacman -S --noconfirm base-devel mingw-w64-x86_64-toolchain cmake ninja python
- name: Build with mingw-w64
run: |
CC=/mingw64/bin/cc CXX=/mingw64/bin/c++ cmake \
-B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DENABLE_GTEST=ON \
-DBUILD_SHARED_LIBS=OFF
cmake --build build
- name: Run test
run: |
cd build
ctest
26 changes: 26 additions & 0 deletions .github/workflows/msvc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: MSVC

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build-and-test:
runs-on: windows-latest
strategy:
matrix:
arch:
- amd64
- amd64_x86
- amd64_arm64
steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.arch }}
- name: build
run: ./build.cmd
- name: test
run: ./test.cmd
31 changes: 31 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Node.js

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
build-and-test:
runs-on: ${{ matrix.os }}

strategy:
matrix:
# Bleeding Edge: Latest Node × Latest OS
os: [ubuntu-latest, macos-latest]
node-version: [latest]
# Stable: Node 20, 22 (LTS) on macOS 14 (ARM64)
include:
- os: macos-14
node-version: 22
- os: macos-14
node-version: 20
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm ci
- run: npm test
69 changes: 69 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Python

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
unit-test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 pytest wheel setuptools
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --exclude deps --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --exclude deps --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Build and install
run: python -m pip install .
- name: Test with pytest
run: pytest python/

test-pypi:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-14, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v4

- name: Build package and upload from docker (Linux)
if: runner.os == 'Linux'
run: |
docker run --rm -v "${PWD}:/opt/OpenCC" \
-e TWINE_USERNAME=__token__ \
-e TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }} \
ubuntu:22.04 /bin/bash /opt/OpenCC/release-pypi-linux.sh testonly

- name: Build package and upload (macOS)
if: runner.os == 'macOS'
run: bash release-pypi-macos.sh testonly
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

- name: Build package and upload (Windows)
if: runner.os == 'Windows'
run: |
C:\Miniconda/condabin/conda.bat init powershell
./release-pypi-windows.cmd testonly
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and upload python package to PyPI

on:
workflow_dispatch

jobs:
release-pypi:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, macos-14, windows-latest]
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1

- name: Build package and upload from docker (Linux)
if: runner.os == 'Linux'
run: |
docker run --rm -v "${PWD}:/opt/OpenCC" \
-e TWINE_USERNAME=__token__ \
-e TWINE_PASSWORD=${{ secrets.PYPI_TOKEN }} \
ubuntu:22.04 /bin/bash /opt/OpenCC/release-pypi-linux.sh

- name: Build package and upload (macOS)
if: runner.os == 'macOS'
run: bash release-pypi-macos.sh
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}

- name: Build package and upload (Windows)
if: runner.os == 'Windows'
run: |
C:\Miniconda/condabin/conda.bat init powershell
./release-pypi-windows.cmd
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@
*.tgz
.project
.cproject
/.vscode
/.mypy_cache
/bazel-*
/build
/other
/doc/html
/dist
/opencc.xcodeproj
/test/dict.ocd
/test/dict.txt
/test/dict.bin
/xcode
/node_modules
/*.egg-info
/.venv/
63 changes: 0 additions & 63 deletions .idea/codeStyleSettings.xml

This file was deleted.

Loading