1
0
mirror of https://github.com/chylex/Nextcloud-News.git synced 2024-11-21 22:42:48 +01:00
Commit Graph

480 Commits

Author SHA1 Message Date
cde02ce5e2
Add article word count & limit intro length 2024-08-02 16:09:01 +02:00
Benjamin Brahmer
da83f9a9b3 use unique name for cache folder
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-08-26 10:52:58 +02:00
Benjamin Brahmer
b99320dd4a
Check available compression types of curl (#2328)
Check an use available compression types of curl
use compression when downloading feed logo

Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-08-25 09:37:29 +02:00
Benjamin Brahmer
17f0fc7f4a Add a command to check the job status and reset it
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-08-22 09:47:11 +02:00
Benjamin Brahmer
ca9e07b3ba drop support for Nextcloud 25
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-08-22 09:14:32 +02:00
Benjamin Brahmer
ca6cedeb28 Upgrade feed-io to v5.1.3
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-08-09 10:58:45 +02:00
Mynacol
48e1ad1583 Use HTTP compression for downloads
As long as we use Feed-io < 6, we always use Guzzle (with Feed-io 6, we
need to choose a [HTTPlug](https://httplug.io/) library ourselves). Guzzle
[supports](https://docs.guzzlephp.org/en/stable/request-options.html#decode-content)
transparently decompressing gzip or deflate compressed responses, which is enabled by default.

Feed-io does this [by default](ffef9eaabe),
but as we override the headers, we have to add a fitting `Accept-Encoding` header as well.

Previously, my feed collection caused up to 45.9 MB download traffic per cronjob,
with this commit it is as low as 23.6 MB.

Signed-off-by: Mynacol <Mynacol@users.noreply.github.com>
2023-06-22 11:31:42 +02:00
Benjamin Brahmer
9b29d84b47 allowEvalScript set to true
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-06-18 14:41:15 +02:00
Daniel Starzmann
2d4cb5ed1c Improve sql query performance by removing unused payload
Signed-off-by: Daniel Starzmann <daniel@starze.de>
2023-04-16 11:13:30 +02:00
Benjamin Brahmer
a70d155ce4 Set lastmodified in read all
if this is not updated the API won't work correctly and we get sync errors.
Adjust test to use item api

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-04-05 19:43:02 +02:00
Benjamin Brahmer
b1476e958a If timestamp is null use timestamp "one year ago"
if timestamp is not set during creation of a feed use date one year ago
code fixes and linting fixes.

Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-03-23 12:12:06 +01:00
Robert Wunderer
eeabb4189b Use httpLastModified field for If-Modified-Since header when fetching feed updates
Signed-off-by: Robert Wunderer <robert.wunderer@caprisys.at>
2023-03-23 12:12:06 +01:00
Benjamin Brahmer
be95c17f46 store useragent in one place
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-03-23 12:11:38 +01:00
Benjamin Brahmer
ea8002e2d9 add cron status badge to admin setting
Display  a info card in the settings, indicating when the last news update job ran.

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-03-13 14:39:15 +01:00
Benjamin Brahmer
7cdf3c83e8 fix style
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-03-02 17:51:53 +01:00
Benjamin Brahmer
04fcda9b1a Remove unused job from db
Our background job was renamed quite a while ago
the old job remained in the db, to prevent confusion this adds
a repair step to remove the old job.

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-03-02 17:51:53 +01:00
Benjamin Brahmer
69681d12cb Implement item search
The search result can only link to the feed.

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-02-14 11:18:00 +01:00
Sean Molenaar
e5f75d7a4c fix: do not request favicon for empty base URL
Signed-off-by: Sean Molenaar <sean@seanmolenaar.eu>
2023-02-14 10:18:08 +01:00
Benjamin Brahmer
ef04d091c7 Update lib/Db/Feed.php
Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-01-12 18:27:32 +01:00
Benjamin Brahmer
502e4b923e don't process link if it's null
don't process body of feed if it's null

Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-01-12 18:27:32 +01:00
Benjamin Brahmer
0dfd93f75d Workaround for #2048
The league/uri version that we inherit in Nextcloud is a bit outdated.
That version can't handle certain uris.

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2023-01-11 10:19:34 +01:00
dependabot[bot]
92ebe4a836
Bump fivefilters/readability.php from 2.1.0 to 3.1.0 (#1989)
* Bump fivefilters/readability.php from 2.1.0 to 3.1.0

Bumps [fivefilters/readability.php](https://github.com/fivefilters/readability.php) from 2.1.0 to 3.1.0.
- [Release notes](https://github.com/fivefilters/readability.php/releases)
- [Changelog](https://github.com/fivefilters/readability.php/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fivefilters/readability.php/compare/v2.1.0...v3.1.0)

---
updated-dependencies:
- dependency-name: fivefilters/readability.php
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* update Authors

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

* Change namespace for fivefilters

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Benjamin Brahmer <info@b-brahmer.de>
2022-11-17 22:03:46 +01:00
Rhys Tyers
a50d0a427d Fix various keyboard navigation issues
Signed-off-by: Rhys Tyers <mail@rhy.si>
2022-10-23 12:48:39 +02:00
Benjamin Brahmer
505b3360cb Remove setting for minimum purge interval setting
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-10-12 21:09:54 +02:00
Benjamin Brahmer
b88e1a546a New administrator setting for deleting unread items automatically
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-10-08 17:29:08 +02:00
Benjamin Brahmer
a7f69c4b63 fix readAll
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-31 16:14:18 +02:00
Carl Schwan
753e88793e
Port admin settings to vue (#1880)
* Port admin settings to vue

Co-authored-by: anoy. <anoymouserver@users.noreply.github.com>
Co-authored-by: Benjamin Brahmer <info@b-brahmer.de>
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
2022-08-30 18:07:25 +02:00
Benjamin Brahmer
c217448345 Fix adding feed that was just deleted is causing an error
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-25 07:50:36 +02:00
Benjamin Brahmer
4afd5a547d change itemMapper readAll
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-21 16:39:07 +02:00
Benjamin Brahmer
410a1e4d6b fixup for #1861
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-19 15:57:03 +02:00
Benjamin Brahmer
1784406fa7
Fix deprecation warnings from Nextcloud. (#1869)
* don't use private class anymore
* execute is deprecated
* fix migration execute statement
* fix unittest

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-19 10:07:43 +02:00
Benjamin Brahmer
c09cca75b5 Fix deprecations
add phpstan deprecation rules

Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-19 09:14:27 +02:00
Benjamin Brahmer
a3d70f50aa Fix Test and adjust code
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-19 09:14:27 +02:00
Benjamin Brahmer
932b88a39c add item types to api docs
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-19 09:14:27 +02:00
Benjamin Brahmer
a66d62d1d7 adapt generateSearchIndex
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-08-19 09:14:27 +02:00
Benjamin Brahmer
d4450ebad2
Change Autodiscover behaviour (#1860)
* change autodiscover behaviour to only run if the provided url is not already a feed

* Execute feed check after the final url is found

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
2022-08-08 19:23:42 +02:00
Benjamin Brahmer
66a161e4f7 fix type always string for findAllFromUser
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-06-28 17:29:13 +02:00
Benjamin Brahmer
1c91928e59
If items of feed do not provide an author fallback to feed author (#1803)
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-05-31 15:46:01 +02:00
Accalia Elementia
fdf037e728
Use Feed Link as GUID when Feed omits Guid. (#1785)
* Use Feed Link as GUID when Feed omits Guid.

As noted in nextcloud/news#1702 some feeds omit the GUID and are
therefore not a valid RSS feed.

nextcloud/news#1738 resolved the issue to allow valid feeds to
update correctly when an invalid feed is present.

This commit allows parsing of the invalid feed as well by assuming
that the item link of the feed is unique to the feed and using
it in place of the GUID when the feed omits the GUID.

This will allow NextCloud News to accept and behave like many other
popular feed aggregators when presented with such an invalid feed.

Signed-off-by: Accalia <Accalia@Elementia.me>

* Add basic Logging when using fallback guid

Signed-off-by: Accalia <Accalia@Elementia.me>

* Add basic Logging when using fallback guid - Fix Fatfinger Typo

Signed-off-by: Accalia <Accalia@Elementia.me>

* Add basic Logging when using fallback guid - Update tests to account for additional logging

Signed-off-by: Accalia <Accalia@Elementia.me>
2022-05-24 17:07:50 +02:00
Benjamin Brahmer
0fb620244d check if variable is null before striping tags
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

Co-authored-by: Sean Molenaar <SMillerDev@users.noreply.github.com>
2022-05-04 18:14:37 +02:00
Benjamin Brahmer
15e613bc36 fix the url
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-05-04 10:18:11 +02:00
Benjamin Brahmer
5af0cb6e22 update last_modified when marking an item as read
Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

this way it works

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

add changelog entry

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

Partly fix test

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>

test passing

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-05-02 09:56:12 +02:00
Paul Tirk
da5e749ecc rename parameter for read/unread api call
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Paul Tirk
3bdafbfcea add documentation for API v1.3 & fix parameter description
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Paul Tirk
4b68169142 also allow starring/unstarring multiple items by id
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Paul Tirk
115df4b9e2 remove duplicate function
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Paul Tirk
b9c4f0bacb fix indentation of function description
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Paul Tirk
98028e4422 add routes for starring/unstarring items by id
Signed-off-by: Paul Tirk <paultirk@paultirk.com>
2022-04-30 20:04:30 +02:00
Benjamin Brahmer
835f295ece Release 18.0.1
No major changes since the beta versions.

Signed-off-by: Benjamin Brahmer <info@b-brahmer.de>
2022-04-24 10:29:33 +02:00
nextcloud486153
032d48ad7b Fix malformed feeds (without GUIDs) stopping the update process (fixes #1738)
Signed-off-by: nextcloud486153 <78801830+nextcloud486153@users.noreply.github.com>
2022-04-18 13:16:01 +02:00