Extension talk:Screencasting

this is crazy?! It can do this with JAVA?! Wikademia wow!....

Bash-Skript for downloading skoffer-flashfiles

 * 1) !/bin/sh

usage=' This script downloads all your Skoffer-videos (.flv) which are linked in your Mediawiki. Infos about skoffer: http://www.skoffer.com/ Infos about the Mediawiki Plugin: http://www.mediawiki.org/wiki/Extension:Screencasting

You need the Mediawiki rigorousSearch extension which must be called as Wiki-Admin. Search with this extension (Special:RigorousSearch) for the word "skoffer" and save the source html with the search result in it as search.html. Now you can invoke this shellscript with:

./dl-skoffer.sh search.html

The script looks into search.html, gets the linked wikipages and outputs a download skript based on a bunch of wgets.

For example: Wiki Code: skoffer>ccc93213591e2519af70ddb0aa658245 Skript: wget -nc --limit-rate=250k \ http://media.skoffer.com/ccc93213591e2519af70ddb0aa658245.flv

If your wiki is password-protected with htaccess you have to take a look into the script and activate the line with "#auth=...."

BUGs The script is (not very well) tested with rigorousSearch 1.0, MediaWiki 1.15.1 with about 20 search results. '


 * 1) Copyright (C) 2009 Ronald Woelfel 
 * 2) This program is free software; you can redistribute it and/or modify
 * 3) it under the terms of the GNU General Public License as published by
 * 4) the Free Software Foundation; either version 2 of the License, or
 * 5) (at your option) any later version.
 * 6) This program is distributed in the hope that it will be useful,
 * 7) but WITHOUT ANY WARRANTY; without even the implied warranty of
 * 8) MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * 9) GNU General Public License for more details.
 * 1) MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * 2) GNU General Public License for more details.

if [ $# -eq 0 ] then echo "$usage" exit 1 fi

filename=$1 test -r $1 || exit 1 tmp=/tmp/$0-$$

auth="--http-user=franz --http-password=XYZ"
 * 1) just comment out if no password is needed

wgServer=`grep "var wgServer =" "$filename" |cut -d\" -f2 ` wgScript=`grep "var wgScript =" "$filename" |cut -d\" -f2 `

treffer=`egrep -o "[0-9]+ matches" "$filename" |head -1|cut -d" " -f 1` treffer=`echo $treffer + 2|bc `

grep -A $treffer "matches" $filename | \ while read line do url=`echo "$line"|egrep -o "$wgScript/[^\"]*"`         wget $auth -O - ${wgServer}${url}| egrep -o "http://media.skoffer.com/[0-9a-f]+\.flv"  done >$tmp

# wget -nc => no clobber (wget refuses to download the file if its already there)

sort $tmp |uniq |sed 's/^/wget -nc --limit-rate=250k /ig' rm $tmp