Re: New status pages announcement



On Sat, Mar 01, 2003 at 02:59:54PM +0100, Carlos Perelló Marín wrote:
> El sáb, 01 de 03 de 2003 a las 08:45, Marcel Telka escribió:
> > Napísané d?a 2003.02.20 12:02, (autor: Carlos Perelló Marín):
> > > Hi. Finally  we have them. New status pages are online now at
> > > http://developer.gnome.org/projects/gtp/status
> > 
> > Are informations from the status page available somewhere in one
> > parseable downloadable status file?
> > 
> 
> 
> Not yet.
> 
> It will be available as a .xml file.

I've made a parsingscript to extract the essential information. I use it myself to make my own statuspages on gnome-nl. You will need to change the "nl" part because it is hardcoded. Anyways...you might find it useful.

Kind regards,
Vincent van Adrighem

-- 
Help mee met het vertalen van GNOME. Kijk op http://gnome-nl.sf.net/ voor meer info.
#!/bin/sh
#The location of the statuspages. They NEED a trailing slash
sourcelocation="http://developer.gnome.org/projects/gtp/status/";
#Check the source
if ! lynx -source $sourcelocation \
| grep "index.html\">gnome" > translation-status.tmp; then 
	#Something went wrong...bail out
	echo "Statuspage-location not available"
	echo $sourcelocation
	exit 1
 fi
echo -n "" > versions.text
#We now have a loop for every gnomeversion which is in the statuspage
for version in `cat translation-status.tmp | sed 's/.*index.html\">\(.*\)<\/a>.*/\1/'`; do
	echo $version >> versions.text
	if ! lynx -source $sourcelocation$version/nl/index.html \
	  | grep "class=\"package\"" | grep -A 10 "<td><font" \
	  | sed 's/<.*\">//' |sed 's/<.*>//' > translation-status.$version.tmp; then
	    echo "Couldn't find index-files for $version"
		exit 1
	fi
	file="packages.$version.text"
	# echo -n "packages.$version.text: "
	date -u -R > $file
	echo $sourcelocation >> $file
	# Now, get the spaces in front of the lines cleaned out.
	mv translation-status.$version.tmp translation-status.$version.tmp.old
	for x in `cat translation-status.$version.tmp.old`; do 
		echo $x >> translation-status.$version.tmp
	done
	rm translation-status.$version.tmp.old
	# Next part: We start another loop for each group
	for group in `cat translation-status.$version.tmp`; do 
	if echo $group | grep [a-z]  >/dev/null; then
		echo "<--$group-->" >> $file
		if ! lynx -source $sourcelocation$version/nl/$group/index.html \
		  | grep -A 2 "class=\"package\"" | grep -A 10 "<td><font" \
		  | sed 's/href=\"..\/..\//href=\"/' \
		  | sed 's/.*href=\"\(.*\)\">\(.*\)<\/a.*/\1\
\2/' | sed 's/<.*\">//' |sed 's/<.*>//' > translation-status.$version.$group.tmp; then
		    echo "Couldn't find index-files for $version of the $group group."
			exit 1
		fi
		# Now, get the spaces in front of the lines cleaned out.
		mv translation-status.$version.$group.tmp translation-status.$version.$group.tmp.old
		for x in `cat translation-status.$version.$group.tmp.old`; do 
			echo $x >> translation-status.$version.$group.tmp
		done
		rm translation-status.$version.$group.tmp.old
		# Next part: We start another loop for each CVS-module
		if [ -f translation-status.$version.$group.tmp ]; then
			for line in `cat translation-status.$version.$group.tmp`; do 
				echo "$line" >> $file
			done
		fi
		echo "--" >> $file
		echo "TOTAL" >> $file
	else
		echo $group >> $file
	fi
	done
done

rm *.tmp


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]