Add opengraph stuff
Getty Ritter
5 years ago
| 12 | 12 |
if [ "$2" = "all" ]; then
|
| 13 | 13 |
ARGS="$1/quips/*"
|
| 14 | 14 |
FOCUS=false
|
| 15 |
OPENGRAPH="null"
|
| 15 | 16 |
else
|
| 16 | 17 |
ARGS="$2"
|
| 17 | 18 |
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")"
|
| 18 | 22 |
fi
|
| 19 | 23 |
COPY="the quips are not mine (all rights reversed)"
|
| 20 | 24 |
|
| 21 | 25 |
json-list -c $ARGS \
|
| 22 | 26 |
| json-dict quotelist - focus $FOCUS \
|
| 23 | 27 |
| 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" \
|
| 25 | 29 |
| mustache - templates/main.mustache
|
| 12 | 12 |
if [ "$2" = "all" ]; then
|
| 13 | 13 |
ARGS="$1/quotes/*"
|
| 14 | 14 |
FOCUS=false
|
| 15 |
OPENGRAPH="null"
|
| 15 | 16 |
else
|
| 16 | 17 |
ARGS="$2"
|
| 17 | 18 |
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")"
|
| 18 | 22 |
fi
|
| 19 | 23 |
COPY="all quotes used under fair use &c &c"
|
| 20 | 24 |
|
|
| 22 | 26 |
| pretty-quote \
|
| 23 | 27 |
| json-dict quotelist - focus $FOCUS \
|
| 24 | 28 |
| 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" \
|
| 26 | 30 |
| mustache - templates/main.mustache
|