Skip to content

Commit e57eeeb

Browse files
committed
Create NVDA Add-on
1 parent eabeea9 commit e57eeeb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2294
-624
lines changed

.gitattributes

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,10 @@
1616
# Denote all files that are truly binary and should not be modified.
1717
*.png binary
1818
*.jpg binary
19-
*.pdf binary
19+
*.pdf binary
20+
21+
# Try to ensure that po files in the repo does not include
22+
# source code line numbers.
23+
# Every person expected to commit po files should change their personal config file as described here:
24+
# https://mail.gnome.org/archives/kupfer-list/2010-June/msg00002.html
25+
*.po filter=cleanpo

.github/dependabot.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: 2
2+
updates:
3+
4+
# Maintain dependencies for GitHub Actions
5+
- package-ecosystem: "github-actions"
6+
# Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.)
7+
directory: "/"
8+
schedule:
9+
interval: "weekly"
10+
groups:
11+
actions-minor:
12+
update-types:
13+
- minor
14+
- patch

.github/workflows/build_addon.yml

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: build addon
2+
3+
on:
4+
push:
5+
tags: ["*"]
6+
# To build on main/master branch, uncomment the following line:
7+
# branches: [ main , master ]
8+
branches: [ NVDA-Add-on ]
9+
10+
pull_request:
11+
branches: [ main, master, NVDA-Add-on ]
12+
13+
workflow_dispatch:
14+
15+
jobs:
16+
build:
17+
18+
runs-on: ubuntu-latest
19+
20+
steps:
21+
- uses: actions/checkout@v5
22+
23+
- run: echo -e "pre-commit\nscons\nmarkdown">requirements.txt
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v6
27+
with:
28+
python-version: 3.11
29+
cache: 'pip'
30+
31+
- name: Install dependencies
32+
run: |
33+
python -m pip install --upgrade pip wheel
34+
pip install -r requirements.txt
35+
sudo apt-get update -y
36+
sudo apt-get install -y gettext
37+
38+
- name: Code checks
39+
run: export SKIP=no-commit-to-branch; pre-commit run --all
40+
41+
- name: building addon
42+
run: scons && scons pot
43+
44+
- uses: actions/upload-artifact@v4
45+
with:
46+
name: packaged_addon
47+
path: |
48+
./*.nvda-addon
49+
./*.pot
50+
51+
upload_release:
52+
runs-on: ubuntu-latest
53+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
54+
needs: ["build"]
55+
permissions:
56+
contents: write
57+
steps:
58+
- uses: actions/checkout@v5
59+
- name: download releases files
60+
uses: actions/download-artifact@v5
61+
- name: Display structure of downloaded files
62+
run: ls -R
63+
- name: Calculate sha256
64+
run: |
65+
echo -e "\nSHA256: " >> changelog.md
66+
sha256sum *.nvda-addon >> changelog.md
67+
68+
- name: Release
69+
uses: softprops/action-gh-release@v2
70+
with:
71+
files: |
72+
*.nvda-addon
73+
*.pot
74+
body_path: changelog.md
75+
fail_on_unmatched_files: true
76+
prerelease: ${{ contains(github.ref, '-') }}
File renamed without changes.
File renamed without changes.
Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
name: SyncToGitee
2-
on:
3-
push:
4-
branches:
5-
- main
6-
jobs:
7-
repo-sync:
8-
runs-on: ubuntu-latest
9-
steps:
10-
- name: Checkout source codes
11-
uses: actions/checkout@v4
12-
13-
- name: Mirror the Github organization repos to Gitee.
14-
uses: Yikun/hub-mirror-action@v1.4
15-
with:
16-
src: 'github/RapidAI'
17-
dst: 'gitee/RapidAI'
18-
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
19-
dst_token: ${{ secrets.GITEE_TOKEN }}
20-
force_update: true
21-
# only sync this repo
22-
static_list: "RapidOCR"
23-
debug: true
24-
25-
- name: Mirror the Github organization repos to Gitee.
26-
uses: Yikun/hub-mirror-action@v1.4
27-
with:
28-
src: 'github/RapidAI'
29-
dst: 'gitee/openKylin'
30-
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
31-
dst_token: ${{ secrets.GITEE_TOKEN }}
32-
force_update: true
33-
# only sync this repo
34-
static_list: "RapidOCR"
1+
name: SyncToGitee
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
repo-sync:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout source codes
11+
uses: actions/checkout@v4
12+
13+
- name: Mirror the Github organization repos to Gitee.
14+
uses: Yikun/hub-mirror-action@v1.4
15+
with:
16+
src: 'github/RapidAI'
17+
dst: 'gitee/RapidAI'
18+
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
19+
dst_token: ${{ secrets.GITEE_TOKEN }}
20+
force_update: true
21+
# only sync this repo
22+
static_list: "RapidOCR"
23+
debug: true
24+
25+
- name: Mirror the Github organization repos to Gitee.
26+
uses: Yikun/hub-mirror-action@v1.4
27+
with:
28+
src: 'github/RapidAI'
29+
dst: 'gitee/openKylin'
30+
dst_key: ${{ secrets.GITEE_PRIVATE_KEY }}
31+
dst_token: ${{ secrets.GITEE_TOKEN }}
32+
force_update: true
33+
# only sync this repo
34+
static_list: "RapidOCR"
3535
debug: true
File renamed without changes.

.gitignore

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,4 +156,13 @@ long1.jpg
156156
*.pdmodel
157157

158158
.DS_Store
159-
*.npy
159+
*.npy
160+
161+
addon/doc/*.css
162+
addon/doc/en/
163+
*_docHandler.py
164+
*.html
165+
manifest.ini
166+
*.nvda-addon
167+
.sconsign.dblite
168+
/[0-9]*.[0-9]*.[0-9]*.json

.pre-commit-config.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,9 @@ repos:
1616
hooks:
1717
- id: black
1818
files: \.py$
19+
- repo: https://github.com/pre-commit/pre-commit-hooks
20+
rev: v4.3.0
21+
hooks:
22+
- id: check-ast
23+
- id: check-case-conflict
24+
- id: check-yaml

0 commit comments

Comments
 (0)