Skip to content

Commit

Permalink
Migrate to new addon template
Browse files Browse the repository at this point in the history
  • Loading branch information
tuukkao committed Mar 29, 2023
1 parent 43334e4 commit b2e7654
Show file tree
Hide file tree
Showing 6 changed files with 248 additions and 88 deletions.
4 changes: 0 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# Set default behaviour, in case users don't have core.autocrlf set.
* text=auto

# Leave pipfiles intact.
Pipfile text=true
Pipfile.lock text=true

# Try to ensure that po files in the repo does not include
# source code line numbers.
# Every person expected to commit po files should change their personal config file as described here:
Expand Down
3 changes: 2 additions & 1 deletion .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
*.py[co]
*.nvda-addon
.sconsign.dblite
/[0-9]*.[0-9]*.[0-9]*.json
73 changes: 51 additions & 22 deletions buildVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,76 @@
# Build customizations
# Change this file instead of sconstruct or manifest files, whenever possible.

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

# Since some strings in `addon_info` are translatable,
# we need to include them in the .po files.
# Gettext recognizes only strings given as parameters to the `_` function.
# To avoid initializing translations in this module we simply roll our own "fake" `_` function
# which returns whatever is given to it as an argument.
def _(arg):
return arg


# 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" : "reviewCursorCopier",
# add-on Name/identifier, internal for NVDA
"addon_name": "reviewCursorCopier",
# 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" : _("Review Cursor Copier"),
# Translators: Summary for this add-on
# to be shown on installation and add-on information found in Add-ons Manager.
"addon_summary": _("Review Cursor Copier"),
# Add-on description
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
"addon_description" : _("""Provides various commands for copying the text under the review cursor to the clipboard. Please consult the documentation for more information."""),
"addon_description": _("""Provides various commands for copying the text under the review cursor to the clipboard. Please consult the documentation for more information."""),
# version
"addon_version" : "1.5",
"addon_version": "1.5",
# Author(s)
"addon_author" : u"Tuukka Ojala <tuukka.ojala@iki.fi>",
"addon_author": "Tuukka Ojala <tuukka.ojala@iki.fi>",
# URL for the add-on documentation support
"addon_url" : None,
"addon_url": "https://github.com/tuukkao/nvda-reviewCursorCopier",
# URL for the add-on repository where the source code can be found
"addon_sourceURL": "https://github.com/tuukkao/nvda-reviewCursorCopier",
# Documentation file name
"addon_docFileName" : "readme.html",
"addon_docFileName": "readme.html",
# Minimum NVDA version supported (e.g. "2018.3.0", minor version is optional)
"addon_minimumNVDAVersion" : "2017.2",
"addon_minimumNVDAVersion": "2017.2",
# Last NVDA version supported/tested (e.g. "2018.4.0", ideally more recent than minimum version)
"addon_lastTestedNVDAVersion" : "2023.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,
"addon_lastTestedNVDAVersion": "2023.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,
# Add-on license such as GPL 2
"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",
}


import os.path

# Define the python files that are the sources of your add-on.
# You can use glob expressions here, they will be expanded.
pythonSources = []
# You can either list every file (using ""/") as a path separator,
# or use glob expressions.
# For example to include all files with a ".py" extension from the "globalPlugins" dir of your add-on
# the list can be written as follows:
# pythonSources = ["addon/globalPlugins/*.py"]
# For more information on SCons Glob expressions please take a look at:
# https://scons.org/doc/production/HTML/scons-user/apd.html
pythonSources = ["addon/globalPlugins/reviewCursorCopier/*.py"]

# Files that contain strings for translation. Usually your python sources
i18nSources = 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 = []

# Base language for the NVDA add-on
# If your add-on is written in a language other than english, modify this variable.
# For example, set baseLanguage to "es" if your add-on is primarily written in spanish.
baseLanguage = "en"

# 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 = []
Loading

0 comments on commit b2e7654

Please sign in to comment.