Blame


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