Uploading a file list to a Confluence page
Version 2.1 by Normann P. Nielsen on 2026/11/15 15:43
This lists my movies - first in alfabetical order, then after timestamp (for the movie file)
On the NAS:
(A prerequisite in to have ssh keys configured)
#!/bin/bash
echo "NAS Movielist - My ripped DVD/BD collection \\\\ \\\\ {toc} \\\\ "> /tmp/wiki
echo "h1. Alfabetical " >> /tmp/wiki
ls /media/Movies/ | sed 's/.m4v//g' >> /tmp/wiki
echo "h1. By timestamp (new -> old) " >> /tmp/wiki
ls -t /media/Movies/ | sed 's/.m4v//g' >> /tmp/wiki
ssh myserver.site.dk "~/scripts/addPageContent.sh familieblog 'Movielist for my NAS' '`cat /tmp/wiki`'"
echo "NAS Movielist - My ripped DVD/BD collection \\\\ \\\\ {toc} \\\\ "> /tmp/wiki
echo "h1. Alfabetical " >> /tmp/wiki
ls /media/Movies/ | sed 's/.m4v//g' >> /tmp/wiki
echo "h1. By timestamp (new -> old) " >> /tmp/wiki
ls -t /media/Movies/ | sed 's/.m4v//g' >> /tmp/wiki
ssh myserver.site.dk "~/scripts/addPageContent.sh familieblog 'Movielist for my NAS' '`cat /tmp/wiki`'"
On the Confluence Server:
(A prerequisite is to have the Atlassian CLI configured)
#!/bin/bash
Space=$1
PageTitle=$2
html=$3
/opt/atlassian-cli/confluence.sh --action storePage --space "$Space" --title "$PageTitle" --content "$html"
Space=$1
PageTitle=$2
html=$3
/opt/atlassian-cli/confluence.sh --action storePage --space "$Space" --title "$PageTitle" --content "$html"