#97 Add a command to list email addresses

Merged
daimrod merged 3 commits from daimrod/feat-cmd-list-members into FFDN/master 7 years ago
daimrod commented 8 years ago

By default, the command will list the email addresses of all members.

The option --subscribers_only can be used to list only the email addresses of subscribers. The option --offer_id OFFER_ID can be used to list only the email addresses of subscribers to the given offer.

This PR is an answer to https://code.ffdn.org/FFDN/coin/pulls/86 "Taking a broad approach".

I don't know much about optparse, but I haven't found an easy way to fusion --subscribers_only and --offer_id OFFER_ID. I would have like to make one option --subscribers [OFFER_ID], but I don't know how.

WDYT?

By default, the command will list the email addresses of all members. The option `--subscribers_only` can be used to list only the email addresses of subscribers. The option `--offer_id OFFER_ID` can be used to list only the email addresses of subscribers to the given offer. This PR is an answer to https://code.ffdn.org/FFDN/coin/pulls/86 "Taking a broad approach". I don't know much about optparse, but I haven't found an easy way to fusion `--subscribers_only` and `--offer_id OFFER_ID`. I would have like to make one option `--subscribers [OFFER_ID]`, but I don't know how. WDYT?
jocelyn commented 8 years ago
Owner

That is great :-)

A few remarks:

  • I'd suggest naming it members_email instead of emails
    1. emails is not accurate about what it does
    2. keeps compatibility for members_email users
    3. maybe ii. is not so important, so we could think about something realy explicit like list_emails or list_members.
  • bikesheding: it's more common to find --opt-style than --opt_style.

I don't know much about optparse, but I haven't found an easy way to fusion --subscribers_only and --offer_id OFFER_ID. I would have like to make one option --subscribers [OFFER_ID], but I don't know how.

I think I am going to take some time to finish my PR to switch to Django 1.8 this afternoon, Then you'll have argparse-style arguments handling instead of optparse-style; which is way better for the kind of handling you want to do.

Stay tunned ;-)

That is great :-) A few remarks: - I'd suggest naming it *members_email* instead of *emails* 1. *emails* is not accurate about what it does 2. keeps compatibility for *members_email* users 3. maybe ii. is not so important, so we could think about something realy explicit like `list_emails` or `list_members`. - bikesheding: it's more common to find `--opt-style` than `--opt_style`. > I don't know much about optparse, but I haven't found an easy way to fusion > --subscribers_only and --offer_id OFFER_ID. I would have like to make one option > --subscribers [OFFER_ID], but I don't know how. I think I am going to take some time to finish my PR to switch to Django 1.8 this afternoon, Then you'll have argparse-style arguments handling instead of optparse-style; which is way better for the kind of handling you want to do. Stay tunned ;-)
jocelyn commented 8 years ago
Owner

I think I am going to take some time to finish my PR to switch to Django 1.8 this afternoon, Then you'll have argparse-style arguments handling instead of optparse-style; which is way better for the kind of handling you want to do.

Stay tunned ;-)

PR for upgrading to Django 1.8 submitted as #99

> I think I am going to take some time to finish my PR to switch to Django 1.8 this afternoon, Then you'll have argparse-style arguments handling instead of optparse-style; which is way better for the kind of handling you want to do. > Stay tunned ;-) PR for upgrading to Django 1.8 submitted as #99
daimrod commented 7 years ago
Collaborator

Update to use argparse from django 1.8.

Add a command to list email addresses

By default, it lists all active members. The option --subscribers lists all members with an active subscription. The option --offer OFFER-ID or OFFER-REF lists all members with an active subscription to the given OFFER-ID or OFFER-REF.

Update to use argparse from django 1.8. Add a command to list email addresses By default, it lists all active members. The option `--subscribers` lists all members with an active subscription. The option `--offer OFFER-ID or OFFER-REF` lists all members with an active subscription to the given OFFER-ID or OFFER-REF.
jocelyn commented 7 years ago
Owner

testé ok, nitpicks faits IRL avec daimrod.

testé ok, nitpicks faits IRL avec daimrod.
daimrod commented 7 years ago
Collaborator

Remarques intégrées pour celles qui étaient intégrables :)

Remarques intégrées pour celles qui étaient intégrables :)
daimrod commented 7 years ago
Collaborator

Ok by JocelynD.

Ok by JocelynD.
This pull request has been merged successfully!
Sign in to join this conversation.
No Milestone
No assignee
2 Participants
Loading...
Cancel
Save
There is no content yet.