Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
# Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.)
directory: "/"
schedule:
interval: "weekly"
groups:
actions-minor:
update-types:
- minor
- patch
18 changes: 9 additions & 9 deletions .github/workflows/release-on-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,25 @@ on:
push:
tags:
['*']
pull_request:
branches: [ main, master ]
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- run: echo -e "scons\nmarkdown">requirements.txt
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.11
python-version: 3.13
cache: 'pip'
- name: Install dependencies
run: |
pip install scons markdown
sudo apt update
pip install scons markdown
sudo apt install gettext

- name: Set add-on version from tag
Expand All @@ -36,14 +37,13 @@ jobs:
f.write(text)
f.truncate()
shell: python

- name: Build add-on
run: scons
- name: load latest changes from changelog
run: awk '/^# / && !flag {flag=1; next} /^# / && flag {exit} flag && NF' changelog.md > newChanges.md
- name: Calculate sha256
run: sha256sum *.nvda-addon >> newChanges.md
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: packaged_addon
path: |
Expand All @@ -56,12 +56,12 @@ jobs:
needs: ["build"]
steps:
- name: download releases files
uses: actions/download-artifact@v3
uses: actions/download-artifact@v8
- name: Display structure of downloaded files
run: ls -R

- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
body_path: packaged_addon/newChanges.md
files: packaged_addon/*.nvda-addon
Expand Down
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ addon/doc/*.css
addon/doc/en/
*_docHandler.py
*.html
*.ini
manifest.ini
*.mo
*.pot
*.py[co]
*.nvda-addon
.sconsign.dblite
*.code-workspace
*.json
/[0-9]*.[0-9]*.[0-9]*.json
13 changes: 13 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp
// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"ms-python.python",
"ms-python.vscode-pylance",
"redhat.vscode-yaml",
"charliermarsh.ruff"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
16 changes: 16 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"editor.accessibilitySupport": "on",
"python.autoComplete.extraPaths": [
"../../nvda/source",
"../../nvda/miscDeps/python"
],
"files.insertFinalNewline": true,
"files.trimFinalNewlines": true,
"editor.insertSpaces": false,
"python.analysis.stubPath": "${workspaceFolder}/.vscode/typings",
"python.analysis.extraPaths": [
"../../nvda/source",
"../../nvda/miscDeps/python"
],
"python.defaultInterpreterPath": "${workspaceFolder}/../../.venv/scripts/python.exe"
}
2 changes: 2 additions & 0 deletions .vscode/typings/__builtins__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def _(msg: str) -> str: ...
def pgettext(context: str, message: str) -> str: ...
50 changes: 0 additions & 50 deletions beepKeyboard.code-workspace

This file was deleted.

106 changes: 51 additions & 55 deletions buildVars.py
Original file line number Diff line number Diff line change
@@ -1,64 +1,60 @@
# -*- coding: UTF-8 -*-

# Build customizations
# Change this file instead of sconstruct or manifest files, whenever possible.

# Full getext (please don't change)
_ = lambda x : x

# Add-on information variables
addon_info = {
# for previously unpublished addons, please follow the community guidelines at:
# https://bitbucket.org/nvdaaddonteam/todo/raw/master/guideLines.txt
# add-on Name, internal for nvda
"addon_name" : "beepKeyboard",
# Add-on summary, usually the user visible name of the addon.
# Translators: Summary for this add-on to be shown on installation and add-on information.
"addon_summary" : _("Beep keyboard"),
# Add-on description
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
"addon_description" : _("""This add-on beeps with some keyboard events."""),
# version
"addon_version" : "24.1.1",
# Author(s)
"addon_author" : u"David CM <dhf360@gmail.com>",
# URL for the add-on documentation support
"addon_url" : "https://github.com/david-acm/NVDA-beepKeyboard",
# Documentation file name
"addon_docFileName" : "readme.html",
# Minimum NVDA version supported (e.g. "2018.3.0")
"addon_minimumNVDAVersion" : "2018.3.0",
# Last NVDA version supported/tested (e.g. "2018.4.0", ideally more recent than minimum version)
"addon_lastTestedNVDAVersion" : "2024.2",
# Add-on update channel (default is stable or None)
"addon_updateChannel" : None,
from site_scons.site_tools.NVDATool.utils import _

class Config:
VERSION = "26.5.1"
MIN_NVDA = "2018.3.0"
LAST_TESTED = "2026.1"
# Essential Metadata
ID = "beepKeyboard"
# Translators: Summary/title for this add-on
SUMMARY = _("Beep keyboard")
# Translators: Long description to be shown for this add-on on add-on information from add-on store
DESCRIPTION = _("""This add-on beeps with some keyboard events.""")
# Translators: what's new content for the add-on version to be shown in the add-on store
CHANGELOG = _("""Initial migration to the new template.""")
author="David CM <dhf360@gmail.com>"
URL = "https://github.com/david-acm/NVDA-beepKeyboard"

from site_scons.site_tools.NVDATool.typings import AddonInfo, BrailleTables, SymbolDictionaries, SpeechDictionaries


addon_info = AddonInfo(
addon_name=Config.ID,
addon_summary=Config.SUMMARY,
addon_description=Config.DESCRIPTION,
addon_version=Config.VERSION,
addon_changelog=Config.CHANGELOG,
addon_author=Config.author,
addon_url=Config.URL,
addon_sourceURL=Config.URL,
addon_docFileName="readme.html",
addon_minimumNVDAVersion=Config.MIN_NVDA,
addon_lastTestedNVDAVersion=Config.LAST_TESTED,
# Add-on update channel (default is None, denoting stable releases,
# and for development releases, use "dev".)
# Do not change unless you know what you are doing!
addon_updateChannel=None,
# Add-on license such as GPL 2
"addon_license": "GPL 2",
addon_license="GPL 2",
# URL for the license document the ad-on is licensed under
"addon_licenseURL": "https://www.gnu.org/licenses/old-licenses/gpl-2.0.html",
# URL for the add-on repository where the source code can be found
"addon_sourceURL": "https://github.com/davidacm/beepKeyboard",
}
addon_licenseURL="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html",
)

from os import path
pythonSources: list[str] = ["addon/globalPlugins/beepKeyboard/*.py"]

# Define the python files that are the sources of your add-on.
# You can use glob expressions here, they will be expanded.
pythonSources = [path.join("addon", "globalPlugins", "beepKeyboard", "*.py")]

# Files that contain strings for translation. Usually your python sources
i18nSources = pythonSources + ["buildVars.py"]
i18nSources: list[str] = pythonSources + ["buildVars.py"]

# Files that will be ignored when building the nvda-addon file
# Paths are relative to the addon directory, not to the root directory of your addon sources.
excludedFiles = []
# You can either list every file (using ""/") as a path separator,
# or use glob expressions.
excludedFiles: list[str] = []

baseLanguage: str = "en"

markdownExtensions: list[str] = []

# Base language for the NVDA add-on
baseLanguage = "en"
brailleTables: BrailleTables = {}

# Markdown extensions for add-on documentation
# Most add-ons do not require additional Markdown extensions.
# If you need to add support for markup such as tables, fill out the below list.
# Extensions string must be of the form "markdown.extensions.extensionName"
# e.g. "markdown.extensions.tables" to add tables.
markdownExtensions = []
symbolDictionaries: SymbolDictionaries = {}
speechDictionaries: SpeechDictionaries = {}
4 changes: 4 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# version 26.5.1.

Added support for NVDA 2026.1.

# version 24.1.1.

* added support for NVDA 2024.2.
Expand Down
1 change: 1 addition & 0 deletions manifest-translated.ini.tpl
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
summary = "{addon_summary}"
description = """{addon_description}"""
changelog = """{addon_changelog}"""
1 change: 1 addition & 0 deletions manifest.ini.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description = """{addon_description}"""
author = "{addon_author}"
url = {addon_url}
version = {addon_version}
changelog = """{addon_changelog}"""
docFileName = {addon_docFileName}
minimumNVDAVersion = {addon_minimumNVDAVersion}
lastTestedNVDAVersion = {addon_lastTestedNVDAVersion}
Expand Down
Loading
Loading