summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2009-06-11 23:06:40 +0000
committerKarl Berry <karl@freefriends.org>2009-06-11 23:06:40 +0000
commit5e3364c59042be87b704bd1987cb6a19069051a2 (patch)
tree278840ab01d29f0c55048e4589ab0a4b13a17ba5 /Build
parentc09766e27de6513283bdd791e2a19e2e959ab5ec (diff)
ulqda update (11jun09)
git-svn-id: svn://tug.org/texlive/trunk@13716 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rwxr-xr-xBuild/source/texk/texlive/linked_scripts/ulqda/ulqda.pl63
1 files changed, 53 insertions, 10 deletions
diff --git a/Build/source/texk/texlive/linked_scripts/ulqda/ulqda.pl b/Build/source/texk/texlive/linked_scripts/ulqda/ulqda.pl
index 9590ac8368e..036c1f2a7dd 100755
--- a/Build/source/texk/texlive/linked_scripts/ulqda/ulqda.pl
+++ b/Build/source/texk/texlive/linked_scripts/ulqda/ulqda.pl
@@ -21,19 +21,21 @@ use Digest::SHA1 qw(sha1 sha1_hex sha1_base64);
sub Display_Version()
{
- print "Version: ulqda.pl [2009/05/15 v1.0 Qualitative Data Analysis package]\n\n";
+ print "Version: ulqda.pl [2009/06/11 v1.1 Qualitative Data Analysis package]\n\n";
exit;
}
sub Display_Usage()
{
print<<"EOF";
-Usage: $0 <--list>|<--graphflat>|<--graphnet>|<--help>|<--version> \\
- [<--filter section>] [<--number-->] infile.csv outfile
+Usage: $0 \\
+ <--list>|<--graphflat>|<--graphnet>|<--cloud>|<--help>|<--version> \\
+ [<--filter section>] [<--number-->] infile.csv outfile
--filter: filter based on document section label
--graphflat: Generate GraphViz .dot output of codes (unconnected)
--graphnet: Generate GraphViz .dot output of codes (connected)
+--cloud: Generate Cloud output of codes
--help: Print this help and exit
--list: Generate LaTeX table of codes (labelled as table:qda_codes)
--number: Output quantity details
@@ -46,10 +48,15 @@ sub sort_codes_hashvalue_descending {
$codes{$b} <=> $codes{$a};
}
+sub sort_codes_alphabetic {
+ $a cmp $b;
+}
+
@colors = ("#d40000", "#e35a24", "#f67c00", "#faa800", "#ffc000", "#ffde00", "#aae900", "#62dc68", "#bbcced", "#a3bbe0", "#8aaad4", "#7299c7", "#5676b5", "#4554a3", "#2e3191", "#000472");
$result = GetOptions("number" => \$options{'n'},
"list" => \$options{'l'},
+ "cloud" => \$options{'c'},
"graphflat" => \$options{'g'},
"filter=s" => \$options{'f'},
"graphnet" => \$options{'G'},
@@ -61,9 +68,9 @@ $result = GetOptions("number" => \$options{'n'},
&Display_Version() if $options{'v'};
-if (!($options{'l'} || $options{'g'} || $options{'G'}))
+if (!($options{'c'} || $options{'l'} || $options{'g'} || $options{'G'}))
{
- print "Requires one of --list, --graphflat, --graphnet, --version or --help\n\n";
+ print "Requires one of --cloud, --list, --graphflat, --graphnet, --version or --help\n\n";
&Display_Usage()
}
@@ -88,6 +95,15 @@ if ($options{'l'})
\\label{table:qda_codes}
EOF
}
+elsif ($options{'c'})
+{
+ #
+ print FILEOUT << "EOF";
+{
+\\begin{center}
+\\noindent%
+EOF
+}
elsif ($options{'g'} || $options{'G'})
{
print FILEOUT << "EOF";
@@ -139,6 +155,15 @@ close(FILEIN);
$iterationCount = 0; $nodeCount = 0;
$maxConnections = 0; $minConnections=65535;
+if ($options{'c'})
+{
+ @key_list = (sort sort_codes_alphabetic keys %codes);
+}
+else
+{
+ @key_list = (sort sort_codes_hashvalue_descending keys %codes);
+}
+
LOOP: foreach $i (sort sort_codes_hashvalue_descending keys %codes)
{
if ($codes{$i} > $maxConnections) { $maxConnections = $codes{$i} }
@@ -148,7 +173,7 @@ LOOP: foreach $i (sort sort_codes_hashvalue_descending keys %codes)
#
# For each code, output it as requested
#
-foreach $i (sort sort_codes_hashvalue_descending keys %codes)
+foreach $i (@key_list)
{
$digest = sha1_hex($i);
@@ -156,6 +181,15 @@ foreach $i (sort sort_codes_hashvalue_descending keys %codes)
{
print FILEOUT "\\\\\n";
}
+ elsif ($options{'c'})
+ {
+ my $base = int(7 + ($codes{$i}/3));
+ my $lead = $base + 3;
+ my $raisept = int(($base - 7)/4);
+
+ if ($raisept) { print FILEOUT "\\raisebox{-${raisept}pt}";}
+ print FILEOUT "{\\fontsize{$base}{$lead}\\selectfont ";
+ }
elsif ($options{'g'} || $options{'G'})
{
$nodeCount++;
@@ -165,17 +199,20 @@ foreach $i (sort sort_codes_hashvalue_descending keys %codes)
$i =~ s/!/:/g;
print FILEOUT "$i";
- if ($options{'n'})
+ if ($options{'c'})
+ {
+ print FILEOUT "}\n";
+ }
+ elsif ($options{'n'})
{
print FILEOUT "{\\textcolor{red}{" if ($options{'l'});
print FILEOUT "($codes{$i})";
print FILEOUT "}}" if ($options{'l'});
}
- $fontSize = 15 + ((60 * $codes{$i})/$maxConnections);
-
if ($options{'g'} || $options{'G'})
{
+ $fontSize = 15 + ((60 * $codes{$i})/$maxConnections);
print FILEOUT "\", fontsize=$fontSize";
#if ($iterationCount <= 5)
{
@@ -187,7 +224,7 @@ foreach $i (sort sort_codes_hashvalue_descending keys %codes)
}
print FILEOUT "]\n";
}
- elsif (! $options{'l'} )
+ elsif (! ($options{'l'} || $options{'c'}) )
{
print FILEOUT "\n";
}
@@ -246,6 +283,12 @@ if ($options{'l'})
\\hrule
EOF
}
+elsif ($options{'c'})
+{
+ print FILEOUT << "EOF";
+\\end{center}
+EOF
+}
print FILEOUT "\n}\n";