Skip to content

Commit

Permalink
Merge pull request #4 from linkchecker/convert
Browse files Browse the repository at this point in the history
Convert to Python 3, PyQt5 and LinkChecker 10
  • Loading branch information
cjmayo authored Nov 15, 2022
2 parents ccbd823 + 2da9210 commit 3f1d0ef
Show file tree
Hide file tree
Showing 70 changed files with 2,210 additions and 1,606 deletions.
23 changes: 23 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
[flake8]
filename =
*.py
extend-exclude =
build/
linkcheck_gui/linkchecker_*.py
builtins =
_
_n
max-line-length = 88
extend-ignore =
# https://pep8.readthedocs.org/en/latest/intro.html#error-codes
# these are ignored by default:
# E121: continuation line under-indented for hanging indent
# E123: closing bracket does not match indentation of opening bracket’s line
# E126: continuation line over-indented for hanging indent
# E133: closing bracket does not match visual indentation
# E226: missing whitespace around arithmetic operator
# E241: multiple spaces after ‘,’
# E242: tab after ‘,’
# E704: multiple statements on one line (def)
# W503: line break before binary operator
# W504: line break after binary operator
97 changes: 97 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
# NB: this name is used in the status badge, where we want to see "build: passing"
name: build

on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch: # allow manual triggering from GitHub UI
schedule:
- cron: "0 5 * * 6" # 5:00 UTC every Saturday

jobs:
build:
name: Python ${{ matrix.python-version }}
runs-on: ubuntu-latest

strategy:
matrix:
python-version:
- "3.9"
- "3.10"
- "3.11"

steps:
- name: Git clone
uses: actions/checkout@v3

- name: Install Ubuntu dependencies
run: sudo apt install git qhelpgenerator-qt5 xvfb

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"

- name: Pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('tox.ini', 'setup.py') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.python-version }}-
${{ runner.os }}-pip-
- name: Install Python dependencies
run: |
python -m pip install -U pip
python -m pip install -U hatchling hatch-vcs markdown2
python -m pip install -U tox coveralls
- name: Run tests
run: |
python -m hatchling build --hooks-only
xvfb-run --auto-servernum python -m tox -e py
- name: Report to coveralls
run: coveralls
env:
COVERALLS_SERVICE_NAME: github
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

lint:
name: ${{ matrix.toxenv }}
runs-on: ubuntu-latest

strategy:
matrix:
toxenv:
- flake8
- yamllint

steps:
- name: Git clone
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4

- name: Pip cache
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}-${{ hashFiles('tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.toxenv }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -U tox
- name: Run ${{ matrix.toxenv }}
run: python -m tox -e ${{ matrix.toxenv }}
50 changes: 50 additions & 0 deletions .github/workflows/release-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Create distribution files for a new release

on:
release:
types: [released]

jobs:
run:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@v3
# Needed for setuptools_scm to extract LinkChecker version from tag
# https://github.com/actions/checkout/issues/249
with:
fetch-depth: 0

- name: Install Ubuntu packages
run: sudo apt install git qhelpgenerator-qt5

- name: Setup Python
uses: actions/setup-python@v4

- name: Install Python packages
run: >
pip3 install -U hatchling hatch-vcs markdown2 twine
- name: Set SOURCE_DATE_EPOCH
run: >
echo "SOURCE_DATE_EPOCH=$(git log -n 1 ${{ github.sha }} --format=%ct)" >> $GITHUB_ENV
- name: Create distribution files
run: >
python3 -m hatchling build
- name: Check distribution files
run: >
twine check dist/*
- name: Calculate checksums for distribution files
run: >
sha256sum dist/*
- name: Add distribution files to release
run: >
gh release upload ${{ github.ref_name }} dist/*
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ var/
.installed.cfg
*.egg

# Build-time artifacts
_release.py
doc/html/index.html
linkcheck_gui/data/

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
Expand Down
6 changes: 6 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
extends: default

rules:
document-start: disable
line-length: disable
truthy: {check-keys: false}
33 changes: 29 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# linkchecker-gui
# LinkChecker-GUI

This is the GUI client for [LinkChecker](https://wummel.github.io/linkchecker/).
It is not maintained anymore, so feel free to fork this repository and
change the code to your liking.
[![GPL-3](https://img.shields.io/badge/license-GPL3-d49a6a.svg)](https://opensource.org/licenses/GPL-3.0)

This is the GUI client for [LinkChecker](https://linkchecker.github.io/linkchecker/).

## Installation

Python 3.9 or later is needed. Using pip to install LinkChecker-GUI:

`pip3 install linkchecker-gui`

The version in the pip repository may be old, to install the latest code first
install qtchooser and qhelpgenerator e.g.

`apt install qhelpgenerator-qt5`

Then:

`pip3 install git+https://github.com/linkchecker/linkchecker-gui.git`

## Usage

`$ linkchecker-gui`

A desktop entry is created for compatible environments.

## Development

Development is managed on [GitHub](https://github.com/linkchecker/linkchecker-gui).
5 changes: 5 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
10.x

Changes:
- Convert to Python 3, PyQt5 and LinkChecker 10
- Update dialog and UI translation support disabled
8 changes: 2 additions & 6 deletions doc/html/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
HELPFILES := lccollection.qhc
HTMLFILES := index.html
OXYGEN := ${HOME}/src/oxygen-gitsvn
ICOICONS := logo16x16.png logo32x32.png
ICNSICONS := logo16x16.png logo32x32.png logo48x48.png logo128x128.png
ICOICONS := logo/16x16/linkchecker-gui.png logo/32x32/linkchecker-gui.png
ICNSICONS := logo/16x16/linkchecker-gui.png logo/32x32/linkchecker-gui.png logo/48x48/linkchecker-gui.png logo/128x128/linkchecker-gui.png

all: $(HELPFILES) $(HTMLFILES)

Expand All @@ -18,9 +17,6 @@ test:
%.qhc: %.qhcp lcdoc.qhp $(HTMLFILES)
-qcollectiongenerator $< -o $@

logo%.png: $(OXYGEN)/%/categories/applications-development-web.png
cp $< $@

favicon.ico: $(ICOICONS)
png2ico favicon.ico $(ICOICONS)

Expand Down
2 changes: 1 addition & 1 deletion doc/html/html.footer
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<hr/>
<div class="footer">
&copy; Copyright 2012-2016, Bastian Kleineidam.
&copy; Copyright 2012-2016 Bastian Kleineidam, 2017-2022 LinkChecker Authors.
</div>
</body>
</html>
2 changes: 1 addition & 1 deletion doc/html/html.header
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ img { border: 0; }
<div style="background-color: white; text-align: left; padding: 10px 10px 15px 15px">
<table border="0"><tr>
<td><img
src="logo64x64.png" border="0" alt="LinkChecker"/></td>
src="logo/64x64/linkchecker-gui.png" border="0" alt="LinkChecker GUI"/></td>
<td><h1>LinkChecker</h1></td>
</tr></table>
</div>
Expand Down
Loading

0 comments on commit 3f1d0ef

Please sign in to comment.