[kde-edu]: KDE/kdeedu/kstars/kstars

Jason Harris kstars at 30doradus.org
Fri Oct 12 16:40:29 CEST 2007


SVN commit 724519 by harris:

Fixing error in parsing stars data file.  The file is now named 
stars.dat, and the format changed slightly.  I am now using awk 
instead of perl to parse the name.

Also, the ngcic data files have been concatenated into a single 
file (ngcic.dat).

Thanks for pointing this out, Burkhard.

CCMAIL: kde-edu at kde.org



 M  +3 -2      Messages.sh  


--- trunk/KDE/kdeedu/kstars/kstars/Messages.sh #724518:724519
@@ -39,9 +39,10 @@
 sort --unique info_url.tmp >> kstars_i18n.cpp
 
 # star names : some might be different in other languages, or they might have to be adapted to non-Latin alphabets
-cat data/hip*.dat | perl -e 'while ( $line=<STDIN> ) { $starname = substr ($line,72);    chop $starname; if ( $starname =~ /(.*)\:/ ) { $starname = $1 . " ";   }   if ( $starname =~ /(.*\w)(\s+)/) { $starname = $1;	$starnames{$starname} = 1;   } } foreach $star( sort keys %starnames) { printf "i18nc(\"star name\",\"%s\");\n", $star; }' >> kstars_i18n.cpp;
+cat data/stars.dat | gawk 'BEGIN { FS=","; } ($1!~/\#/ && NF==3) { print $3; }' >> kstars_i18n.cpp;
+
 # extract deep-sky object names (sorry, I don't know perl-fu ;( ...using AWK )
-cat data/ngcic*.dat | gawk '{ split(substr( $0, 77 ), name, " "); \
+cat data/ngcic.dat | gawk '{ split(substr( $0, 77 ), name, " "); \
 if ( name[1]!="" ) { \
 printf( "%s", name[1] ); i=2; \
 while( name[i]!="" ) { printf( " %s", name[i] ); i++; } \


More information about the kde-edu mailing list