LiteratureInContext / LiC-app

Application development for Literature in Context. Staging on development branch (http://anthologydev.lib.virginia.edu), production on master (http://anthology.lib.virginia.edu).
Other
6 stars 1 forks source link

Timeline: add author images #304

Open tonyahowe opened 4 months ago

tonyahowe commented 4 months ago

Is it possible to automatically pull and add images of authors from the linked data to our timeline? Not sure what the best option is for display, but something consistent and tidy?

wsalesky commented 4 months ago

@tonyahowe Where would I be getting these images? Are there links to them in the works?

tonyahowe commented 4 months ago

There's nothing directly available in the associated LCNAF or VIAF records, but there is the WikiData page, which seems to be available for most all of the authors. And in the source of those wikidata pages, there's a line (if an image is available) containing a link to the image file: <meta property="og:image" content="https://upload.wikimedia.org/wikipedia/commons/thumb/c/cc/CassandraAusten-JaneAusten%28c.1810%29_hires.jpg/1200px-CassandraAusten-JaneAusten%28c.1810%29_hires.jpg">

Can the first property "og:image" link be used? If no og:image or no wikidata link from the LCNAF, then do nothing?

Screenshot 2024-05-15 at 1 06 56 PM Screenshot 2024-05-15 at 1 06 50 PM

wsalesky commented 4 months ago

@tonyahowe This is tricky to do programmatically, the link to the wikimedia record is not in the mads record, it is in the JSON version, but some of them seem to return funky data which trips up my script. I will leave it open, but am going to focus on some other issues for now.

tonyahowe commented 4 months ago

Sounds good—thanks!

From: Winona Salesky @.> Date: Thursday, May 16, 2024 at 12:47 PM To: LiteratureInContext/LiC-app @.> Cc: Tonya Howe @.>, Mention @.> Subject: Re: [LiteratureInContext/LiC-app] Timeline: add author images (Issue #304)

@tonyahowehttps://github.com/tonyahowe This is tricky to do programmatically, the link to the wikimedia record is not in the mads record, it is in the JSON version, but some of them seem to return funky data which trips up my script. I will leave it open, but am going to focus on some other issues for now.

— Reply to this email directly, view it on GitHubhttps://github.com/LiteratureInContext/LiC-app/issues/304#issuecomment-2115748260, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAIZTOC4ZA4T5KICZYQOSJDZCTPJ3AVCNFSM6AAAAABHFQB2CWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMJVG42DQMRWGA. You are receiving this because you were mentioned.Message ID: @.***>