Skip to content

Commit

Permalink
Merge branch 'osfans:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
uliloewi authored Jan 3, 2025
2 parents 7c159ba + 38378e4 commit ad4c802
Show file tree
Hide file tree
Showing 1,692 changed files with 1,861,907 additions and 1,212,033 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Commit

on: [push]

env:
CI_NAME: Commit CI

jobs:
build:
if: "!contains(github.event.head_commit.message, 'wip')"
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
cache: gradle

- name: Setup keystore
run: |
echo ${{ secrets.SIGNING_KEY }} | base64 --decode | cat >> $(pwd)/signingkey.jks
cat << EOF > keystore.properties
storeFile=$(pwd)/signingkey.jks
storePassword=${{ secrets.KEY_STORE_PASSWORD }}
keyAlias=${{ secrets.ALIAS }}
keyPassword=${{ secrets.KEY_PASSWORD }}
EOF
- name: Create DB
run: |
pushd tools
python3 -m pip install -r requirements.txt
touch tables/*.py
python3 make.py
popd
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build

- name: Create latest release
uses: 'marvinpinto/action-automatic-releases@latest'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: latest
prerelease: true
title: "Lastest Build"
files: |
app/build/outputs/apk/release/*.APK
tools/warnings.txt
- name: Deploy to SF
run: |
sshpass -p '${{ secrets.SF_PASSWORD }}' scp -o StrictHostKeyChecking=no cgi/cgi-bin/*.* ${{ secrets.SF_USERNAME }}@web.sourceforge.net:/home/project-web/mcpdict/cgi-bin
sshpass -p '${{ secrets.SF_PASSWORD }}' scp -o StrictHostKeyChecking=no tools/warnings.txt app/build/reports/lint-results-debug.html ${{ secrets.SF_USERNAME }}@web.sourceforge.net:/home/project-web/mcpdict/htdocs
26 changes: 26 additions & 0 deletions .github/workflows/push-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Pull Request

on:
pull_request:
types:
- opened
- reopened
# pull request's head branch was updated
- synchronize

env:
CI_NAME: Pull Request CI

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Create DB
run: |
pushd tools
python3 -m pip install -r requirements.txt
touch tables/*.py
python3 make.py
popd
9 changes: 6 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
gen
publish
pretty.py
.idea/
.gradle/
gradle.properties
keystore.properties
local.properties
warnings*.txt
build/
*.db
*.db-journal
*.iml
*.keystore
*.xls
*.xlsx
*.pdf
__pycache__
*.doc
*.docx
*.pyc
__pycache__
yedict/
揚州同音字表*.tsv
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Change Log/修改歷史

### V5.0 (2021.09.15)
支持Unicode 14.0,增加多种方言讀音,增加說文解字、廣韻、康熙字典、漢語大字典的字義。

### V4.0 (2020.08.20)
“漢字音典”初始版本

### V3.0 (2016.05.03)
添加功能:<br>
1) 添加吳語(上海話)及閩南語讀音;<br>
2) 添加《平水韻》韻部;<br>
3) 添加生字本導出、導入功能。<br>
大幅修訂簡繁、異體轉換表。<br>
不再支持Android 4.0以下版本。<br>

### V2.1 (2015.03.24)
支持用注音符號輸入和顯示普通話讀音。<br>

### V2.0.1 (2015.03.09)
去掉了236個日本國字因數據庫處理失誤產生的錯誤音讀。<br>
給“畠”字增加了普通話讀音tián。<br>

### V2.0 (2015.02.07)
添加功能:<br>
1) 添加了複製漢字讀音的功能;<br>
2) 添加了生字本功能;<br>
修訂數據庫:<br>
1) 改用poem的《廣韻字音表》(2014年9月30日版)作爲中古音數據庫;<br>
2) 更新了越南語讀音數據庫;<br>
3) 修正了簡繁、異體字轉換表中的個別條目。<br>

### V1.3 (2014.11.24)
兼容低版本的Android(最低支持版本由3.0改爲1.6,但僅在2.2上做過測試)。

### V1.2.1 (2014.08.04)
修正了普通話音節“lü蔓nüè”的錯誤顯示。

### V1.2 (2014.07.30)
精簡了簡繁、異體字轉換表的格式,減小了程序體積。<br>
對漢字音數據庫做了如下修正:<br>
1) 粵語:增加了一些字的異讀音(它們在粵語審音配詞字庫中被錯誤地標爲自身的異讀);<br>
2) 日語:加粗了“双雙搭撘踏”幾字的吳音(它們本在常用漢字表中,但因爲歷史假名遣與漢音不同,原數據庫中未加粗);<br>
3) 朝鮮語:去掉了“娘怒拏異异笝諾诺”幾字由頭音法則滋生的錯誤讀音;<br>
4) 越南語:增加了“贇赟”兩字的讀音。<br>

### V1.1 (2014.04.16)
在以“漢字”模式查詢,並勾選“簡繁、異體轉換”選項時,簡繁、異體字下方會用灰色括號顯示它對應着查詢的哪一個字。

### V1.0 (2014.04.02)
初始版本
63 changes: 8 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,13 @@
# MCPDict: 漢字音典
# MCPDict/漢字音典

這是一個安卓應用程序,可以查詢漢字在古今中外多種語言中的讀音及釋義,也可以通過這些語言中的讀音來反查漢字。
另有[網頁版](https://mcpdict.sourceforge.io/)提供了簡單的查詢功能。
本程序源自[漢字古今中外讀音查詢](https://github.com/MaigoAkisame/MCPDict),現收錄了[數百種語言(方言)](https://geojson.io/#id=github:osfans/MCPDict/blob/master/%E6%96%B9%E8%A8%80.geojson&map=3.02/37.65/108.48)的漢字讀音,使用國際音標注音,可查詢漢字在古今中外多種語言中的讀音及釋義,也能給語言學習者提供有限的幫助。可去[QQ群](mqqopensdkapi://bizAgent/qm/qr?url=http%3A%2F%2Fqm.qq.com%2Fcgi-bin%2Fqm%2Fqr%3Ffrom%3Dapp%26p%3Dandroid%26jump_from%3Dwebapi%26k%3D-hNzAQCgZQL-uIlhFrxWJ56umCexsmBi)[GitHub](https://github.com/osfans/MCPDict)提出意見与建議,提供同音字表請求收錄。

## 下載
[<img alt="GitHub Release" src='https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png' height='80px'>](https://github.com/osfans/MCPDict/releases)
[<img alt='Coolapk' src='https://static.coolapk.com/static/web/v8/img/icon.png' height='60px'/>](https://www.coolapk.com/apk/com.osfans.mcpdict)
本程序最開始僅有安卓離綫版,後來又開發了在綫網頁版,另外[nk2028](https://github.com/nk2028)[唯二](https://github.com/vearvip)也各自開發了網頁版:
- [最新安卓版](https://github.com/osfans/MCPDict/releases/tag/latest):使用[Github Actions](https://github.com/osfans/MCPDict/actions)自動編譯[代碼](https://github.com/osfans/MCPDict)生成的安卓版、[錯誤日志](https://mcpdict.sourceforge.io/warnings.txt)
- [最新網頁版](https://mcpdict.sourceforge.io/)[前端](https://github.com/osfans/MCPDict/tree/master/cgi/cgi-bin)):提供了與安卓版界面類似的一部分功能。
- [唯二網頁版](https://mcpdict.vear.vip/)[前端](https://github.com/vearvip/mcpdict-frontend)[後端](https://github.com/vearvip/mcpdict-backend)):提供了字音查詢、長文注音、語言地圖、設置等功能。
- [nk2028網頁版](https://nk2028.shn.hk/hdqt/)[前端](https://github.com/nk2028/hdqt)[後端](https://github.com/nk2028/hdqt-server)):提供了字音查詢等功能。

## 版本歷史
本程序收錄了[統一碼16.0](https://www.unicode.org/reports/tr38/tr38-37.html)全部漢字(不包含部首及兼容區漢字)、〇(同“星”或“零”)、□(有音無字、本字不明),可使用[文津宋體](https://github.com/takushun-wu/WenJinMincho)顯示所有漢字。支持形音義等多種查詢方式:可輸入𰻞(漢字)、30EDE(統一碼)、biang2(普通話拼音,音節末尾的“?”可匹配任何聲調)、43(總筆畫數)、辵39(部首餘筆),查到“𰻞”字。也可使用兩分、五筆、倉頡等形碼進行查詢,亦可選擇說文解字、康熙字典、漢語大字典等通過釋義搜索到相應的漢字。

### V5.0 (2021.09.15)
支持Unicode 14.0,增加多种方言讀音,增加說文解字、廣韻、康熙字典、漢語大字典的字義。

### V4.0 (2020.08.20)
“漢字音典”初始版本

### V3.0 (2016.05.03)
添加功能:<br>
1) 添加吳語(上海話)及閩南語讀音;<br>
2) 添加《平水韻》韻部;<br>
3) 添加生字本導出、導入功能。<br>
大幅修訂簡繁、異體轉換表。<br>
不再支持Android 4.0以下版本。<br>

### V2.1 (2015.03.24)
支持用注音符號輸入和顯示普通話讀音。<br>

### V2.0.1 (2015.03.09)
去掉了236個日本國字因數據庫處理失誤產生的錯誤音讀。<br>
給“畠”字增加了普通話讀音tián。<br>

### V2.0 (2015.02.07)
添加功能:<br>
1) 添加了複製漢字讀音的功能;<br>
2) 添加了生字本功能;<br>
修訂數據庫:<br>
1) 改用poem的《廣韻字音表》(2014年9月30日版)作爲中古音數據庫;<br>
2) 更新了越南語讀音數據庫;<br>
3) 修正了簡繁、異體字轉換表中的個別條目。<br>

### V1.3 (2014.11.24)
兼容低版本的Android(最低支持版本由3.0改爲1.6,但僅在2.2上做過測試)。

### V1.2.1 (2014.08.04)
修正了普通話音節“lü蔓nüè”的錯誤顯示。

### V1.2 (2014.07.30)
精簡了簡繁、異體字轉換表的格式,減小了程序體積。<br>
對漢字音數據庫做了如下修正:<br>
1) 粵語:增加了一些字的異讀音(它們在粵語審音配詞字庫中被錯誤地標爲自身的異讀);<br>
2) 日語:加粗了“双雙搭撘踏”幾字的吳音(它們本在常用漢字表中,但因爲歷史假名遣與漢音不同,原數據庫中未加粗);<br>
3) 朝鮮語:去掉了“娘怒拏異异笝諾诺”幾字由頭音法則滋生的錯誤讀音;<br>
4) 越南語:增加了“贇赟”兩字的讀音。<br>

### V1.1 (2014.04.16)
在以“漢字”模式查詢,並勾選“簡繁、異體轉換”選項時,簡繁、異體字下方會用灰色括號顯示它對應着查詢的哪一個字。

### V1.0 (2014.04.02)
初始版本
25 changes: 18 additions & 7 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
import java.text.SimpleDateFormat

apply plugin: 'com.android.application'

android {
defaultConfig {
applicationId "com.osfans.mcpdict"
minSdkVersion 24
targetSdkVersion 35
versionCode 86
versionName "5.7 (2024.11.20)"
targetSdkVersion 34
versionCode 101
def date = new SimpleDateFormat ("yyyyMMdd").format(new Date())
versionName "5.7 ($date)"
buildConfigField "int", "DB_VER", "$date"
}

signingConfigs {
Expand All @@ -23,8 +27,16 @@ android {
}
}


def propsFile = rootProject.file('gradle.properties') //store release config in gradle.properties
applicationVariants.configureEach { variant ->
variant.outputs.configureEach {
def stringsFile = android.sourceSets.main.res.sourceFiles.find { it.name.equals 'strings.xml' }
def appName = new XmlParser().parse(stringsFile).string.find { it.@name.equals 'app_name' }.text()
def versionName = new SimpleDateFormat ("yyyyMMdd").format(new Date())
outputFileName = "${appName}${versionName}.APK"
}
}

def propsFile = rootProject.file('keystore.properties') //store release config in local.properties
def configName = 'release'

if (propsFile.exists() && android.signingConfigs.hasProperty(configName)) {
Expand Down Expand Up @@ -59,8 +71,7 @@ dependencies {
implementation 'androidx.preference:preference:1.2.1'
implementation 'androidx.constraintlayout:constraintlayout:2.2.0'
implementation 'androidx.webkit:webkit:1.12.1'
implementation 'org.osmdroid:osmdroid-android:6.1.11'
implementation 'com.github.MKergall:osmbonuspack:6.7.0'
implementation 'com.github.MKergall:osmbonuspack:6.9.0'
// Fix Duplicate class
implementation(platform("org.jetbrains.kotlin:kotlin-bom:1.8.22"))
}
1 change: 0 additions & 1 deletion app/src/main/assets/maps/110000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/120000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/130000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/140000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/150000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/210000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/220000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/230000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/310000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/320000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/330000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/340000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/350000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/360000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/370000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/410000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/420000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/430000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/440000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/450000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/460000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/500000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/510000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/520000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/530000.geojson

This file was deleted.

1 change: 0 additions & 1 deletion app/src/main/assets/maps/540000.geojson
Diff not rendered.
1 change: 0 additions & 1 deletion app/src/main/assets/maps/610000.geojson
Diff not rendered.
1 change: 0 additions & 1 deletion app/src/main/assets/maps/620000.geojson
Diff not rendered.
1 change: 0 additions & 1 deletion app/src/main/assets/maps/630000.geojson
Diff not rendered.
1 change: 0 additions & 1 deletion app/src/main/assets/maps/640000.geojson
Diff not rendered.
1 change: 0 additions & 1 deletion app/src/main/assets/maps/650000.geojson
Diff not rendered.
1 change: 0 additions & 1 deletion app/src/main/assets/maps/710000.geojson
Diff not rendered.
1 change: 0 additions & 1 deletion app/src/main/assets/maps/810000.geojson
Diff not rendered.
Loading

0 comments on commit ad4c802

Please sign in to comment.