Skip to content
Merged
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
75 changes: 75 additions & 0 deletions .github/workflows/build_addon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: build addon

on:
push:
tags: ["*"]
# To build on main/master branch, uncomment the following line:
# branches: [ main , master ]

pull_request:
branches: [ main, master ]

workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v6

- run: echo -e "pre-commit\nscons\nmarkdown">requirements.txt

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: 3.11
cache: 'pip'

- name: Install dependencies
run: |
python -m pip install --upgrade pip wheel
pip install -r requirements.txt
sudo apt-get update -y
sudo apt-get install -y gettext

- name: Code checks
run: export SKIP=no-commit-to-branch; pre-commit run --all

- name: building addon
run: scons && scons pot

- uses: actions/upload-artifact@v6
with:
name: packaged_addon
path: |
./*.nvda-addon
./*.pot

upload_release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: ["build"]
permissions:
contents: write
steps:
- uses: actions/checkout@v6
- name: download releases files
uses: actions/download-artifact@v7
- name: Display structure of downloaded files
run: ls -R
- name: Calculate sha256
run: |
echo -e "\nSHA256: " >> changelog.md
sha256sum *.nvda-addon >> changelog.md

- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
*.nvda-addon
*.pot
body_path: changelog.md
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, '-') }}
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ addon/doc/*.css
addon/doc/en/
*_docHandler.py
*.html
*.ini
manifest.ini
*.mo
*.pot
*.pyc
*.py[co]
*.nvda-addon
.sconsign.dblite
/[0-9]*.[0-9]*.[0-9]*.json
87 changes: 87 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
# Copied from https://github.com/nvaccess/nvda
# https://pre-commit.ci/
# Configuration for Continuous Integration service
ci:
# Pyright does not seem to work in pre-commit CI
skip: [pyright]
autoupdate_schedule: monthly
autoupdate_commit_msg: "Pre-commit auto-update"
autofix_commit_msg: "Pre-commit auto-fix"
submodules: true

default_language_version:
python: python3.13

repos:
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
rev: v1.6.1
hooks:
- id: check-pre-commit-ci-config

- repo: meta
hooks:
# ensures that exclude directives apply to any file in the repository.
- id: check-useless-excludes
# ensures that the configured hooks apply to at least one file in the repository.
- id: check-hooks-apply

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
# Prevents commits to certain branches
- id: no-commit-to-branch
args: ["--branch", "main", "--branch", "master", ]
# Checks that large files have not been added. Default cut-off for "large" files is 500kb.
- id: check-added-large-files
# Checks python syntax
- id: check-ast
# Checks for filenames that will conflict on case insensitive filesystems (the majority of Windows filesystems, most of the time)
- id: check-case-conflict
# Checks for artifacts from resolving merge conflicts.
- id: check-merge-conflict
# Checks Python files for debug statements, such as python's breakpoint function, or those inserted by some IDEs.
- id: debug-statements
# Removes trailing whitespace.
- id: trailing-whitespace
types_or: [python, c, c++, batch, markdown, toml, yaml, powershell]
# Ensures all files end in 1 (and only 1) newline.
- id: end-of-file-fixer
types_or: [python, c, c++, batch, markdown, toml, yaml, powershell]
# Removes the UTF-8 BOM from files that have it.
# See https://github.com/nvaccess/nvda/blob/master/projectDocs/dev/codingStandards.md#encoding
- id: fix-byte-order-marker
types_or: [python, c, c++, batch, markdown, toml, yaml, powershell]
# Validates TOML files.
- id: check-toml
# Validates YAML files.
- id: check-yaml
# Ensures that links to lines in files under version control point to a particular commit.
- id: check-vcs-permalinks
# Avoids using reserved Windows filenames.
- id: check-illegal-windows-names
- repo: https://github.com/asottile/add-trailing-comma
rev: v3.2.0
hooks:
# Ruff preserves indent/new-line formatting of function arguments, list items, and similar iterables,
# if a trailing comma is added.
# This adds a trailing comma to args/iterable items in case it was missed.
- id: add-trailing-comma

- repo: https://github.com/astral-sh/ruff-pre-commit
# Matches Ruff version in pyproject.
rev: v0.12.7
hooks:
- id: ruff
name: lint with ruff
args: [ --fix ]
- id: ruff-format
name: format with ruff

- repo: local
hooks:

- id: pyright
name: type check with pyright
entry: uv run pyright
language: system
types: [python]
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}/../nvda/.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: ...
9 changes: 5 additions & 4 deletions buildVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@
NVDA+F12 pressed three times quickly, reports the current day, the week number, the current year and the remaining days before the end of the year.
For other instructions, press actions button in add-on store, then go to help."""),
# version
addon_version="20251005.1.0",
addon_version="20260221.0.1",
# Brief changelog for this version
# Translators: what's new content for the add-on version to be shown in the add-on store
addon_changelog=_("""added NVDA 2026.1 compatibility """),
addon_changelog=_("""Changes for 20260221.0.1
Using the latest version of the addonTemplate."""),
# Author(s)
addon_author="Hrvoje Katic <hrvojekatic@gmail.com>, Abdel <abdelkrim.bensaid@gmail.com>",
# URL for the add-on documentation support
Expand All @@ -48,7 +49,7 @@
# Do not change unless you know what you are doing!
addon_updateChannel=None,
# Add-on license such as GPL 2
addon_license="GPL-2.0",
addon_license="GPL v2",
# URL for the license document the ad-on is licensed under
addon_licenseURL="https://www.gnu.org/licenses/gpl-2.0.html",
)
Expand Down Expand Up @@ -105,4 +106,4 @@
# with keys inside recording the following attributes:
# displayName (name of the speech dictionary shown to users and translatable),
# mandatory (True when always enabled, False when not.
symbolDictionaries: SymbolDictionaries = {}
symbolDictionaries: SymbolDictionaries = {}
6 changes: 2 additions & 4 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
## Changes for 20250707.1.0
## Changes for 20260221.0.1

* Updated the `installTasks.py` module to handle the case where the add-on is updated from a version that doesn't support 5-minute intervals.;
* Handled speakOnDemand mode when using layers commands.;
* Changed version number with inclusion of the year, month and day as well as the minor and patch digits.
* Used the latest version of the addonTemplate.
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