Project

General

Profile

Bug #16056

Feature #14877: Donation campaign 2018

Donor mail extraction script ignores unsubscribed

Added by Anonymous over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Fundraising
Target version:
Start date:
10/16/2018
Due date:
% Done:

100%

Feature Branch:
Type of work:
Code
Blueprint:
Starter:
Affected tool:

Description

$ ./scripts/report -p *.csv -x exclude.dat > tmp.txt 

Does not take into account the exclude list while it should.


Related issues

Related to Tails - Feature #16070: Support bash glob in donors-report Resolved 10/23/2018

History

#1 Updated by intrigeri over 1 year ago

  • Assignee changed from intrigeri to Anonymous
> $ ./scripts/report -p *.csv  > tmp.txt -x exclude.dat
> 

Does not take into account the exclude list while it should.

And what if you actually pass the -x option to the report script, e.g. with $ ./scripts/report -x exclude.dat -p *.csv > tmp.txt?

#2 Updated by Anonymous over 1 year ago

  • Assignee changed from Anonymous to intrigeri

Sorry, I copy pasted that weirdly to Redmine. I rightfully passed the option before the redirection.
And the problem persists. I would have gladly accepted that to be PEBKAC, but it's not.

#3 Updated by Anonymous over 1 year ago

  • Description updated (diff)

#4 Updated by Anonymous over 1 year ago

intrigeri wrote:

And what if you actually pass the -x option to the report script, e.g. with $ ./scripts/report -x exclude.dat -p *.csv > tmp.txt?

That does not work either. The option is ignored. And I seem to remember that exclude.dat should always be called even if one forgets to indicate that on the command line.

#5 Updated by intrigeri over 1 year ago

  • Target version set to Tails_3.10.1

After a few random tries, I've reproduced this with ./scripts/report -p data/PayPal_Zwiebelfreunde_2014-08-11_to_2015-12-31.csv . Next time, please share an exact reproducer (expanding shell globs because I don't know what *.csv is for you, telling me what excluded email address you see in the output), so I don't have to guess :)

Now diving into the code to find the bug!

In passing, note that -p *.csv is incorrect and won't do what you think if *.csv expands to 2 files or more. You need to pass -p once per input file:

    -p --paypal_file: Array of Strings
        Input file to process (CSV exported by PayPal); use this option once
        per such input file.

#6 Updated by intrigeri over 1 year ago

  • Status changed from Confirmed to In Progress
  • Assignee changed from intrigeri to Anonymous
  • % Done changed from 0 to 50
  • QA Check set to Ready for QA

It's now fixed for me, please confirm :)

#7 Updated by Anonymous over 1 year ago

intrigeri wrote:

After a few random tries, I've reproduced this with ./scripts/report -p data/PayPal_Zwiebelfreunde_2014-08-11_to_2015-12-31.csv . Next time, please share an exact reproducer (expanding shell globs because I don't know what *.csv is for you, telling me what excluded email address you see in the output), so I don't have to guess :)

Sorry. Grepping the email address I've sent via -fundraising in these files would have helped finding out which file has been used for our donation campaign. It was files linked to Riseup, btw. I did not add this information here because I did not want to leak the contents of my folder setup nor exact filenames.

Now diving into the code to find the bug!

In passing, note that -p *.csv is incorrect and won't do what you think if *.csv expands to 2 files or more. You need to pass -p once per input file.

It was just an example. But thanks for clarifying that anyway.

#8 Updated by sajolida over 1 year ago

  • Parent task set to #14877

Making this as part of the donation campaign.

#9 Updated by sajolida over 1 year ago

#10 Updated by Anonymous over 1 year ago

  • Status changed from In Progress to Resolved
  • % Done changed from 50 to 100
  • QA Check changed from Ready for QA to Pass

It works.

Also available in: Atom PDF