#!/bin/sh

IFS="^" read -r bm_name bm_url bm_date_added bm_type bm_comments <<BM_LINE_BLOCK
$(printf "%s" "$@")
BM_LINE_BLOCK

bm_preview_format_block=$(cat <<'BM_PREVIEW_FORMAT_BLOCK'
name:
%s

url:
%s

date_added:
%s

type:
%s

comments:
%s

BM_PREVIEW_FORMAT_BLOCK)

printf "$bm_preview_format_block" \
    "$bm_name" "$bm_url" "$bm_date_added" "$bm_type" "$bm_comments"
