Igor Gariev (gariev) wrote in changelog,
Igor Gariev
gariev
changelog

[livejournal] r16115: LJSUP-5419: Collect 2 polls results and ...

Committer: gariev
LJSUP-5419: Collect 2 polls results and users info
U   trunk/bin/misc/dump-poll.pl
Modified: trunk/bin/misc/dump-poll.pl
===================================================================
--- trunk/bin/misc/dump-poll.pl	2010-01-21 09:57:25 UTC (rev 16114)
+++ trunk/bin/misc/dump-poll.pl	2010-01-21 10:27:46 UTC (rev 16115)
@@ -86,10 +86,10 @@
 
     ## print header (3 lines):
     ## poll ID
-    ## userid, username, gender, birthday, question1, question1, question2, question2
-    ## -     , -       , -     , -       , answer11,  answer12,  answer21,  answer22...
+    ## userid, username, gender, birthday, city, question1, question1, question2, question2
+    ## -     , -       , -     , -       , -   , answer11,  answer12,  answer21,  answer22...
     print "Pollid = $pollid\n";
-    print "Userid\tusername\tgender\tbirthday\t";
+    print "Userid\tusername\tgender\tbirthday\tcity\t";
     foreach my $q (@questions) {
         if ($q->{type} eq 'radio') {
             ## one answer only
@@ -102,7 +102,7 @@
         }
     }
     print "\n";
-    print "\t\t\t\t";
+    print "\t\t\t\t\t";
     foreach my $q (@questions) {
         if ($q->{type} eq 'radio') {
             ## one answer only
@@ -123,8 +123,9 @@
         my $u = LJ::load_userid($userid);
         print "$userid\t";
         print "$u->{user}\t";
-        print $u->prop('gender'), "\t";
+        print $u->prop('gender')||'', "\t";
         print $u->{'bdate'}||'', "\t";
+        print $u->prop('city')||'', "\t";
         foreach my $q (@questions) {
             my $r = $users{$userid}->{ $q->{pollqid} };
             if ($q->{type} eq 'radio') {

Tags: gariev, livejournal, pl
Subscribe

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments