NO _canonical_uri if empty

This commit is contained in:
fred 2022-04-28 20:26:19 +02:00
parent f72f4269bb
commit b0b9247592
1 changed files with 8 additions and 2 deletions

View File

@ -437,18 +437,24 @@ then
"type": "'${MIME}'", "type": "'${MIME}'",
"mime": "'${REAL}'", "mime": "'${REAL}'",
"cat": "'${CAT}'", "cat": "'${CAT}'",
"poster": "'${SCREENDIR}/screen.png'", "screenshot": "'${SCREENDIR}/screen.png'",
"ipfsroot": "'${IPFSREPFILEID}'", "ipfsroot": "'${IPFSREPFILEID}'",
"file": "'${file}'", "file": "'${file}'",
"mediakey": "'${MEDIAKEY}'", "mediakey": "'${MEDIAKEY}'",
"ipns": "'${IPNS}'", "ipns": "'${IPNS}'",
"tmdb": "'${REFERENCE}'", "tmdb": "'${REFERENCE}'",
"tags": "'${TAGS}'", "tags": "'${TAGS}'" '
[[ ${CANON} != "" ]] && echo ',
"_canonical_uri": "'${CANON}'" "_canonical_uri": "'${CANON}'"
} }
] ]
' > ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json ' > ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json
# Will be used by caroussel.html template
# CAROUSSEL=$(ipfs add -wq ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json | head-n 1)
# COPY TIDDLER JSON TO DESKTOP Journal/${TYPE} # COPY TIDDLER JSON TO DESKTOP Journal/${TYPE}
[[ "$USER" != "xbian" && -d ~/Bureau ]] && mkdir -p ~/Bureau/Journal/${TYPE} && cp ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json ~/Bureau/Journal/${TYPE}/${TITLE}.dragdrop.json [[ "$USER" != "xbian" && -d ~/Bureau ]] && mkdir -p ~/Bureau/Journal/${TYPE} && cp ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json ~/Bureau/Journal/${TYPE}/${TITLE}.dragdrop.json
[[ "$USER" != "xbian" && -d ~/Desktop ]] && mkdir -p ~/Desktop/Journal/${TYPE} && cp ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json ~/Desktop/Journal/${TYPE}/${TITLE}.dragdrop.json [[ "$USER" != "xbian" && -d ~/Desktop ]] && mkdir -p ~/Desktop/Journal/${TYPE} && cp ~/astroport/${TYPE}/${REFERENCE}/${MEDIAKEY}.dragdrop.json ~/Desktop/Journal/${TYPE}/${TITLE}.dragdrop.json