x

Programs, configuration and documentation that don't fit anywhere else
Log | Files | Refs | README | LICENSE

commit 2eda27592fea22e42e26e3d88f1f27a3e4226169
parent 50b8881ac6247a8b6b1a18132f0a86b649835b97
Author: Oliver Lowe <o@olowe.co>
Date:   Sat, 12 Oct 2024 12:44:37 +1100

confl: use v2 API

Diffstat:
Mbin/confl | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/bin/confl b/bin/confl @@ -1,10 +1,10 @@ #!/bin/sh +# https://docs.atlassian.com auth=`sed 1q $home/.config/atlassian/basicauth` usage='usage: confl url' - -if test $# -eq 1 +if test $# -ne 1 then echo $usage exit 1 @@ -13,8 +13,8 @@ fi dir=`dirname $1` id=`basename $dir` -host=`echo $1 | sed 's!^https?://!!' | awk -F / '{print $1}'` +host=`echo $1 | sed 's!^https?://!!' | awk -F / '{print $3}'` -url=https://$host/wiki/rest/api/content/$id?expand=body.view +url=https://$host/wiki/api/v2/pages/$id?body-format=anonymous_export_view -curl -s -u $auth $url | jq -r .body.view.value +curl -s -u $auth $url | jq -r .body.anonymous_export_view.value