Skip to content

Commit

Permalink
Fix build HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
nvdaes committed Sep 7, 2020
1 parent 0019cd8 commit e195935
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 143 deletions.
File renamed without changes.
19 changes: 0 additions & 19 deletions .github/workflows/check-for-extended-ascii-and-utf-bom.yml

This file was deleted.

98 changes: 0 additions & 98 deletions .github/workflows/plugin.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/testWithNVDA.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,24 +27,6 @@ jobs:
with:
name: nvda-addon
path: "*.nvda-addon"
- name: Create Release
if: contains(github.ref, '/tags/')
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
prerelease: ${{ endsWith(github.ref, '-dev') }}
- name: Upload binaries to release
if: contains(github.ref, '/tags/')
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '*.nvda-addon'
tag: ${{ github.ref }}
overwrite: true
file_glob: true

nvda:

Expand Down
40 changes: 40 additions & 0 deletions .github/workflows/upload-on-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Upload on new tags

on:
push:
tags:
'*'

jobs:
buildAndUpload:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install scons
pip install Markdown
- name: Build add-on
run: scons
- name: Create Release
uses: actions/create-release@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
prerelease: ${{ endsWith(github.ref, '-dev') }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: '*.nvda-addon'
tag: ${{ github.ref }}
overwrite: true
file_glob: true
14 changes: 7 additions & 7 deletions addon/globalPlugins/readFeeds/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,11 +666,11 @@ def getNumberOfArticles(self):

def buildHtml(self):
raw = "<!DOCTYPE html><html lang=\"" + self.getFeedLanguage()
+ "\"><head><title>" + self.getFeedName()
+ "</title><meta charset=\"utf-8\" />"
+ "<meta http-equiv='X-UA-Compatible' content='IE=edge'>"
+ "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"></head>"
+ "<body><h1><a href=\"" + self.getFeedUrl() + "\">" + self.getFeedName() +"</a></h1><p><label>"
raw += "\"><head><title>" + self.getFeedName()
raw += "</title><meta charset=\"utf-8\" />"
raw += "<meta http-equiv='X-UA-Compatible' content='IE=edge'>"
raw += "<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"></head>"
raw += "<body><h1><a href=\"" + self.getFeedUrl() + "\">" + self.getFeedName() +"</a></h1><p><label>"
# Translators: Label of a checkbox to choose if date should be presented for each feed.
label = _("Show date")
raw += label
Expand All @@ -681,7 +681,7 @@ def buildHtml(self):
raw += "<input id=\"copy\" accesskey=\"8\" type=\"checkbox\" onclick=\"setCopyPresentation()\"></label></p>"
for index in range(self.getNumberOfArticles()):
raw += "<div class=\"heading\"><h2><a href=\""
+ self.getArticleLink(index) + "\">" + self.getArticleTitle(index) + "</a></h2>"
raw += self.getArticleLink(index) + "\">" + self.getArticleTitle(index) + "</a></h2>"
# Translators: Label for a button to copy to clipboard.
label = _("Copy") + " " + str(index+1)
raw += "<button aria-hidden=\"true\" aria-pressed=\"false\">" + label + "</button></div>"
Expand All @@ -692,7 +692,7 @@ def buildHtml(self):
enclosure = self.getArticleEnclosure(index)
if enclosure:
raw += "<div><a href=\"" + enclosure.get("url") + "\">" + enclosure.get("type")
+ enclosure.get("length") / 1024 + "kB</div>"
raw += enclosure.get("length") / 1024 + "kB</div>"
raw += "<script src=\"feed.js\"></script></body></html>"
with open(os.path.join(HTML_PATH, "feed.html"), "w", encoding="utf-8") as f:
f.write(raw)
Expand Down
2 changes: 1 addition & 1 deletion 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" : _("""Add-on for using NVDA as a feed reader."""),
# version
"addon_version" : "10.3-dev",
"addon_version" : "10.4-dev",
# Author(s)
"addon_author" : u"Noelia Ruiz Martínez <[email protected]>, Mesar Hameed <[email protected]>",
# URL for the add-on documentation support
Expand Down

0 comments on commit e195935

Please sign in to comment.