Sidehistorik
...
Indholdet af de 2 filer skal nu ind i Confluence....
Importer i Confluence
Script 1 til oprettelse af Blog Posts:
...
Kodeblok |
---|
IFS=$(echo -en "\n\b") x=0 for text in `cat introtext.csv` do text=$(echo "$text"|sed 's/\"\"/\"/g') #Transform text #Put a slash before image text=$(echo "$text"|sed 's/\images/\/images/g') #Remove old thumbs text=$(echo "$text"|sed 's/images\/thumbs/images/g') #Remove first quote text=$(echo "$text"| cut -c2-) #Remove last quote text=$(echo "$text"|sed -e 's/.$//g') #Correct Images text=$(echo "$text"|sed -e 's/_w//g') text=$(echo "$text"|sed -e 's/_JPG.jpg/.jpg/g') #Remove paragraph tags text=$(echo "$text"|sed -e 's/<p>//g') text=$(echo "$text"|sed -e 's/<\/p>//g') #Remove DIV tags text=$(echo "$text"|sed 's/<div class=[A-Za-z0-9]*>//g') text=$(echo "$text"|sed 's/<div>//g') text=$(echo "$text"|sed 's/<\/div>//g') #Replace img with wiki markup #text=$(echo "$text"|sed 's/\"image//image/g') #text=$(echo "$text"|sed 's/<src //image/g') echo $text x=$(( $x + 1 )) echo $x ./confluence.sh --action addNews --space "familieblog" --title "Nyhed $x" --content "{html}$text{html}" done |
Script 2 til Opdatering af content ved inject direkte i Confluence databasen:
...