Commit graph

414 commits

Author SHA1 Message Date
Bradley M. Kuhn
96d75986f2 Also ask for who 2022-06-21 10:14:49 -07:00
Bradley M. Kuhn
c2b01e6d97 Fix bug where it prints out every single entry when criterion wrong 2022-06-21 10:14:26 -07:00
Bradley M. Kuhn
022a41c131 More verbose output for requests and postal addresses. 2022-06-21 10:10:26 -07:00
Bradley M. Kuhn
fe4aa69763 Add ticket number as an option. 2022-06-21 10:09:41 -07:00
Bradley M. Kuhn
f6b0ac1903 Add field for invalid postal addresses 2022-06-21 10:09:27 -07:00
Bradley M. Kuhn
aece96946d Allow search by Supporter only. 2022-06-21 10:08:25 -07:00
Bradley M. Kuhn
36c1d11d1f Include Carp 2022-06-21 10:08:00 -07:00
Bradley M. Kuhn
ed4a2c1aea Correct function call; this is not a variable! 2022-06-21 10:07:45 -07:00
Bradley M. Kuhn
3d83a8e546 Add id as part of return for postalAddress addition. 2022-06-21 09:58:57 -07:00
Bradley M. Kuhn
6d143082de Add method: getBestPostalAddress 2022-06-21 09:55:37 -07:00
Bradley M. Kuhn
391fb0d3f2 support is_supporter setting, add findSupporter method. 2021-04-18 15:29:48 -07:00
Bradley M. Kuhn
fdf58bb729 fulfillFailure: fix reason message to include more data; add who
'who' is now a possible parameter, but default it the old way so it's
not mandatory, and improve the reason message on failures.
2021-02-20 13:02:49 -08:00
Bradley M. Kuhn
839799beac Various improvements to mass supporter email script.
These were an omnibus set of changes that I made during the FY 2020
fundraising season.  Changes include:

  * support BeanCount for query of amounts given.
  * better UTF-8 support
  * use variable for the total groups
  * use postal address to see if someone is USA based
  * commented out code for annual renewal notice, we may want that later
  * Include supporter id and rt ticket in output

Note that for each mailing, the groups code is still modified by hand
here.
2021-02-17 10:45:33 -08:00
Bradley M. Kuhn
a1ade5c8fa Print date postal address was encountered. 2021-02-17 10:43:40 -08:00
Bradley M. Kuhn
b16b4661ab Improve UTF-8-ness on a few scripts. 2021-02-17 10:43:26 -08:00
Bradley M. Kuhn
16ce9f4bf1 addPostalAddress: additional argument to set date_encountered 2021-02-11 11:58:55 -08:00
Bradley M. Kuhn
9a54b77881 Display RT ticket for find supporter. 2021-02-10 14:25:40 -08:00
Bradley M. Kuhn
60260bd59c Supporters db: add rt_ticket field. 2021-01-13 12:04:05 -08:00
Bradley M. Kuhn
36592c9747 Correct typo in error message. 2020-12-22 16:31:52 -08:00
Bradley M. Kuhn
0c477cf4da Convert to work with Beancount; constructor takes a filehandle now
The output format for donations changed slightly when we switched to
Beancount at Conservancy from Ledger CLI.  This change now assumes a
specific format of the output for the donations, and takes a
filehandle in the constructor to receive the data.

As such, this effectively makes it slightly less dependent on any
specific donation database, since as long as you can get it into the
format the regex herein expects onto a filehandle, it doesn't matter
what system you use underneath.
2020-12-22 16:31:37 -08:00
Bradley M. Kuhn
81352e70b4 Convert to allow command line options instead of prompting.
Prompting code is left in place however if CLI options aren't given.

Also, added a check to verify supporter id is valid.
2020-12-22 16:25:50 -08:00
Bradley M. Kuhn
8dbc9b2ec6 Actually I think I want a slightly longer sleep.
This should be a command line option.
2019-12-24 09:24:15 -08:00
Bradley M. Kuhn
5cc57f451e Changes for our groups in mailing 3 FY 2019. 2019-12-24 09:23:33 -08:00
Bradley M. Kuhn
8985765760 Operate in utf8 for STDOUT. 2019-12-24 09:23:15 -08:00
Bradley M. Kuhn
102b1f8468 Shorten sleep time 2019-12-24 09:23:04 -08:00
Bradley M. Kuhn
60fa54814c Correct display name details. 2019-12-24 09:22:48 -08:00
Bradley M. Kuhn
ab9e3fbde0 Fix compile command for Emacs. 2019-12-11 07:36:12 -08:00
Bradley M. Kuhn
04e706e1fc Restore FIXME_ variables loop and add FIXME_DISPLAYNAME
THis code originally had variable replacement like this, but when the inputs
started to be be fully MIME-encoded without any plain text, that stopped
working.  Inputs we're using have that now, so this works again, and thus
this feature is restored.
2019-12-11 07:36:03 -08:00
Bradley M. Kuhn
a1b7dc5458 Various improvements to script
I wrot ethese a while ago.
2019-12-10 09:40:06 -08:00
Bradley M. Kuhn
8f6bd0e563 Handle multiple addresses. 2019-12-10 09:38:20 -08:00
Bradley M. Kuhn
f9e94aec25 Add YAML output. 2019-12-10 09:38:02 -08:00
Bradley M. Kuhn
c2443bfcf7 Rework to handle multiple t-shirt designs. 2019-12-10 09:37:38 -08:00
Bradley M. Kuhn
2e45e52e01 Add license notice. 2019-12-10 09:37:19 -08:00
Bradley M. Kuhn
46ca0efb12 Different folks send shirts. 2019-12-10 09:36:59 -08:00
Bradley M. Kuhn
56e6716248 Various changes for proper email selection and encoding. 2019-12-10 09:36:38 -08:00
Bradley M. Kuhn
2cde8096a9 Begin work on delivery_error database tables.
No code supports this yet, IIRC.
2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
84a73aa0f6 Support amounts. 2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
51d0db3fab Add tests for Preferred email addresses. 2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
4e765fd8a3 Time HiRes module is needed. 2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
fa6aa31801 Add additional years. 2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
0e1ace2f76 Rework email address selection. 2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
f50c4d6053 paperMailOk: correct contact-setting typo. 2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
270e9d40bf First draft of category mailing. 2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
a41b53f78d Finish t-shirt-print-need script. 2019-12-10 09:35:16 -08:00
Bradley M. Kuhn
a301716263 New script: t-shirt-print-need
Just prints a list of t-shirts we need.
2019-12-10 09:35:16 -08:00
Brett Smith
8cffed1c68 donors2csv: Check for import errors as early as possible.
This has to be done before argument parsing because that uses
import2ledger.strparse.
2018-06-01 11:13:21 -04:00
Brett Smith
2e2c783657 python: Add donors2csv script. 2018-05-31 16:19:50 -04:00
Denver Gingerich
4d3b8b0673 models: flexible returning supporter mth count API
Rename months_expired() to months_expired_at_return() and have the
method return an integer representing the month count rather than an
enum-like so that the API user has more flexibility with respect to
what they then do with the result.  Thanks to Brett for the review
that suggested this, and for much of the clever math in this change.

The results produced by returning_report.py (which is updated here to
use the new API) are almost identical to the results produced before
the change.  In rare cases (about 2-5% of the time) a supporter's
lapsed month count will fall into an adjacent bucket instead of the
one it fell into before, usually because the previous result was wrong
to begin with (due to the ugly days-per-3-months table that we used
previously, which this change thankfully eliminates).
2018-01-25 17:03:09 -05:00
Denver Gingerich
6ab6441e14 python: report front-end for returning supporters
A reporting script similar to status_report.py that uses the new
returning supporter method (added in 7aaba96) to provide a list of
how many supporters have started supporting again after lapsing,
bucketed by the number of months for which they had been lapsed.
2018-01-25 17:03:09 -05:00
Denver Gingerich
0d3d9db4ed models: add months returning supporter had lapsed
A new public method, months_expired(), which is similar to the
existing status() in layout, but instead of returning whether the
supporter is new/active/lapsed/etc., it checks to see whether the
supporter is returning after having been lapsed, and if so, returns
the month range corresponding to how long they had been lapsed before
returning as a supporter in the current month.
2018-01-25 17:03:09 -05:00