-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
531 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
// Copyright © 2023 Alexandre Coderre-Chabot | ||
// | ||
// This file is licensed under the MIT license. For more information, visit: | ||
// https://mit-license.org | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// - The above copyright notice and this permission notice shall be included | ||
// in all copies or substantial portions of the Software. | ||
// - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN | ||
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | ||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
// USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
// | ||
// This file was originally obtained from: | ||
// https://github.com/acodcha/secret-santa | ||
|
||
#ifndef SECRET_SANTA_MESSENGER_ARGUMENT_HPP | ||
#define SECRET_SANTA_MESSENGER_ARGUMENT_HPP | ||
|
||
#include <string> | ||
#include <string_view> | ||
|
||
namespace SecretSanta::Messenger::Argument { | ||
|
||
namespace Key { | ||
|
||
// Prints usage instructions and exits. Optional. | ||
static const std::string Help{"--help"}; | ||
|
||
// Path to the YAML configuration file to be read. Required. | ||
static const std::string Configuration{"--configuration"}; | ||
|
||
// Path to the YAML matchings file to be read. Required. | ||
static const std::string Matchings{"--matchings"}; | ||
|
||
} // namespace Key | ||
|
||
namespace Value { | ||
|
||
// Filesystem path. | ||
static const std::string Path{"<path>"}; | ||
|
||
} // namespace Value | ||
|
||
// Prints usage instructions and exits. Optional. | ||
std::string_view Help() { | ||
return Key::Help; | ||
} | ||
|
||
// Path to the YAML configuration file to be read. Required. | ||
std::string Configuration() { | ||
return Key::Configuration + " " + Value::Path; | ||
} | ||
|
||
// Path to the YAML matchings file to be read. Required. | ||
std::string Matchings() { | ||
return Key::Matchings + " " + Value::Path; | ||
} | ||
|
||
} // namespace SecretSanta::Messenger::Argument | ||
|
||
#endif // SECRET_SANTA_MESSENGER_ARGUMENT_HPP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
// Copyright © 2023 Alexandre Coderre-Chabot | ||
// | ||
// This file is licensed under the MIT license. For more information, visit: | ||
// https://mit-license.org | ||
// | ||
// Permission is hereby granted, free of charge, to any person obtaining a copy | ||
// of this software and associated documentation files (the "Software"), to deal | ||
// in the Software without restriction, including without limitation the rights | ||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
// copies of the Software, and to permit persons to whom the Software is | ||
// furnished to do so, subject to the following conditions: | ||
// - The above copyright notice and this permission notice shall be included | ||
// in all copies or substantial portions of the Software. | ||
// - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS | ||
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN | ||
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, | ||
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR | ||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE | ||
// USE OR OTHER DEALINGS IN THE SOFTWARE. | ||
// | ||
// This file was originally obtained from: | ||
// https://github.com/acodcha/secret-santa | ||
|
||
#ifndef SECRET_SANTA_MESSENGER_PROGRAM_HPP | ||
#define SECRET_SANTA_MESSENGER_PROGRAM_HPP | ||
|
||
#include <string> | ||
|
||
namespace SecretSanta::Messenger::Program { | ||
|
||
// Title of the Secret Santa Messenger program. | ||
static const std::string Title{"Secret Santa Messenger"}; | ||
|
||
// Date and time at which the Secret Santa Messenger program was compiled. | ||
static const std::string CompilationDateAndTime{ | ||
std::string{__DATE__} + ", " + std::string{__TIME__}}; | ||
|
||
// Description of the Secret Santa Messenger program. | ||
static const std::string Description{ | ||
"Organizes a \"Secret Santa\" gift exchange event! Reads a YAML " | ||
"configuration file containing a list of participants and the YAML " | ||
"matchings file generated by the Secret Santa Randomizer and sends email " | ||
"messages to each participant informing them of their assigned giftee and " | ||
"containing instructions for the Secret Santa event."}; | ||
|
||
} // namespace SecretSanta::Messenger::Program | ||
|
||
#endif // SECRET_SANTA_MESSENGER_PROGRAM_HPP |
Oops, something went wrong.