Menu

#7 extractContact command is incomplete

1.0
closed
Defect (5)
2020-01-10
2020-01-06
No

Only show the first email's sender and receiver, the code isn't complete. The group didn't realize this function.

.command('extractContact', 'Extract contact from a list of mail')
        .argument('<file>', 'The file to check with Vpf parser')
        .action(function(args, options, logger){

            fs.readdir(args.file, 'utf8', function (err,data) {
                if (err) {
                    return logger.warn(err);
                }
                let analyzer = new MailParser(options.showTokenize, options.showSymbols);
                let parsedDataFunction = new ParsedDataFunction(analyzer);

                parsedDataFunction.createListOfMailFromDir(args.file);
                console.log(analyzer.parsedMail[0].to)
                for (let i = 0; i < analyzer.parsedMail.length; i++) {
                   // Output error, code incomplete,always output the first mail 
                    console.log(analyzer.parsedMail[0].dateTime);
                 // console.log(analyzer.parsedMail[i].to);
                }

        });

Discussion

  • Zhao Mingqiang

    Zhao Mingqiang - 2020-01-06
    • assigned_to: Zhao Mingqiang
     
  • Zhao Mingqiang

    Zhao Mingqiang - 2020-01-06
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1 @@
    -Only show the first email&#39;s sender and receiver, the code isn&#39;t complete
    +Only show the first email&#39;s sender and receiver, the code isn&#39;t complete. The  group didn&#39;t realize this function.
    
     
  • Zhao Mingqiang

    Zhao Mingqiang - 2020-01-06
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1 +1,23 @@
     Only show the first email&#39;s sender and receiver, the code isn&#39;t complete. The  group didn&#39;t realize this function.
    +~~~
    +.command(&#39;extractContact&#39;, &#39;Extract contact from a list of mail&#39;)
    +       .argument(&#39;&lt;file&gt;&#39;, &#39;The file to check with Vpf parser&#39;)
    +       .action(function(args, options, logger){
    +
    +           fs.readdir(args.file, &#39;utf8&#39;, function (err,data) {
    +               if (err) {
    +                   return logger.warn(err);
    +               }
    +               let analyzer = new MailParser(options.showTokenize, options.showSymbols);
    +               let parsedDataFunction = new ParsedDataFunction(analyzer);
    +
    +               parsedDataFunction.createListOfMailFromDir(args.file);
    +               console.log(analyzer.parsedMail[0].to)
    +               for (let i = 0; i &lt; analyzer.parsedMail.length; i++) {
    +                   // Output error, code incomplete,always output the first mail 
    +                   console.log(analyzer.parsedMail[0].dateTime);
    +                // console.log(analyzer.parsedMail[i].to);
    +               }
    +
    +       });
    +~~~
    
     
  • Zhao Mingqiang

    Zhao Mingqiang - 2020-01-06
    • status: open --> closed
     
  • Zhao Mingqiang

    Zhao Mingqiang - 2020-01-06

    already complete the code, problem solved

     

    Last edit: Zhao Mingqiang 2020-01-06
  • ZHOU HUHENG

    ZHOU HUHENG - 2020-01-10
    • labels: --> Defect
     

Log in to post a comment.