philgyford / daily-paper

For viewing a daily issue of the Guardian and Observer newspapers. `main` branch should be stable, current work is in `dev` branch.
https://guardian.gyford.com/
Other
26 stars 5 forks source link

Supporting non-UK-specific content #40

Open notjosh opened 4 years ago

notjosh commented 4 years ago

Hi πŸ‘‹

I love the idea of this, but I'm not from the UK. There's only so much Boris Johnson I can handle, before wanting to retreat to the calm, serene waters of Scott Morisson. cough.

As the Guardian also offers AU/US (digital) editions, sdo you think it'd be possible to amend this to support different content?

I'm guessing it's not easily supported, as this script seems to rely on the articles to part of the physical "book" newspaper edition, which isn't made in AU/US. Subsequently, we don't get the newspaperPageNumber value in the response (nor the newspaper-book[-section] tags), so it'd make for a poor experience.

Nuts. πŸ₯œ

But a side-quest might still be possible. We can filter on the production-office param when hitting the API. Doing so for yesterday (4th October, 2020), gives us:

I could imagine a world in which the AU/US articles could form a sort of "supplement" (hidden by default, but available if you tap thru). It wouldn't read/categorise/etc quite as nicely, but given how (relatively) few articles there are, I don't think it's a huge burden to thumb through them.

(I imagine some of the AU/US articles occasionally make it into the print issue, so it's hardly bulletproof)

Or, do you know of any API/params that could more effectively do the job?

philgyford commented 4 years ago

Hi @notjosh. Thanks for this, and the thought you've put into it - much appreciated!

Currently, obviously, the site's supposed to represent the contents of the "newspaper" as closely as possible but I can see that's not ideal for everyone, especially when there's other more appropriate content available. So this sounds a good idea.

(Incidentally, I think the Guardian's Daily Edition iPad app has stopped being an accurate representation of the newspaper contents, which was the original idea. It's hard to tell but when they relaunched the app it sounded like the content wouldn't necessarily be exactly the same any more. Which I mention purely as a bit of precedent for diverging from the newspaper content, should we need reassurance.)

I haven't looked any more closely at the API but using the production-office parameter sounds good. I have previously thought about whether to add the ability to hide certain sections (#24 ) so maybe, the AU and US news could be new sections, that are hidden by default. So a user could open a "Preferences" dialog and select from checkboxes. So today, the default options might look something like:

  • [x] Main section
  • [x] G2
  • [x] Journal
  • [x] Sport
  • [ ] Australia
  • [ ] US

[ Update preferences ]

I think it should be easy enough to ensure any AU/US articles only appear in one place - I think that if they're already in some other section of the paper then they shouldn't appear in the AU/US section...?

How does that sound?

notjosh commented 4 years ago

Yeah, that tracks with how I'd imagine working - off by default, but easily available available for folks that want it.

Gets the ol' πŸ‘ from me.

I think it should be easy enough to ensure any AU/US articles only appear in one place - I think that if they're already in some other section of the paper then they shouldn't appear in the AU/US section...?

Yeah, I think "simplest solution is best solution", but this gets easy to overthink: what if a user has standard sections (Main, etc) hidden, should they see the "duplicate" article in the AU/US section? I truly (truly, truly) don't think it's worth the hassle, but I guess it'd be a nice touch to resolve dynamically client side if you're extremely bored one rainy Sunday.