61 Commits

Author SHA1 Message Date
50024f7c62 Bump the python-deps group with 3 updates
Bumps the python-deps group with 3 updates: [lxml](https://github.com/lxml/lxml), [pyyaml](https://github.com/yaml/pyyaml) and [pyinstaller](https://github.com/pyinstaller/pyinstaller).


Updates `lxml` from 5.2.2 to 5.3.0
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-5.2.2...lxml-5.3.0)

Updates `pyyaml` from 6.0.1 to 6.0.2
- [Release notes](https://github.com/yaml/pyyaml/releases)
- [Changelog](https://github.com/yaml/pyyaml/blob/main/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/6.0.1...6.0.2)

Updates `pyinstaller` from 6.9.0 to 6.10.0
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v6.9.0...v6.10.0)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-deps
- dependency-name: pyyaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-deps
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-06 13:14:29 +00:00
fe49baf040 Bump pyinstaller from 6.8.0 to 6.9.0 in the python-deps group (#48)
Bumps the python-deps group with 1 update: [pyinstaller](https://github.com/pyinstaller/pyinstaller).


Updates `pyinstaller` from 6.8.0 to 6.9.0
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v6.8.0...v6.9.0)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-08 10:21:32 +01:00
4434603b33 Bump pyinstaller from 6.7.0 to 6.8.0 in the python-deps group (#46)
Bumps the python-deps group with 1 update: [pyinstaller](https://github.com/pyinstaller/pyinstaller).


Updates `pyinstaller` from 6.7.0 to 6.8.0
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v6.7.0...v6.8.0)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-10 19:12:42 +01:00
67c1342ce1 fix: Allow Container CI workflow to continue on error (#47)
Temporary fix for Docker Hub failure.
2024-06-10 19:10:30 +01:00
f8b43a8b79 Bump pyinstaller from 6.6.0 to 6.7.0 in the python-deps group (#45)
Bumps the python-deps group with 1 update: [pyinstaller](https://github.com/pyinstaller/pyinstaller).


Updates `pyinstaller` from 6.6.0 to 6.7.0
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v6.6.0...v6.7.0)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-27 18:18:15 +01:00
a63da96bd1 Merge pull request #44 from tanrax/dependabot/pip/python-deps-ece60ddaef
Bump lxml from 5.2.1 to 5.2.2 in the python-deps group
2024-05-20 15:25:43 +02:00
9532ff5760 Bump lxml from 5.2.1 to 5.2.2 in the python-deps group
Bumps the python-deps group with 1 update: [lxml](https://github.com/lxml/lxml).


Updates `lxml` from 5.2.1 to 5.2.2
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-5.2.1...lxml-5.2.2)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-20 04:50:35 +00:00
21610500db Merge pull request #34 from shymega/fix-container-builds-on-forks
Fix container builds on forks by using context vars
2024-05-04 22:16:56 +02:00
1d8d444d2c Merge pull request #42 from shymega/feature/filter-items
Add functionality for filtering feeds.
2024-05-04 22:15:26 +02:00
2555616e65 Bump pyinstaller from 6.5.0 to 6.6.0 in the python-deps group (#43)
Bumps the python-deps group with 1 update: [pyinstaller](https://github.com/pyinstaller/pyinstaller).


Updates `pyinstaller` from 6.5.0 to 6.6.0
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v6.5.0...v6.6.0)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-15 15:31:00 +01:00
8cd30e8b9e config.yml: Template for filter_strings added
Relates to #32, combined #32 and #31 into one PR.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2024-04-10 22:42:45 +01:00
5e931082e4 rssingle.py: Filter items with filter_strings from config.yml
Relates to #31, combined #31 and #32 into one PR.

NOTE: Edited to remove typo fix, this will be committed later on.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2024-04-10 22:42:30 +01:00
62d93c43b9 Bump the python-deps group with 2 updates (#41)
Bumps the python-deps group with 2 updates: [listparser](https://github.com/kurtmckee/listparser) and [lxml](https://github.com/lxml/lxml).


Updates `listparser` from 0.19.0 to 0.20
- [Release notes](https://github.com/kurtmckee/listparser/releases)
- [Changelog](https://github.com/kurtmckee/listparser/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/kurtmckee/listparser/compare/v0.19...v0.20)

Updates `lxml` from 5.1.0 to 5.2.1
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-5.1.0...lxml-5.2.1)

---
updated-dependencies:
- dependency-name: listparser
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-deps
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-10 22:41:02 +01:00
e17c396fb2 fix(typo): Fix typo in script 2024-04-10 22:40:37 +01:00
768ca68241 Bump the python-deps group with 1 update (#39)
Bumps the python-deps group with 1 update: [pyinstaller](https://github.com/pyinstaller/pyinstaller).


Updates `pyinstaller` from 6.4.0 to 6.5.0
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v6.4.0...v6.5.0)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 19:09:12 +00:00
34b4ae3e2b Bump the python-deps group with 1 update (#38)
Bumps the python-deps group with 1 update: [python-dateutil](https://github.com/dateutil/dateutil).


Updates `python-dateutil` from 2.8.2 to 2.9.0.post0
- [Release notes](https://github.com/dateutil/dateutil/releases)
- [Changelog](https://github.com/dateutil/dateutil/blob/master/NEWS)
- [Commits](https://github.com/dateutil/dateutil/compare/2.8.2...2.9.0.post0)

---
updated-dependencies:
- dependency-name: python-dateutil
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-04 16:42:24 +00:00
4ab9bc864f Bump the python-deps group with 1 update (#37)
Bumps the python-deps group with 1 update: [pyinstaller](https://github.com/pyinstaller/pyinstaller).


Updates `pyinstaller` from 6.3.0 to 6.4.0
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v6.3.0...v6.4.0)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-12 19:43:52 +00:00
8e5e7646ce Bump the python-deps group with 1 update (#36)
Bumps the python-deps group with 1 update: [lxml](https://github.com/lxml/lxml).


Updates `lxml` from 5.0.1 to 5.1.0
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-5.0.1...lxml-5.1.0)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-15 19:34:40 +00:00
ab3c1b4610 Bump the python-deps group with 1 update (#35)
Bumps the python-deps group with 1 update: [lxml](https://github.com/lxml/lxml).


Updates `lxml` from 5.0.0 to 5.0.1
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-5.0.0...lxml-5.0.1)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-08 17:42:16 +00:00
84b108e154 Fix container builds on forks by using context vars
Also add conditional to only build containers on the upstream repo.
2024-01-03 20:24:55 +00:00
e9980668c4 Bump the python-deps group with 1 update (#33)
Bumps the python-deps group with 1 update: [lxml](https://github.com/lxml/lxml).


Updates `lxml` from 4.9.4 to 5.0.0
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.9.4...lxml-5.0.0)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: python-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-01 19:08:10 +00:00
c1aa3e59d1 Merge pull request #3 from shymega/shymega/prs/ci
Initial version of CI for RSSingle
2023-12-29 11:54:45 +01:00
6be4933a9a Merge pull request #30 from tanrax/dependabot/pip/python-deps-0d001ee384
Bump the python-deps group with 5 updates
2023-12-29 11:54:10 +01:00
cfd6bddafc Merge pull request #5 from shymega/shymega/prs/docker
Add Docker support for RSSingle, and a workflow for builds
2023-12-29 11:53:56 +01:00
4b5c774324 Bump the python-deps group with 5 updates
Bumps the python-deps group with 5 updates:

| Package | From | To |
| --- | --- | --- |
| [feedgen](https://github.com/lkiesow/python-feedgen) | `0.9.0` | `1.0.0` |
| [feedparser](https://github.com/kurtmckee/feedparser) | `6.0.10` | `6.0.11` |
| [lxml](https://github.com/lxml/lxml) | `4.9.3` | `4.9.4` |
| [pyyaml](https://github.com/yaml/pyyaml) | `6.0` | `6.0.1` |
| [pyinstaller](https://github.com/pyinstaller/pyinstaller) | `6.0.0` | `6.3.0` |


Updates `feedgen` from 0.9.0 to 1.0.0
- [Release notes](https://github.com/lkiesow/python-feedgen/releases)
- [Commits](https://github.com/lkiesow/python-feedgen/compare/v0.9.0...v1.0.0)

Updates `feedparser` from 6.0.10 to 6.0.11
- [Changelog](https://github.com/kurtmckee/feedparser/blob/develop/CHANGELOG.rst)
- [Commits](https://github.com/kurtmckee/feedparser/compare/6.0.10...6.0.11)

Updates `lxml` from 4.9.3 to 4.9.4
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.9.3...lxml-4.9.4)

Updates `pyyaml` from 6.0 to 6.0.1
- [Changelog](https://github.com/yaml/pyyaml/blob/main/CHANGES)
- [Commits](https://github.com/yaml/pyyaml/compare/6.0...6.0.1)

Updates `pyinstaller` from 6.0.0 to 6.3.0
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v6.0.0...v6.3.0)

---
updated-dependencies:
- dependency-name: feedgen
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: python-deps
- dependency-name: feedparser
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-deps
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-deps
- dependency-name: pyyaml
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: python-deps
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: python-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-29 10:52:44 +00:00
e03fff3a42 Merge pull request #29 from shymega/shymega/prs/group-dependabot-updates
feat(CI/dependabot): Group Dependabot PRs
2023-12-29 11:51:02 +01:00
b7cfae13e1 feat(CI/dependabot): Group Dependabot PRs
To reduce maintainer workload, I've made this PR for Dependabot to
automatically group related PRs together into one PR.

We could also enable a workflow to automatically merge Dependabot PRs,
on the condition that the code continues to compile and produce a
unified RSS XML feed.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2023-12-25 20:25:35 +00:00
57ed8aef3a Start testing release packager 2023-12-25 20:25:23 +00:00
b526fc582f Initial version of CI for RSSingle
Hi @tanrax!

As part of our new collaboration, I've made an initial version for
automated CI for RSSingle.

It needs macOS to work first, so I've commented out a draft version of
the `pyinstaller` aspect, so I'll make this PR a draft for now when we
can discuss further, preferably in a GH issue for transparency (unless
you want it private?), but this workflow tests on PRs and pushes to any
branch, with flake8 across multiple Python versions. The pyinstaller
aspect only runs if the flake8 check passes.

What do you think?

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2023-12-25 20:25:23 +00:00
f7a2c2417e Merge pull request #16 from tanrax/add-limit-entries
Add limit entries
2023-10-26 14:53:37 +02:00
0dfb71de00 Merge branch 'master' into add-limit-entries 2023-10-26 14:53:27 +02:00
124a57c033 Merge pull request #18 from tanrax/fix-format-error
Fix format error
2023-10-26 14:52:35 +02:00
16e80795cd Merge pull request #19 from tanrax/dependabot/pip/lxml-4.9.3
Bump lxml from 4.9.2 to 4.9.3
2023-10-26 14:52:05 +02:00
4cd87527bd Merge pull request #23 from tanrax/dependabot/pip/pyinstaller-6.0.0
Bump pyinstaller from 5.13.0 to 6.0.0
2023-10-26 14:51:30 +02:00
0a075bbdc9 Bump pyinstaller from 5.13.0 to 6.0.0
Bumps [pyinstaller](https://github.com/pyinstaller/pyinstaller) from 5.13.0 to 6.0.0.
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v5.13.0...v6.0.0)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-25 04:44:00 +00:00
62f24bb204 Bump lxml from 4.9.2 to 4.9.3
Bumps [lxml](https://github.com/lxml/lxml) from 4.9.2 to 4.9.3.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.9.2...lxml-4.9.3)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-10 04:25:27 +00:00
e8c77f3398 Add general exception
Co-authored-by: Dom Rodriguez <shymega@shymega.org.uk>
2023-07-06 18:17:37 +01:00
dd16696103 Add var config max entries
Use `max_entries` as YAML key.

Co-authored-by: Dom Rodriguez <shymega@shymega.org.uk>
2023-07-06 18:11:15 +01:00
846de90642 Merge pull request #7 from shymega/shymega/prs/remove-unused-var
Remove unused variables, and duplicate assignments
2023-07-06 11:36:48 +02:00
e101803091 Merge pull request #12 from tanrax/dependabot/pip/pyinstaller-5.13.0
Bump pyinstaller from 5.11.0 to 5.13.0
2023-07-06 11:35:33 +02:00
c3708e8899 Bump pyinstaller from 5.11.0 to 5.13.0
Bumps [pyinstaller](https://github.com/pyinstaller/pyinstaller) from 5.11.0 to 5.13.0.
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v5.11.0...v5.13.0)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-06-26 05:12:43 +00:00
cf60155018 Merge pull request #9 from tanrax/dependabot/pip/pyinstaller-5.11.0
Bump pyinstaller from 5.1 to 5.11.0
2023-05-16 16:38:43 +02:00
82b3ff5cfd Merge pull request #10 from tanrax/dependabot/pip/lxml-4.9.2
Bump lxml from 4.9.0 to 4.9.2
2023-05-16 16:38:31 +02:00
f64d68fb8f Bump lxml from 4.9.0 to 4.9.2
Bumps [lxml](https://github.com/lxml/lxml) from 4.9.0 to 4.9.2.
- [Release notes](https://github.com/lxml/lxml/releases)
- [Changelog](https://github.com/lxml/lxml/blob/master/CHANGES.txt)
- [Commits](https://github.com/lxml/lxml/compare/lxml-4.9.0...lxml-4.9.2)

---
updated-dependencies:
- dependency-name: lxml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-16 14:37:28 +00:00
d2813ee689 Bump pyinstaller from 5.1 to 5.11.0
Bumps [pyinstaller](https://github.com/pyinstaller/pyinstaller) from 5.1 to 5.11.0.
- [Release notes](https://github.com/pyinstaller/pyinstaller/releases)
- [Changelog](https://github.com/pyinstaller/pyinstaller/blob/develop/doc/CHANGES.rst)
- [Commits](https://github.com/pyinstaller/pyinstaller/compare/v5.1...v5.11.0)

---
updated-dependencies:
- dependency-name: pyinstaller
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-16 14:37:24 +00:00
9014c78d29 Merge pull request #4 from shymega/shymega/prs/dependabot
Add Dependabot dependency GH support
2023-05-16 16:36:56 +02:00
758733d025 Merge pull request #6 from shymega/shymega/prs/exceptions
Improve Exception handling, and catch explicit Exceptions
2023-05-16 16:36:22 +02:00
bbe24f6364 Merge pull request #8 from shymega/shymega/prs/fix-get_url_from_feed-func-sig
Explicitly define the return type of get_url_from_feed(config)
2023-05-16 16:33:39 +02:00
52ccc2e676 Explicitly define the return type of get_url_from_feed(config)
This commit explicitly defines the return type of the
get_url_from_feed(config) function.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2022-09-13 20:19:03 +01:00
df52406dfe Improve Exception handling, and catch explicit Exceptions
This commit improves Exception handling, and made some changes to
try/catch blocks, where the `KeyError` is now explicitly caught. If in
the future, we have reports of other Exceptions being caught, we can
include those in the handling.

For now, I've used BaseException for two try/catch blocks. I need to
check what exceptions can happen there.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2022-09-13 19:43:58 +01:00
3347b233de Remove unused variables, and duplicate assignments
This commit removes an unused variable, and the duplicate assignments in
the main entrypoint.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2022-09-13 19:30:36 +01:00
1f36dea889 Adjust branch, assumed the branch - use master
I didn't realise you were using `master` as the branch name, so this
wouldn't run if the PR was accepted.

Now fixed.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2022-09-12 23:45:26 +01:00
daf79338b5 Add Docker support for RSSingle, and a workflow for builds
This commit adds a Dockerfile, .dockerignore, and a GH Action for
pushing container images to - and this is by default, other registries
can be used - Docker Hub (you need to generate a token and install it in
the repo), and GitHub Registry, which doesn't require a manual token.

The workflow won't build until #3 is merged, as it relies on successful
builds from that workflow before a container image is pushed. Once we use unit
tests, this will ensure container images aren't broken when pushed to a
remote registry.

I have marked this PR as draft for that reason.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2022-09-12 22:09:57 +01:00
ff30f5807b Add Dependabot dependency GH support
This commit adds support for Dependabot, which will alert the maintainer
when things are out of date, including GH Actions and Python packages.

Signed-off-by: Dom Rodriguez <shymega@shymega.org.uk>
2022-09-12 21:57:38 +01:00
1460f92f02 Update README.md 2022-06-28 05:57:07 -07:00
8f499d4c22 Delete rss.service 2022-06-25 13:04:41 +02:00
1a94b51f1a Delete rss.timer 2022-06-25 13:04:34 +02:00
7a8721f6a1 Delete crontab 2022-06-25 13:04:21 +02:00
d622931090 Create FUNDING.yml 2022-06-25 13:03:35 +02:00
6eeda374da Update README.md 2022-06-25 13:02:11 +02:00
cafef51765 Add files via upload 2022-06-25 13:00:47 +02:00
14 changed files with 205 additions and 81 deletions

5
.dockerignore Normal file
View File

@ -0,0 +1,5 @@
/LICENSE
/README.md
/rssingle.png
/Dockerfile
/config.yml

2
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,2 @@
github: tanrax
ko_fi: androsfenollosa

19
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,19 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
groups:
gh-actions-deps:
patterns:
- "*"
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "weekly"
groups:
python-deps:
patterns:
- "*"

59
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,59 @@
name: CI workflow for RSSingle
on: [push, pull_request]
jobs:
build-and-check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -r requirements.txt
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# to be completed once macOS builds fixed
create-and-publish-release:
needs: build-and-check
if: startsWith(github.ref, 'refs/tags/') && success()
strategy:
matrix:
# `--windowed` is for macOS, and `--onefile` is for other OSes.
pyinstaller-type: ['--windowed', '--onefile']
runner: ["macos-latest", "windows-latest", "ubuntu-latest"]
runs-on: ${{ matrix.runner }}
name: Builder for Python all-in-one executables, published on a release.
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pyinstaller
pip install -r requirements.txt
- name: Build RSSingle (Windows, Linux)
if: ${{ matrix.runner != 'macos-latest' }}
run: pyinstaller --onefile ./rssingle.py
- name: Build RSSingle (macOS)
if: ${{ matrix.runner == 'macos-latest' }}
run: pyinstaller --windowed ./rssingle.py
- name: List artifacts for finishing this action
run: find ./dist/

45
.github/workflows/container.yml vendored Normal file
View File

@ -0,0 +1,45 @@
name: Container image builder for RSS single
on:
workflow_run:
workflows: ["CI workflow for RSSingle"]
types: [completed]
branches: [master]
jobs:
build-and-push-container-image:
name: Build and push container image to Docker Hub and GHCR.io
if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository == 'tanrax/RSSingle' }}
runs-on: ubuntu-latest
continue-on-error: true
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Build container image
id: build
uses: redhat-actions/buildah-build@v2
with:
image: ${{ github.repository }}
tags: latest
containerfiles: Dockerfile
- name: Push container image to Docker Hub
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build.outputs.image }}
tags: ${{ steps.build.outputs.tags }}
registry: docker.io
username: ${{ github.repository_owner }}
password: ${{ secrets.DOCKER_TOKEN }}
- name: Push container image to GHCR.io
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.build.outputs.image }}
tags: ${{ steps.build.outputs.tags }}
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM docker.io/python:3.8-buster AS base
FROM base AS build
WORKDIR /work
COPY . .
RUN pip3 install pyinstaller
RUN pip3 install -r /work/requirements.txt
RUN pyinstaller --onefile /work/rssingle.py
FROM docker.io/python:3.8-buster AS app
COPY --from=build /work/dist/rssingle /rssingle
ENTRYPOINT ["/rssingle"]

View File

@ -2,6 +2,10 @@
Generates an RSS file from the list of other feeds (RSS/Atom/JSON). Very handy when you want to centralise the list of your feeds in one place and all your devices feed from the same place. Generates an RSS file from the list of other feeds (RSS/Atom/JSON). Very handy when you want to centralise the list of your feeds in one place and all your devices feed from the same place.
<p align="center">
<img src="rssingle.png" width="200" alt="RRSingle">
</p>
## Run ## Run
1. Download the binary. 1. Download the binary.
@ -12,9 +16,11 @@ Generates an RSS file from the list of other feeds (RSS/Atom/JSON). Very handy w
wget https://github.com/tanrax/RSSingle/releases/download/v1.0.0/rssingle wget https://github.com/tanrax/RSSingle/releases/download/v1.0.0/rssingle
``` ```
**MacOS and Windows** **Windows**
Coming soon ``` shell
wget https://github.com/tanrax/RSSingle/releases/download/v1.0.0/rssingle.exe
```
2. Gives execution permissions. 2. Gives execution permissions.
@ -29,6 +35,7 @@ title: My RSS Feed
description: My customised RSS feed with technology news description: My customised RSS feed with technology news
url: https://www.example.com url: https://www.example.com
output: rss.xml output: rss.xml
max_entries: 5 # Delete this line to get all
feeds: feeds:
- https://programadorwebvalencia.com/feed/ - https://programadorwebvalencia.com/feed/
- https://republicaweb.es/feed/ - https://republicaweb.es/feed/
@ -50,6 +57,12 @@ A file called `rss.xml` will be created.
## Development ## Development
Activate Debug messages by console.
```
export SR_LOG_LEVEl=DEBUG
```
### Compiling ### Compiling
```shell ```shell

View File

@ -2,6 +2,10 @@ title: My RSS Feed
description: My customised RSS feed with technology news description: My customised RSS feed with technology news
url: https://www.example.com url: https://www.example.com
output: rss.xml output: rss.xml
max_entries: 2 # Delete this line to get all
feeds: feeds:
- https://programadorwebvalencia.com/feed/ - https://programadorwebvalencia.com/feed/
- https://republicaweb.es/feed/ - https://republicaweb.es/feed/
filter_strings:
- unwanted
- exclude_this

View File

@ -1,7 +1,7 @@
feedgen==0.9.0 feedgen==1.0.0
feedparser==6.0.10 feedparser==6.0.11
listparser==0.19.0 listparser==0.20
lxml==4.9.0 lxml==5.3.0
python-dateutil==2.8.2 python-dateutil==2.9.0.post0
pyyaml==6.0 pyyaml==6.0.2
pyinstaller==5.1 pyinstaller==6.10.0

View File

@ -1,5 +0,0 @@
# For stdout to file
0 * * * * cd /opt/rss && . ./.env && /opt/rss/singlerss.py > /var/www/html/feeds.xml
# For file direct.
0 * * * * cd /opt/rss && . ./.env && /opt/rss/singlerss.py

View File

@ -1,26 +0,0 @@
[Unit]
Description=Generate combined RSS feed.
[Service]
Type=oneshot
# Make sure to set user and group
# to your setup.
User=nginx
Group=nobody
# Make sure to customise these to your
# system!
WorkingDirectory=/var/www/html/feed.xml
# And this.
EnvironmentFile=/opt/singlerss/.env
# And this.
ExecStart=/opt/rss/singlerss.py
# These don't work on older systemd versions.
# In that case, you should configure singlerss
# to output to file, as documented in the README,
# and comment these directives out.
StandardInput=null
StandardError=journal
StandardOutput=file:$SINGLERSS_FEED_OUT_PATH

View File

@ -1,8 +0,0 @@
[Unit]
Description=Hourly refresh of singlerss
[Timer]
OnCalendar=hourly
[Install]
WantedBy=timers.target

BIN
rssingle.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -15,14 +15,13 @@ import json
import yaml import yaml
# Varaibles # Variables
log = None log = None
CONFIG_PATH = "config.yml" CONFIG_PATH = "config.yml"
LOG_LEVEL = environ.get("SR_LOG_LEVEl", "ERROR") LOG_LEVEL = environ.get("SR_LOG_LEVEl", "ERROR")
fg = None fg = None
FEED_OUT_PATH = None FEED_OUT_PATH = None
FEED_LIST_PATH = None
FEEDS = [] FEEDS = []
CFG = None CFG = None
@ -45,7 +44,7 @@ def setup_logging() -> None:
return None return None
def get_url_from_feed(config): def get_url_from_feed(config) -> str:
""" """
This function returns the URL from a feed. This function returns the URL from a feed.
""" """
@ -70,9 +69,8 @@ def init_feed() -> None:
fg.link(href=get_url_from_feed(CONFIG), rel="self") fg.link(href=get_url_from_feed(CONFIG), rel="self")
fg.subtitle(CONFIG["description"]) fg.subtitle(CONFIG["description"])
fg.language("en") fg.language("en")
except: except BaseException: # find out what exceptions FeedGenerator can cause as well as KeyError.
log.error("Error initialising the feed!") logging.exception("Error initialising the feed!")
sys.exit(1)
log.debug("Feed initialised!") log.debug("Feed initialised!")
@ -85,10 +83,20 @@ def parse_rss_feed(url) -> feedparser.FeedParserDict:
try: try:
# Hopefully this should parse.. # Hopefully this should parse..
return feedparser.parse(url) return feedparser.parse(url)
except Exception: except BaseException: # find out what exceptions .parse() call can cause.
log.warning("Failed to parse RSS feed.") log.warning("Failed to parse RSS feed.")
# Now, we could handle gracefully. # Now, we could handle gracefully.
def filter_feed_entries(entry) -> bool:
"""
This function filters feed entries based on strings defined in config.yml.
"""
filter_strings = CONFIG.get("filter_strings", [])
for filter_str in filter_strings:
if filter_str.lower() in entry.get("title", "").lower() or filter_str.lower() in entry.get("summary", "").lower():
log.debug(f"Entry filtered out: {entry['title']}")
return False
return True
def main(): def main():
log.debug("Loading feed list into memory..") log.debug("Loading feed list into memory..")
@ -99,30 +107,34 @@ def main():
rss = parse_rss_feed(feed) rss = parse_rss_feed(feed)
entries = rss.get("entries") entries = rss.get("entries")
log.debug("Iterating over [input] feed entries..") log.debug("Iterating over [input] feed entries..")
for entry in entries: for entry in entries[:CONFIG["max_entries"]] if "max_entries" in CONFIG else entries:
log.debug("New feed entry created.") log.debug("New feed entry created.")
if not filter_feed_entries(entry):
continue # Skip this entry
fe = fg.add_entry() fe = fg.add_entry()
log.debug("Working on new feed entry..") log.debug("Working on new feed entry..")
try: try:
fe.id(entry["id"]) fe.id(entry["id"])
except: except KeyError:
# Deifnitely weird... # Definitely weird...
log.warning("Empty id attribute, defaulting..") log.warning("Empty id attribute, defaulting..")
fe.id("about:blank") fe.id("about:blank")
try: try:
fe.title(entry["title"]) fe.title(entry["title"])
except: except KeyError:
# OK, this is a definite malformed feed! # OK, this is a definite malformed feed!
log.warning("Empty title attribute, defaulting..") log.warning("Empty title attribute, defaulting..")
fe.title("Unspecified") fe.title("Unspecified")
try: try:
fe.link(href=entry["link"]) fe.link(href=entry["link"])
except: except KeyError:
# When we have a empty link attribute, this isn't ideal # When we have a empty link attribute, this isn't ideal
# to set a default value.. :/ # to set a default value.. :/
log.warning("Empty link attribute, defaulting..") log.warning("Empty link attribute, defaulting..")
@ -136,12 +148,12 @@ def main():
try: try:
for author in entry["authors"]: for author in entry["authors"]:
fe.author(author) fe.author(author)
except: except KeyError:
log.debug("Oh dear, a malformed feed! Adjusting.") log.debug("Oh dear, a malformed feed! Adjusting.")
# This is a ugly hack to fix broken feed entries with the author attribute! # This is a ugly hack to fix broken feed entries with the author attribute!
author["email"] = author.pop("href") author["email"] = author.pop("href")
fe.author(author) fe.author(author)
except: except KeyError:
# Sometimes we don't have ANY author attributes, so we # Sometimes we don't have ANY author attributes, so we
# have to set a dummy attribute. # have to set a dummy attribute.
log.warning("Empty authors attribute, defaulting..") log.warning("Empty authors attribute, defaulting..")
@ -155,7 +167,7 @@ def main():
fe.description(entry["description"]) fe.description(entry["description"])
fe.summary(entry["description"]) fe.summary(entry["description"])
fe.content(entry["description"]) fe.content(entry["description"])
except: except KeyError:
# Sometimes feeds don't provide a summary OR description, so we # Sometimes feeds don't provide a summary OR description, so we
# have to set an empty value. # have to set an empty value.
# This is pretty useless for a feed, so hopefully we # This is pretty useless for a feed, so hopefully we
@ -169,11 +181,11 @@ def main():
try: try:
fe.published(entry["published"]) fe.published(entry["published"])
fe.updated(entry["published"]) fe.updated(entry["published"])
except: except KeyError:
fe.published("1970-01/01T00:00:00+00:00") fe.published("1970-01/01T00:00:00+00:00")
fe.updated("1970-01/01T00:00:00+00:00") fe.updated("1970-01/01T00:00:00+00:00")
continue continue
except: except Exception:
# Sometimes feeds don't even provide a publish date, so we default to # Sometimes feeds don't even provide a publish date, so we default to
# the start date &time of the Unix epoch. # the start date &time of the Unix epoch.
log.warning("Empty publish attribute, defaulting..") log.warning("Empty publish attribute, defaulting..")
@ -201,20 +213,6 @@ if __name__ == "__main__":
log.error("This program will NOT run without that set.") log.error("This program will NOT run without that set.")
sys.exit(1) sys.exit(1)
try:
FEED_LIST_PATH = CONFIG["url"]
except:
log.error("*** Configure variable missing! ***")
log.error("`url` variable missing.")
sys.exit(1)
try:
FEED_LIST_PATH = CONFIG["feeds"]
except:
log.error("*** Configure variable missing! ***")
log.error("`feeds` variable missing.")
sys.exit(1)
init_feed() init_feed()
log.debug("Begin processing feeds...") log.debug("Begin processing feeds...")