ucd-library / intertwine

California's modern wine network
MIT License
1 stars 0 forks source link

Image Credit not displaying on Cabernet map items #107

Closed wrenaria closed 3 years ago

wrenaria commented 3 years ago

(Pulled from #93) Image credit is not displaying at bottom of subject panel on the Cabernet map:

Screen Shot 2020-12-04 at 9 52 55 AM

In the example of Steven Spurrier (map, trello) above, it looks like the credit line is currently appearing as the last item in the "learn more" link list, but it seems this is not usually the case. On most other items, it is simply missing, like in this example of Warren Winiarski (map, trello):

Screen Shot 2020-12-04 at 9 58 56 AM

The credit link to Bob McClenahan is missing.

Working Example

Here is an example of correctly working image credit from the Chardonnay map), using Fred McCrea's (map, trello) info panel:

Screen Shot 2020-12-04 at 10 02 04 AM

jrmerz commented 3 years ago

Switching assignee, @qjhart said was riot issue. Please correct if wrong.

jrmerz commented 3 years ago

@qjhart think we are really close. The outlier now is this Steven Spurrier issue where the Image Credit shows in Learn More. Is that a strange data (trello) issue or a parser issue?

Trello: https://trello.com/c/3kJMLUSG/47-steven-spurrier Map: https://intert-wine-leigh-akwemh35fa-uc.a.run.app/map/cabernet/person/3kJMLUSG

Other image credits for Cab seem to be showing; example

qjhart commented 3 years ago

@jrmerz yes, this is a very hard to spot trello Markdown Problem

The long term solution is to add a linter to trello2moment for checking. I fixed the trello card, and it's okay now.

jrmerz commented 3 years ago

Great, updating data now!

jrmerz commented 3 years ago

Humm, re-imported and still now showing correctly ... https://intert-wine-leigh-akwemh35fa-uc.a.run.app/map/cabernet/person/3kJMLUSG. @qjhart thoughts?

qjhart commented 3 years ago

@jrmerz Hmm, I'm stumped on the data end. The updated cabernet.jsonld file looks as expected..

[
{
    "@id" : "#3kJMLUSG",
    "@type" : [ "schema:WebPage", "schema:Person" ],
    "creator" : "_:b151",
    "description" : "REMOVED",
    "license" : "http://rightsstatements.org/vocab/CNE/1.0/",
    "name" : "Steven Spurrier",
    "schema:position" : 65,
    "publisher" : "http://id.loc.gov/authorities/names/no2008108707",
    "relatedLink" : [ "_:b113", "_:b8" ],
    "spatial" : "_:b150",
    "temporal" : "1941/present",
    "thumbnail" : "3kJMLUSG/StevenSpurrier_780_old_fitbox_1000x600.jpg",
    "VSfrU3C5" : "#YBRz41aa"
  }, {
    "@id" : "_:b151",
    "name" : "Bella Spurrier/Smithsonian Institution",
    "url" : "https://wtop.com/food-restaurant/2016/05/40-years-later-smithsonian-celebrates-pivotal-moment
-in-wine-history/"
    }, {
    "@id" : "_:b113",
    "name" : "Decanter Articles by Steven Spurrier",
    "url" : "https://www.decanter.com/author/stevenspurrier/"
  }, {
    "@id" : "_:b8",
    "name" : "Q&A: Steven Spurrier",
    "url" : "https://www.oregonwinepress.com/q-and-a-steven-spurrier"
  }
]
jrmerz commented 3 years ago

The json file in the dams still seems wrong ... https://moments.dams.library.ucdavis.edu/fcrepo/rest/collection/intertwine/moments/cabernet/cabernet.json/fcr:metadata. @qjhart thoughts?

{
    "@id" : "#3kJMLUSG",
    "@type" : [ "schema:WebPage", "schema:Person" ],
    "description" : [ "#Image Credit", "Steven Spurrier (born 1941) is a British wine expert and train merchant who has been described as a champion of French wine.\n\n Spurrier entered the wine trade in 1964 as a trainee with London's oldest wine merchant Christopher and Co. In 1970 he moved to Paris where he persuaded an elderly lady to walk down the Royal Street. From 1971 he ran the wine shop The Caves of the Madeleine where customers were encouraged to taste wines before they bought them, which achieved recognition as a highly regarded specialist wine shop. In 1973 he started The Academy of Wine, France's first private wine school, which featured Michel Bettane and Charles F. Shaw, namesake of \"Two Buck Chuck\".\nSpurrier went on to stage the influential \"Judgment of Paris\" Tasting of 1976, when a Chardonnay and Cabernet Sauvignon from California were listed above some of the most prestigious wines of Burgundy and Bordeaux.\n\n Spurrier sold his wine interests in France and returned to the UK in 1988, becoming a wine consultant and journalist. He is now director of the Christie's Wine Course, which he founded with Christie's Education in 1982. He is also a consultant to Singapore Airlines, and consultant editor at Decanter." ],
    "license" : "http://rightsstatements.org/vocab/CNE/1.0/",
    "name" : "Steven Spurrier",
    "schema:position" : 65,
    "publisher" : "http://id.loc.gov/authorities/names/no2008108707",
    "relatedLink" : [ "_:b60", "_:b85", "_:b39" ],
    "spatial" : "_:b150",
    "temporal" : "1941/present",
    "thumbnail" : "3kJMLUSG/StevenSpurrier_780_old_fitbox_1000x600.jpg",
    "VSfrU3C5" : "#YBRz41aa"
  }

updating using run.sh:

#! /bin/bash

set -e
ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"

node $ROOT_DIR/trello2moment \
  --token [token] \
  --key [key] \
  --thumbnails --board=$1 --moment=$2

riot --formatted=JSONLD --base=z: $2_moment.ttl | sed 's/"z:\(.*\)"/"\1"/' > $2/$2.json

fin io import -p moments/$2  intertwine ./$2

then

run.sh D33H2WPN cabernet
qjhart commented 3 years ago

@jrmerz without --overwrite trello2moment won't go back to trello for the JSON file if it already exists at $moment/$board.json in this case cabernet/D33H2WPN.json

So, either remove, or add that flag.