Skip to content

Commit 963d7f1

Browse files
committed
Initial commit
0 parents  commit 963d7f1

15 files changed

Lines changed: 1156 additions & 0 deletions

File tree

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Set default behaviour, in case users don't have core.autocrlf set.
2+
* text=auto
3+
4+
# Try to ensure that po files in the repo does not include
5+
# source code line numbers.
6+
# Every person expected to commit po files should change their personal config file as described here:
7+
# https://mail.gnome.org/archives/kupfer-list/2010-June/msg00002.html
8+
*.po filter=cleanpo

.github/workflows/release.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Addon-release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
release:
10+
permissions:
11+
contents: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: 3.11
21+
22+
- name: Install dependencies
23+
run: |
24+
pip install scons markdown
25+
sudo apt update
26+
sudo apt install gettext
27+
28+
- name: Build addon
29+
run: scons
30+
31+
- name: Upload release
32+
id: release
33+
uses: softprops/action-gh-release@v2
34+
with:
35+
token: ${{ secrets.GITHUB_TOKEN }}
36+
tag_name: ${{ github.ref_name }}
37+
files: |
38+
*.nvda-addon
39+
generate_release_notes: true
40+
prerelease: false
41+
42+
- name: extract addon info
43+
run: |
44+
python3 -c 'from buildVars import addon_info
45+
env = {
46+
"ADDON_NAME": addon_info["addon_name"],
47+
"ADDON_VERSION": addon_info["addon_version"],
48+
"ADDON_CHANNEL": addon_info["addon_updateChannel"],
49+
}
50+
[print(f"{k}={v}") for k, v in env.items()]' > "$GITHUB_ENV"
51+
52+
- name: submit addon
53+
uses: beqabeqa473/submitNVDAAddon@v1
54+
with:
55+
addon_name: ${{ env.ADDON_NAME }}
56+
addon_version: ${{ env.ADDON_VERSION }}
57+
download_url: ${{ fromJSON(steps.release.outputs.assets)[0].browser_download_url }}
58+
channel: ${{ env.ADDON_CHANNEL }}
59+
token: ${{ secrets.USER_TOKEN }}

.gitignore

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
addon/doc/*.css
2+
addon/doc/en/
3+
*_docHandler.py
4+
*.html
5+
manifest.ini
6+
*.mo
7+
*.pot
8+
*.py[co]
9+
*.nvda-addon
10+
.sconsign.dblite
11+
/[0-9]*.[0-9]*.[0-9]*.json

.vscode/settings.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"python.autoComplete.extraPaths": [
3+
"../nvda/source",
4+
"../nvda/miscDeps/python"
5+
],
6+
"python.analysis.extraPaths": [
7+
"../nvda/source",
8+
"../nvda/miscDeps/python",
9+
"addon/globalPlugins"
10+
],
11+
"python.analysis.stubPath": "${workspaceFolder}/.vscode/typings",
12+
"pylint.args": [
13+
"--disable=all",
14+
"--enable=C0103",
15+
"--argument-rgx=[a-z_][a-zA-Z0-9]{0,40}$",
16+
"--attr-rgx=[a-z_][a-zA-Z0-9]{0,40}$",
17+
"--class-attribute-rgx=[a-z_][a-zA-Z0-9]{0,40}$",
18+
"--function-rgx=[a-z_][a-zA-Z0-9]{0,40}$",
19+
"--method-rgx=(__)?((?:event|script)_)?(UIA_)?[a-z_][a-zA-Z0-9]{0,40}(__)?$",
20+
"--module-rgx=[a-z_][a-zA-Z0-9]{0,40}$",
21+
"--variable-rgx=[a-z_][a-zA-Z0-9]{0,40}$"
22+
],
23+
"pylint.severity": {
24+
"convention": "Warning"
25+
},
26+
"pylint.lintOnChange": true,
27+
}

.vscode/typings/__builtins__.pyi

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
def _(msg: str) -> str:
2+
...
3+
4+
5+
def pgettext(context: str, message: str) -> str:
6+
...
7+
8+
9+
def ngettext(msgid1: str, msgid2: str, n: int) -> str:
10+
...
11+
12+
13+
def npgettext(context: str, msgid1: str, msgid2: str, n: int) -> str:
14+
...

0 commit comments

Comments
 (0)