# shellcheck shell=dash

# Section: story item style
___x_cmd_hn___story_json_style(){
    ___x_cmd jo
}

___x_cmd_hn___story_csv_style(){
    printf "%s\n" "title,score,by,time,id,descendants,url,type,kids,text"
    ___x_cmd ja jl2c .title .score .by .time .id .descendants .url .type .kids .text
}

___x_cmd_hn___story_preview_style(){
    ___x_cmd_is_stdout2tty || local NO_COLOR=1

    NO_COLOR="$NO_COLOR" \
    ___x_cmd cawk -m j/json,j/jiter,date,ui/ui \
        -f "$___X_CMD_ROOT_MOD/hn/lib/awk/util.awk" \
        -f "$___X_CMD_ROOT_MOD/hn/lib/awk/preview.awk"
}

# EndSection
