fix: show the author names and a Dutch local date in the copied article byline #69

Merged
midas merged 3 commits from fix/kubus-byline into dev 2026-10-11 14:17:06 +02:00
Owner

Fixes the byline in Copy article as Markdown on both platforms. The problems were found in device tests after #66.

Author missing (Kubus apps). De Gelderlander 9.21.1 renders its byline from AuthorComponent (g20.a -> i30.c -> rh0.a -> composable ph0.h): it shows the properties.authors[].names with properties.shortDescription below them. The exporter only read Source. It now takes:

  1. the author names of the first AuthorComponent, otherwise its short description;
  2. the same from an ExtendedAuthorComponent;
  3. the Source text.

Names are read through KubusModels (new joined(...)); empty stubs for both components were added to stubs/gelderlander (unobfuscated Moshi class names).

Bio instead of the author (Volkskrant). AuthorByline.getDescription() is the author's short description, usually a bio, so the byline read *is politiek verslaggever van de Volkskrant. Hij schrijft over ...*. The exporter now takes the names (first + last) of getAuthorProfiles() and uses the description only when there are no profiles. The logic is in the testable byline(List<String>, String).

Raw ISO UTC date (both platforms). TimestampComponent.properties.publication (Kubus) and Header.getPublicationDate() (Volkskrant, which the app itself runs through ZonedDateTime.parse) are ISO 8601. The one shared helper markdown/ArticleDates, applied in MarkdownWriter.header for both exporters, formats them as d MMMM yyyy, HH:mm in Europe/Amsterdam with the nl locale (the same pattern as Volkskrant's DateTimeUtil). For example, 2026-10-11T01:26:00Z becomes 11 oktober 2026, 03:26. Anything that is not ISO is kept as is. The timestamp is parsed by hand (regex + Calendar + SimpleDateFormat), so it needs neither java.time (API 26) nor SimpleDateFormat's X (API 24).

Tests: ArticleDatesTest and VolkskrantArticleExporterTest (new), plus new cases in MarkdownWriterTest and KubusModelsTest.

Checked:

  • gradlew buildAndroid test passes.
  • patch-install.ps1 -NoInstall prints Applied: Copy article as Markdown on Gelderlander 9.21.1 and Volkskrant 7.52.0.
  • Not yet tested on a device.

🤖 Generated with Claude Code

Fixes the byline in **Copy article as Markdown** on both platforms. The problems were found in device tests after #66. **Author missing (Kubus apps).** De Gelderlander 9.21.1 renders its byline from `AuthorComponent` (`g20.a` -> `i30.c` -> `rh0.a` -> composable `ph0.h`): it shows the `properties.authors[].name`s with `properties.shortDescription` below them. The exporter only read `Source`. It now takes: 1. the author names of the first `AuthorComponent`, otherwise its short description; 2. the same from an `ExtendedAuthorComponent`; 3. the `Source` text. Names are read through `KubusModels` (new `joined(...)`); empty stubs for both components were added to `stubs/gelderlander` (unobfuscated Moshi class names). **Bio instead of the author (Volkskrant).** `AuthorByline.getDescription()` is the author's short description, usually a bio, so the byline read `*is politiek verslaggever van de Volkskrant. Hij schrijft over ...*`. The exporter now takes the names (first + last) of `getAuthorProfiles()` and uses the description only when there are no profiles. The logic is in the testable `byline(List<String>, String)`. **Raw ISO UTC date (both platforms).** `TimestampComponent.properties.publication` (Kubus) and `Header.getPublicationDate()` (Volkskrant, which the app itself runs through `ZonedDateTime.parse`) are ISO 8601. The one shared helper `markdown/ArticleDates`, applied in `MarkdownWriter.header` for both exporters, formats them as `d MMMM yyyy, HH:mm` in Europe/Amsterdam with the nl locale (the same pattern as Volkskrant's `DateTimeUtil`). For example, `2026-10-11T01:26:00Z` becomes `11 oktober 2026, 03:26`. Anything that is not ISO is kept as is. The timestamp is parsed by hand (regex + `Calendar` + `SimpleDateFormat`), so it needs neither `java.time` (API 26) nor `SimpleDateFormat`'s `X` (API 24). **Tests:** `ArticleDatesTest` and `VolkskrantArticleExporterTest` (new), plus new cases in `MarkdownWriterTest` and `KubusModelsTest`. **Checked:** - `gradlew buildAndroid test` passes. - `patch-install.ps1 -NoInstall` prints `Applied: Copy article as Markdown` on Gelderlander 9.21.1 and Volkskrant 7.52.0. - Not yet tested on a device. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix: show the author and a Dutch local date in the copied article byline
Some checks failed
CI / Build (pull_request) Has been cancelled
fd24c6cd1d
De Gelderlander and the other Kubus apps take the byline from the
AuthorComponent (author names, else its short description), then an
ExtendedAuthorComponent, and only then the Source. The ISO 8601 publication
timestamp of both Kubus and Volkskrant articles is shown as Dutch local time
("11 oktober 2026, 03:26", Europe/Amsterdam) instead of raw UTC.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix: take the Volkskrant byline from the author names instead of the bio
Some checks failed
CI / Build (pull_request) Has been cancelled
a5af02c93e
AuthorByline.getDescription() is the author's short description, usually a
bio, so the copied article's byline read "is politiek verslaggever van de
Volkskrant. ..." instead of the name. Prefer the author profiles' names and
fall back to the description only without profiles. The ISO publication date
is already shown as Dutch local time through the shared ArticleDates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
midas changed title from fix: show the author and a Dutch local date in the copied article byline to fix: show the author names and a Dutch local date in the copied article byline 2026-10-11 14:12:56 +02:00
chore: keep the header picture note in the Markdown section of the Gelderlander notes
All checks were successful
CI / Build (pull_request) Successful in 2m17s
2c10dc1d4b
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.