confl (400B)
1 #!/bin/sh 2 3 # https://docs.atlassian.com 4 auth=`sed 1q $home/.config/atlassian/basicauth` 5 6 usage='usage: confl url' 7 if test $# -ne 1 8 then 9 echo $usage 10 exit 1 11 fi 12 13 dir=`dirname $1` 14 id=`basename $dir` 15 16 host=`echo $1 | sed 's!^https?://!!' | awk -F / '{print $3}'` 17 18 url=https://$host/wiki/api/v2/pages/$id?body-format=anonymous_export_view 19 20 curl -s -u $auth $url | jq -r .body.anonymous_export_view.value