#97 Add a command to list email addresses

Fusionné
daimrod a fusionné 3 commits à partir de daimrod/feat-cmd-list-members vers FFDN/master il y a 7 ans
daimrod a commenté il y a 8 ans

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 a commenté il y a 8 ans
Propriétaire

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 a commenté il y a 8 ans
Propriétaire

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 a commenté il y a 7 ans
Collaborateur

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 a commenté il y a 7 ans
Propriétaire

testé ok, nitpicks faits IRL avec daimrod.

testé ok, nitpicks faits IRL avec daimrod.
daimrod a commenté il y a 7 ans
Collaborateur

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

Remarques intégrées pour celles qui étaient intégrables :)
daimrod a commenté il y a 7 ans
Collaborateur

Ok by JocelynD.

Ok by JocelynD.
Cette Pull Request a été fusionnée avec succès !
Connectez-vous pour rejoindre cette conversation.
Aucun jalon
Pas d'assignataire
2 Participants
Chargement…
Annuler
Enregistrer
Il n'existe pas encore de contenu.