Skip to content

Commit

Permalink
added a new symbol and made an automatic build of the add-on
Browse files Browse the repository at this point in the history
  • Loading branch information
alekssamos committed Sep 9, 2023
1 parent 59ffae9 commit 78c6560
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 4 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/build_addon.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: build addon

on:
push:
tags: ["*"]
branches: [ main , master ]

pull_request:
branches: [ main, master ]

workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

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

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
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

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

upload_release:
runs-on: ubuntu-latest
if: ${{ startsWith(github.ref, 'refs/tags/') }}
needs: ["build"]
steps:
- uses: actions/checkout@v3
- name: download releases files
uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R

- name: Release
uses: softprops/action-gh-release@v1
with:
files: packaged_addon/*.nvda-addon
fail_on_unmatched_files: true
prerelease: ${{ contains(github.ref, '-') }}
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-ast
- id: check-case-conflict
- id: check-yaml
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Дополнение Text Normalizer для NVDA

[Скачать версию 2022.05.14](https://github.com/alekssamos/textnormalizer_for_nvda/releases/latest/download/textnormalizer-2022.05.14.nvda-addon)
[Скачать версию 2023.09.09](https://github.com/alekssamos/textnormalizer_for_nvda/releases/latest/download/textnormalizer-2023.09.09.nvda-addon)

### Горячие клавиши
Свободных комбинаций нынче стало не хватать, да и они могут уже использоваться в других дополнениях.
Expand Down
2 changes: 1 addition & 1 deletion addon/globalPlugins/textnormalizer/textnormalizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def CheckWord(self, word, change_case = True):
for k, v in lettersstrng.items():
newword = self.replace(k, v, newword, True)
# убираем символ "мягкий перенос"
newword = newword.replace(chr(173), "")
newword = newword.replace(chr(173), "").replace(chr(8205), "")
# один символ не имеет смысла
if len(newword.strip()) == 1:
return newword
Expand Down
4 changes: 2 additions & 2 deletions buildVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
"addon_description": _("""Translates the letters of the alphabet mixed in normal."""),
# version
"addon_version": "2022.05.14",
"addon_version": "2023.09.09",
# Author(s)
"addon_author": u"alekssamos <[email protected]>",
# URL for the add-on documentation support
Expand All @@ -29,7 +29,7 @@
# Minimum NVDA version supported (e.g. "2018.3.0", minor version is optional)
"addon_minimumNVDAVersion": 2019.3,
# Last NVDA version supported/tested (e.g. "2018.4.0", ideally more recent than minimum version)
"addon_lastTestedNVDAVersion": 2023.1,
"addon_lastTestedNVDAVersion": 2024.1,
# 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,
}
Expand Down

0 comments on commit 78c6560

Please sign in to comment.