gdritter repos lib-static / 353688b
Add opengraph stuff Getty Ritter 4 years ago
2 changed file(s) with 10 addition(s) and 2 deletion(s). Collapse all Expand all
1212 if [ "$2" = "all" ]; then
1313 ARGS="$1/quips/*"
1414 FOCUS=false
15 OPENGRAPH="null"
1516 else
1617 ARGS="$2"
1718 FOCUS=true
19 UUID="$(basename $ARGS)"
20 CONTENT="$(json-list -c $ARGS | simple-quote)"
21 OPENGRAPH="$(json-dict title "quip:$UUID" url "/quips/$UUID/" description "$CONTENT")"
1822 fi
1923 COPY="the quips are not mine (all rights reversed)"
2024
2125 json-list -c $ARGS \
2226 | json-dict quotelist - focus $FOCUS \
2327 | mustache - templates/quote.mustache \
24 | json-dict title Quips contents - usejs true copy "$COPY" onload '"doLoadHighlight()"' \
28 | json-dict title Quips contents - usejs true copy "$COPY" onload '"doLoadHighlight()"' opengraph "$OPENGRAPH" \
2529 | mustache - templates/main.mustache
1212 if [ "$2" = "all" ]; then
1313 ARGS="$1/quotes/*"
1414 FOCUS=false
15 OPENGRAPH="null"
1516 else
1617 ARGS="$2"
1718 FOCUS=true
19 UUID="$(basename $ARGS)"
20 CONTENT="$(json-list -c $ARGS | simple-quote)"
21 OPENGRAPH="$(json-dict title "quote:$UUID" url "/quote/$UUID/" description "$CONTENT")"
1822 fi
1923 COPY="all quotes used under fair use &c &c"
2024
2226 | pretty-quote \
2327 | json-dict quotelist - focus $FOCUS \
2428 | mustache - templates/quote.mustache \
25 | json-dict title Quotes contents - usejs true copy "$COPY" onload '"doLoadHighlight()"' \
29 | json-dict title Quotes contents - usejs true copy "$COPY" onload '"doLoadHighlight()"' opengraph "$OPENGRAPH" \
2630 | mustache - templates/main.mustache