Skip to content

Instantly share code, notes, and snippets.

@josephbriggsmrf
Created November 15, 2016 10:11
Show Gist options
  • Save josephbriggsmrf/1f0786520c73603ada212e6fa5b56b09 to your computer and use it in GitHub Desktop.
Save josephbriggsmrf/1f0786520c73603ada212e6fa5b56b09 to your computer and use it in GitHub Desktop.
Shell Script to automatically generate confluence page WIP
#!/bin/bash
# MRF-Atenea script to make automatic slides.
echo -n Username:
read username
echo -n Password:
read -s password
curl -u $username:$password -X POST -H 'Content-Type: application/json' -d '{
"type":"page",
"title":"Testing bash creation of page...",
"space":{
"key":"TT"
},
"body":{
"storage":{
"value":"
<ac:structured-macro ac:name=\"slides\"><ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:name=\"slide\">Cover</ac:structured-macro>
<ac:structured-macro ac:name=\"slide\">People</ac:structured-macro>
<ac:structured-macro ac:name=\"slide\">UX</ac:structured-macro>
<ac:structured-macro ac:name=\"slide\">UX2</ac:structured-macro>
<ac:structured-macro ac:name=\"slide\">Stats</ac:structured-macro>
<ac:structured-macro ac:name=\"slide\">Ending</ac:structured-macro>
</ac:rich-text-body>
</ac:structured-macro>
",
"representation":"storage"
}
}
}' https://atenea.marfeel.com/confluence/rest/api/content/ | python -mjson.tool
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment