~fuzzgun/emailgraph/trunk-1

« back to all changes in this revision

Viewing changes to emailgraph.c

  • Committer: Bob Mottram
  • Date: 2011-09-05 21:55:43 UTC
  • Revision ID: fuzzgun@gmail.com-20110905215543-3vdnljur12l79z3l
Ability to print sentences

Show diffs side-by-side

added added

removed removed

Lines of Context:
60
60
  int day_histogram[24];
61
61
  int week_histogram[24*7];
62
62
  int retval,linewidth=10;
 
63
  int sentence_dump=0;
63
64
  filename_list * filenames=NULL, * next_filename;
64
65
  int mnth;
65
66
  time_t current_time;
161
162
    if ((strcmp(argv[i],"-t")==0) || (strcmp(argv[i],"--top")==0)) {
162
163
      printtop=1;
163
164
    }
 
165
    if ((strcmp(argv[i],"-s")==0) || (strcmp(argv[i],"--sentences")==0) || (strcmp(argv[i],"--sentence")==0)) {
 
166
      sentence_dump=1;
 
167
    }
164
168
    if ((strcmp(argv[i],"-i")==0) || (strcmp(argv[i],"--inf")==0) || (strcmp(argv[i],"--influence")==0) || (strcmp(argv[i],"--influential")==0)) {
165
169
      printinfluence=1;
166
170
    }
434
438
                 (char*)mailbox_filename, contact_list, start_date, 
435
439
                 end_date, start_hour, end_hour,
436
440
                 (int*)month_histogram, (int*)year_histogram, 
437
 
                 (int*)day_histogram, (int*)week_histogram, keywords, gender,corpus);
 
441
                 (int*)day_histogram, (int*)week_histogram, keywords, gender,corpus,sentence_dump);
438
442
  }
439
443
  else {
440
444
    if (filenames!=NULL) {
444
448
                     (char*)(next_filename->filename), contact_list, 
445
449
                     start_date, end_date, start_hour, end_hour,
446
450
                     (int*)month_histogram, (int*)year_histogram, 
447
 
                     (int*)day_histogram, (int*)week_histogram, keywords, gender,corpus);
 
451
                     (int*)day_histogram, (int*)week_histogram, keywords, gender,corpus,sentence_dump);
448
452
        next_filename = (filename_list*)(next_filename->next);
449
453
      }
450
454
    }
586
590
                         year_histogram);    
587
591
    }
588
592
 
589
 
    if ((printcontacts==0) && (printdot==0) &&
 
593
    if ((printcontacts==0) && (printdot==0) && (sentence_dump==0) &&
590
594
        (monthly==0) && (yearly==0) && (annual==0) && (daily==0) && (weekly==0) &&
591
595
        (plot_daily[0]=='\0') && (plot_weekly[0]=='\0') && (plot_monthly[0]=='\0') &&
592
596
        (plot_yearly[0]=='\0') && (printtop==0)) {