Date: Thu, 28 Mar 2024 14:31:26 +0000 (UTC) Message-ID: <1964757197.1963.1711636286038@50041d78312e> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_1962_707194339.1711636286037" ------=_Part_1962_707194339.1711636286037 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
#!/bin/ba= sh html=3D"" IFS=3D$(echo -en "\n\b") Database=3D"Joomla" # Arguments Dir=3D$1 Id=3D$2 MakeToc=3D$3 # Check Arguments if [ $# -ne 3 ]=20 then echo "There are not 3 Arguments: Dir ArticleId yes/no" exit 0 fi if [ Dir =3D=3D "" ] then echo "Argument 1 is empty" exit 0 fi if [ ! -d /data/images/$Dir ] then echo "Argument 1 Dir: $Dir does not exist" exit 0 fi cd /data/images/$Dir for file in `find . -type d | grep -v thumbs | sort` do NumOfPics=3D`ls -t $file | egrep -i "\.(jpg|gif|png|bmp)$" | wc -l` if [ $NumOfPics -gt 0 ] then file=3D$(echo $file|sed 's/\.\///g') toc=3D"$toc<br><a href=3D\"#$file\">$file</a>" html=3D"$html<p><a name=3D\"$file\"><b>$file</b><= ;/a><br>{artsexylightbox path=3D\"images/$Dir/$file/thumbs/900pxHi= gh\" thumbnailPath=3D\"images/$Dir/$file/thumbs\"}{/artsexylightbox}</p&= gt;" fi for movie in `find $file/ -maxdepth 1 -type f | grep -v thumbs | egrep -i "= \.(mpg|avi|wmv|mpeg|mp4|m4v)$" | sort` do html=3D"$html<a href=3D\"images/$Dir/$movie\" target=3D\"_video\"><= ;img src=3D\"/images/moviethumb.jpg\" height=3D50 width=3D50 border=3D0>= </a> " themovie=3D$(echo $movie|sed 's/ /%20/g') # html=3D"$html{mbox:http://www.mos-eisley.dk/images/$Dir/$themovie|640|360= |group=3D$file|title=3DVideo|vthumb=3Dmoviethumb.jpg|height=3D50|width=3D50= |caption=3DVideo}" done done if [ $MakeToc =3D=3D "no" ] then sql=3D"UPDATE jos_content set introtext=3D'$html' where id=3D$Id" else sql=3D"UPDATE jos_content set introtext=3D'$toc<br><br>$html' w= here id=3D$Id" fi echo "SET NAMES 'utf8';$sql" > /tmp/insert.sql mysql --user=3Droot --password=3Dxxxxxx joomla < /tmp/insert.sql rm /tmp/insert.sql