Open matbech opened 6 years ago
Please be aware that the terminology for account is a https://postcardcreator.post.ch/ account, whereas sender is the sender of the postcard.
Instead of 2 new flags, we should add a single one to overwrite/ set the recipient of the postcard. One can send postcards to multiple recipients by issuing postcards with different --recipient-file
s
The following steps are a sound approach to me:
--recipient-file
to link to a json file which contains the recipient object--recipient-file
: if the recipient is specified in --config <file>
, the recipient set via --recipient-file
is used.--config
needs to permit no recipient if a recipient is set via --recipient-file
I flagged this as a feature so we can cover it the next major release.
If your usecases require more sophisticated, "address book" like functionality, i suggest you use the Rest API wrapper directly https://github.com/abertschi/postcard_creator_wrapper.
Until then, you could create a small script that generates aconfig.json
on the fly by including recipients from different files based on input flags.
My use case is one post account with multiple recipients. Hence, it would be nice if the recipient config could be separated from the account/sender config file. Possibly, in a "address book" like config file. --account "account.conf" --recipient "recipient.conf" This way I don't have to duplicate the account/sender information in every config file.