[med-svn] r2411 - trunk/community/talks/200808_debconf8
tille at alioth.debian.org
tille at alioth.debian.org
Fri Aug 15 04:07:27 UTC 2008
Author: tille
Date: 2008-08-15 04:07:26 +0000 (Fri, 15 Aug 2008)
New Revision: 2411
Modified:
trunk/community/talks/200808_debconf8/author_stats
trunk/community/talks/200808_debconf8/get-archive-pages
Log:
Move encoding stuff to perl code to have it right into the database
Modified: trunk/community/talks/200808_debconf8/author_stats
===================================================================
--- trunk/community/talks/200808_debconf8/author_stats 2008-08-15 03:17:31 UTC (rev 2410)
+++ trunk/community/talks/200808_debconf8/author_stats 2008-08-15 04:07:26 UTC (rev 2411)
@@ -17,19 +17,21 @@
sed -i -e '/^[-+]\+$/d' -e '/^([0-9]\+ [A-Za-z]\+)$/d' \
-e 's/[[:space:]]*|[[:space:]]*/\t/g' \
- -e 's/è/è/g' -e 's/ö/ö/g' \
-e 's/®//g' -e 's/é/e/' \
- -e 's/á/á/g' -e 's/ñ/ñ/' \
"$DATFILE"
+## -e 's/á/á/g' -e 's/ñ/ñ/' \
+## -e 's/è/è/g' -e 's/ö/ö/g' \
+
ENDCOL=$((NUM+1))
R --no-save <<EOT
library(plotrix)
dmstats <- read.table(file='$DATFILE', sep = '\t', fill=TRUE, header=TRUE )
# png("dmstats.png", width = 800, height = 600)
-textcolor="yellow"
-pdf("${NAME}.pdf", fg=textcolor)
+# textcolor="yellow"
+textcolor="black"
+pdf("${NAME}.pdf", fg=textcolor, width=9, height=7)
par(col.axis=textcolor,col.main=textcolor)
dmstats.mat <- as.matrix(dmstats)[,2:$ENDCOL]
rownames(dmstats.mat) <- dmstats[['year']]
Modified: trunk/community/talks/200808_debconf8/get-archive-pages
===================================================================
--- trunk/community/talks/200808_debconf8/get-archive-pages 2008-08-15 03:17:31 UTC (rev 2410)
+++ trunk/community/talks/200808_debconf8/get-archive-pages 2008-08-15 04:07:26 UTC (rev 2411)
@@ -201,10 +201,6 @@
$line =~ /^\s*<li><em>Message not available<\/em>/ ||
$line =~ /<em>\(continued\)<\/em>\s*$/ ||
$line =~ /^\s*$/) { next ; }
-# @SEP1 = ( '<li><strong>.*href="', '\s*' );
-# @SEP2 = ( '">', "\s*$SEPARATOR\s*" );
-# @SEP3 = ( '</a></strong>\s*<em>', '\s*<I>\s*');
-# @SEP4 = ( '</em>', '\s*');
# print "DEBUG: $line\n";
if ( $storefiles ) {
print HTMLSNIP "$line\n";
@@ -242,7 +238,8 @@
if ( $storefiles ) {
print HTMLSNIP "$subject ; $author\n";
}
- $datain->execute($project, "$year-$month-01", $author, $subject,
+ $datain->execute($project, "$year-$month-01",
+ HTMLcode2UTF8($author), HTMLcode2UTF8($subject),
"${URL}/${year}/${month}/$msgurl") ;
$messagelines++ ;
}
@@ -301,7 +298,8 @@
# in Debian Edu. This script cleans up this
# system("./0fix_ralf_edu");
$query = "UPDATE listarchive SET author = 'Ralf Gesellensetter' WHERE project = 'edu' AND author LIKE 'Ralf%setter';" ;
-$query = "UPDATE listarchive SET author = 'Vagrant Cascadian' WHERE project = 'edu' AND author LIKE '%vagrant%';" ;
+$query = $query . "UPDATE listarchive SET author = 'Vagrant Cascadian' WHERE project = 'edu' AND author LIKE '%vagrant%';" ;
+$query = $query . "UPDATE listarchive SET author = 'Francesco P. Lovergine' WHERE project = 'pkg-grass-general' AND author LIKE 'Francesco%Lovergine';" ;
$daten = $dbh->prepare_cached($query);
$daten->execute() ;
@@ -312,3 +310,15 @@
foreach $project (keys %ALLPROJECTS) {
system("./author_stats $project") ;
}
+
+sub HTMLcode2UTF8 {
+
+ $_ = $_[0] ;
+
+ s/è/è/g;
+ s/ö/ö/g;
+ s/á/á/g;
+ s/ñ/ñ/g;
+
+ return ($_);
+}
More information about the debian-med-commit
mailing list