Commit Graph

2901 Commits

Author SHA1 Message Date
Olivier Meunier
4a69c9b5d3 Version 0.21.2 0.21.2 2025-11-23 11:42:09 +01:00
olivier
9cc01f5984 Merge pull request 'Dependencies update [2025-11-22]' (#953) from chore/updates into release
Reviewed-on: https://codeberg.org/readeck/readeck/pulls/953
2025-11-23 11:35:58 +01:00
Readeck Bot
0657dc0d9f Updated Go dependencies 2025-11-23 10:33:58 +00:00
olivier
77a71d2ae8 Merge pull request 'Fix some regressions' (#958) from fix/meta-regressions into release
Reviewed-on: https://codeberg.org/readeck/readeck/pulls/958
2025-11-23 11:11:25 +01:00
Olivier Meunier
7ccd081245 Return the resulting content-type when calling img.Image.Encode
A call to img.Image.Encode() can convert the image to another format.
For example, a WEBP image can turn into a PNG or JPEG, a GIF to a PNG
or GIF.

If the result needs to be open again with img.New(), we need its
content-type.

Resolves #955 root cause
2025-11-23 10:51:06 +01:00
Olivier Meunier
4a32a3cb22 Fixed multiple regressions with metadata
When JSON-LD data exist, they get a top priority over any metadata.
We don't always want that.

- set json-ld metadata to a "ld" namespace in drop.Meta
- use most of these data as first choice when performing a meta lookup
- when looking for a date, fetch the first one that can be parsed, not
  just rely on its presence
- the "ld.image" property (cover image) comes last in the lookup

Resolves #955
Resolves #957
2025-11-23 10:46:27 +01:00
Olivier Meunier
f48a5b379c Fixed regression in youtube content script
The youtube content script would use a property that doesn't exist
anymore (schema.identifier). It's present in the json-ld properties
so we can use it instead.

Resolves #954
2025-11-23 10:36:30 +01:00
Olivier Meunier
afc43b6242 Force text-wrap: nowrap on reading time in bookmark list
If a translation translates "%d min" without the breaking space, the
layout is broken.

Resolves #951
2025-11-21 23:12:08 +01:00
Olivier Meunier
0e85352d59 Version 0.21.1 0.21.1 2025-11-21 18:08:59 +01:00
olivier
23152a2c56 Merge pull request 'Dependencies update [2025-11-21]' (#947) from chore/updates into release
Reviewed-on: https://codeberg.org/readeck/readeck/pulls/947
2025-11-21 18:07:21 +01:00
Readeck Bot
74a0db269f Updated Site Config files 2025-11-21 18:04:58 +01:00
Readeck Bot
89be6cdde8 Updated Go dependencies 2025-11-21 18:04:58 +01:00
olivier
fc0eff0b69 Merge pull request 'Bump htmlquery for xpath fix' (#949) from bump-htmlquery into release
Reviewed-on: https://codeberg.org/readeck/readeck/pulls/949
2025-11-21 18:04:16 +01:00
Mislav Marohnić
6369a59b0f Bump htmlquery for xpath fix
Temporarily switches to a fork of htmlquery that pulls in the unreleased
version of `github.com/antchfx/xpath` that contains the `ancestor::` fix
https://github.com/antchfx/xpath/pull/119.
2025-11-21 18:04:16 +01:00
olivier
41e53d71db Merge pull request 'Added a specialized GIF decoder' (#950) from fix/gif-support into release
Reviewed-on: https://codeberg.org/readeck/readeck/pulls/950
2025-11-21 17:55:41 +01:00
Olivier Meunier
22e09aedee Added a specialized GIF decoder
- GIFs are handled and fully decoded by a new `img.Image` implementation (`img.GIFImage`). It provides a resize method that resizes all frames in a GIF
- A single-frame GIF is always encoded to PNG (keeping the palette information)
- `img.GIFImage` implements `img.MultiFrameImage`, an interface that exposes `Frames() int` and `FirstFrame() Image`
- in internal.bookmarks, an `img.MultiFrameImage` with more than one frame is copied without conversion, regardless of its size
- in pkg.extract, `NewRemoteImage` will only keep the first frame. This is used only for thumbnails and icons; we don't want them to be animated

Resolves #945
2025-11-21 15:03:54 +01:00
Olivier Meunier
e7632ca307 Fixed the PostgreSQL schema
A trailing coma was hanging around :/

Resolves #948
2025-11-21 14:46:49 +01:00
Olivier Meunier
0f070e372e Version 0.21.0 0.21.0 2025-11-20 14:13:48 +01:00
Olivier Meunier
a65b2d5ad1 Merge branch 'main' into release 2025-11-20 14:11:31 +01:00
Olivier Meunier
5936c75d19 Update changelog
and some dependency updates in makefile
2025-11-20 09:53:26 +01:00
olivier
7845cc51b8 Merge pull request 'Translations update from Codeberg Translate' (#940) from translate/readeck:weblate-readeck-application into main
Reviewed-on: https://codeberg.org/readeck/readeck/pulls/940
2025-11-20 09:35:56 +01:00
Codeberg Translate
4cd0ec8dbb Added translation using Weblate (Interslavic)
Added translation using Weblate (Interslavic)

Co-authored-by: Codeberg Translate <translate@codeberg.org>
Co-authored-by: Kropotkin <kropotkin@noreply.codeberg.org>
2025-11-20 08:35:31 +00:00
Codeberg Translate
651ec37466 Translated using Weblate (Turkish)
Currently translated at 95.1% (506 of 532 strings)

Translated using Weblate (Turkish)

Currently translated at 95.1% (506 of 532 strings)

Co-authored-by: Codeberg Translate <translate@codeberg.org>
Co-authored-by: misketmuskat <misketmuskat@noreply.codeberg.org>
Co-authored-by: olivier <olivier@noreply.codeberg.org>
Translate-URL: https://translate.codeberg.org/projects/readeck/application/tr/
Translation: Readeck/Application
2025-11-20 08:35:31 +00:00
Codeberg Translate
e4a01de81a Translated using Weblate (Polish)
Currently translated at 100.0% (142 of 142 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (142 of 142 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (142 of 142 strings)

Translated using Weblate (Polish)

Currently translated at 100.0% (142 of 142 strings)

Translated using Weblate (Polish)

Currently translated at 93.0% (495 of 532 strings)

Translated using Weblate (Polish)

Currently translated at 93.0% (495 of 532 strings)

Translated using Weblate (Polish)

Currently translated at 93.0% (495 of 532 strings)

Translated using Weblate (Polish)

Currently translated at 93.0% (495 of 532 strings)

Co-authored-by: Anonymous <anonymous@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@codeberg.org>
Co-authored-by: liilliil <liilliil@noreply.codeberg.org>
Co-authored-by: olivier <olivier@noreply.codeberg.org>
Translate-URL: https://translate.codeberg.org/projects/readeck/application/pl/
Translate-URL: https://translate.codeberg.org/projects/readeck/documentation/pl/
Translation: Readeck/Application
Translation: Readeck/Documentation
2025-11-20 08:35:31 +00:00
Codeberg Translate
5ff788290b Translated using Weblate (Italian)
Currently translated at 91.5% (487 of 532 strings)

Translated using Weblate (Italian)

Currently translated at 91.5% (487 of 532 strings)

Translated using Weblate (Italian)

Currently translated at 91.5% (487 of 532 strings)

Translated using Weblate (Italian)

Currently translated at 90.4% (481 of 532 strings)

Translated using Weblate (Italian)

Currently translated at 90.4% (481 of 532 strings)

Translated using Weblate (Italian)

Currently translated at 90.4% (481 of 532 strings)

Translated using Weblate (Italian)

Currently translated at 90.4% (481 of 532 strings)

Co-authored-by: Anonymous <anonymous@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@codeberg.org>
Co-authored-by: gifilo <gifilo@noreply.codeberg.org>
Co-authored-by: liilliil <liilliil@noreply.codeberg.org>
Co-authored-by: olivier <olivier@noreply.codeberg.org>
Co-authored-by: Кнⷫѧⷷ̈зⷮьⷬ Кропоткинъ <kropotkin@noreply.codeberg.org>
Translate-URL: https://translate.codeberg.org/projects/readeck/application/it/
Translation: Readeck/Application
2025-11-20 08:35:31 +00:00
Codeberg Translate
934b1459d9 Added translation using Weblate (Esperanto)
Added translation using Weblate (Esperanto)

Co-authored-by: Codeberg Translate <translate@codeberg.org>
Co-authored-by: Kropotkin <kropotkin@noreply.codeberg.org>
2025-11-20 08:35:31 +00:00
Codeberg Translate
095a88fe7a Translated using Weblate (Catalan)
Currently translated at 93.4% (497 of 532 strings)

Translated using Weblate (Catalan)

Currently translated at 93.4% (497 of 532 strings)

Co-authored-by: Codeberg Translate <translate@codeberg.org>
Co-authored-by: ccamara <ccamara@noreply.codeberg.org>
Co-authored-by: olivier <olivier@noreply.codeberg.org>
Translate-URL: https://translate.codeberg.org/projects/readeck/application/ca/
Translation: Readeck/Application
2025-11-20 08:35:31 +00:00
Codeberg Translate
c04ae90365 Added translation using Weblate (Belarusian)
Added translation using Weblate (Belarusian)

Co-authored-by: Codeberg Translate <translate@codeberg.org>
Co-authored-by: Kropotkin <kropotkin@noreply.codeberg.org>
2025-11-20 08:35:31 +00:00
olivier
519a6dd7bd Merge pull request 'Dependencies update [2025-11-20]' (#944) from chore/updates into main
Reviewed-on: https://codeberg.org/readeck/readeck/pulls/944
2025-11-20 09:35:27 +01:00
Readeck Bot
365618aa3b Updated JS dependencies 2025-11-20 08:30:41 +00:00
Readeck Bot
3b0955570c Updated Go dependencies 2025-11-20 08:30:24 +00:00
Olivier Meunier
1a608c555a Translation and documentation generation improvements
- restore completion cutoff to 90%
- apply completion cutoff on documentation
- better output messages for documentation and locales generation
2025-11-20 09:15:50 +01:00
Olivier Meunier
ef3a50360b Unquote exact search strings.
Exact strings come from quote values, with escape characters.
It is necessary to unquote the value otherwise it turns into something
that can't match a database query.

Example: "🧑‍🎓" becomes "🧑\u200d🎓"

Resolves #760
2025-11-19 23:06:59 +01:00
olivier
fd942c5f88 Merge pull request 'Dependencies update [2025-11-18]' (#941) from chore/updates into main
Reviewed-on: https://codeberg.org/readeck/readeck/pulls/941
2025-11-19 07:27:54 +01:00
Readeck Bot
1f50ab1452 Updated Site Config files 2025-11-19 07:27:54 +01:00
Readeck Bot
a28ea5e25e Updated JS dependencies 2025-11-19 07:27:54 +01:00
Readeck Bot
66103a0298 Updated Go dependencies 2025-11-19 07:27:54 +01:00
Olivier Meunier
7f0c3ad064 Send referrer on embedded videos
As per Google/Youtube requirements, an embedded iframe must set a
referrer.
https://developers.google.com/youtube/terms/required-minimum-functionality#embedded-player-api-client-identity

This adds "strict-origin-when-cross-origin" to embedded iframes so
playback works again.

Resolves #942
2025-11-19 07:25:21 +01:00
Olivier Meunier
e6ade4ae58 Removed WebPage.name in publisher JSON-LD lookup 2025-11-18 20:22:08 +01:00
Olivier Meunier
ccd6a75a42 Minor updates on the OAuth API documentation 2025-11-17 22:02:25 +01:00
Olivier Meunier
746466a3fe Fixed arstechnica content-script
- the body selector is now div.post-content
- removed the now useless replaceStrings
- give priority to {Article,NewsArticle,Web}.description in JSON-LD,
  before *.description

See https://community.readeck.org/d/113-some-webpages-content-not-being-extracted
2025-11-17 21:19:22 +01:00
olivier
f3d7c29d0a Merge pull request 'JSON-LD and microdata extractor' (#939) from feature/json-ld into main
Reviewed-on: https://codeberg.org/readeck/readeck/pulls/939
2025-11-17 16:00:23 +01:00
Olivier Meunier
d72d748377 Make sure extract.Drop information are cleaned up
- remove HTML tags from title, description, authors, site name
- set date to UTC
- language is 2 characters
- proper text direction
2025-11-17 16:00:23 +01:00
Olivier Meunier
434f5422c7 Use microdata in extract.ExtractMeta
- Don't extract JSON-LD in ParseProps
- Extract microdata + JSON-LD in ParseMeta
- Add this cleaned-up version to the properties
- Retrieve information from the parsed data using glob patterns

The glob match works with "." as delimiters and let us retrieve
second level elements such as "*.headline".
It provides alternatives when needed, like "*.{image,image.url,thumbnailUrl}".
Property getter and iterator support multiple glob patterns where the
first pattern that yields results stops the iteration.

Glob patterns are cached so they don't have to be compiled each time
a page is retrieved.

No test was harmed in the process 🎉

Resolves #864
2025-11-17 16:00:23 +01:00
Olivier Meunier
29af3b27a1 Added pkg/extract/microdata
This package's purpose is to provide:

- a microdata converter to JSON-LD
- a JSON-LD cleanup pass (badly formatted JSON and/or HTML escaped)
- a property lookup in the parsed data

This is by no means a full JSON-LD parser, expander, whatever. It makes
some naive and bold assumptions that received json-ld is always in
compact form, it doesn't care about context.

And it will be enough to query some metadata. This is not a good format
to work with.
2025-11-17 16:00:23 +01:00
olivier
0a6bb3ed9d Merge pull request 'Improve stripping self-linking heading anchors' (#936) from strip-heading-anchors-fixes into main
Reviewed-on: https://codeberg.org/readeck/readeck/pulls/936
Reviewed-by: olivier <olivier@noreply.codeberg.org>
2025-11-17 15:50:26 +01:00
Mislav Marohnić
a045d52da9 Improve Docsify hash router URL handling
Extract the fragment identifier from the `data-id` attribute rather than
parsing the bit after the `?id=` component of its router URLs.
2025-11-17 15:50:26 +01:00
Mislav Marohnić
be2b4221ec Improve stripping self-linking heading anchors
- If the `<a>` element to be stripped has an "id" attribute, preserve that
  attribute by moving it into the related heading element. This avoids breaking
  Table of Contents functionality.

- When the contents of a self-linking `<a>` element is an `aria-hidden`d
  element, assume that the contents doesn't need to be preserved. It is most
  likely an icon or another kind of UI element.

- Skip over whitespace nodes when looking up next/previous element siblings.

- Enhance the log line by logging how many link elements were stripped.
2025-11-17 15:50:26 +01:00
olivier
acd118295c Merge pull request 'Translations update from Codeberg Translate' (#935) from translate/readeck:weblate-readeck-application into main
Reviewed-on: https://codeberg.org/readeck/readeck/pulls/935
2025-11-17 15:27:26 +01:00
Codeberg Translate
bcd8fe9296 Translated using Weblate (Spanish)
Currently translated at 29.5% (42 of 142 strings)

Translated using Weblate (Spanish)

Currently translated at 29.5% (42 of 142 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (532 of 532 strings)

Translated using Weblate (Spanish)

Currently translated at 100.0% (532 of 532 strings)

Co-authored-by: Anonymous <anonymous@noreply.codeberg.org>
Co-authored-by: Codeberg Translate <translate@codeberg.org>
Co-authored-by: imposible01 <imposible01@noreply.codeberg.org>
Translate-URL: https://translate.codeberg.org/projects/readeck/application/es/
Translate-URL: https://translate.codeberg.org/projects/readeck/documentation/es/
Translation: Readeck/Application
Translation: Readeck/Documentation
2025-11-17 14:23:57 +00:00