// // Created by quentin on 1/8/23. // #include "mainOptHandler.h" #include using namespace Budget::OptHandlers; MainOptHandler::MainOptHandler(const std::vector &argv) { } void MainOptHandler::help() { std::cout << "Output of budget." << std::endl; std::cout << "Usage:" << std::endl; std::cout << "\tbudget [options] ..." << std::endl; std::cout << "Actions:" << std::endl; std::cout << "\t-h --help\t\t\t\tPrints this." << std::endl; std::cout << "\t-a --account<=STRING>\tManagement tools for an account." << std::endl; std::cout << "\t-c --create<=STRING>\tCreates a new account with NAME." << std::endl; std::cout << "\t-e --earn<=STRING>\t\tAdd an earning to an account." << std::endl; std::cout << "\t-p --payment<=STRING>\tAdd a payment to an account." << std::endl; std::cout << "Account Options: [-dDv]" << std::endl; std::cout << "\t-d --delete\t\t\t\tDeletes specified account." << std::endl; std::cout << "\t--force-delete\t\t\tDeletes the specified account without confirmation." << std::endl; std::cout << "\t-v --value\t\t\t\tGets the current value of the account." << std::endl; std::cout << "\t-D --description\t\tChanges the description of the account." << std::endl; std::cout << "Create Options: [-d]" << std::endl; std::cout << "\t-d --description\t\tSets a description for an account." << std::endl; std::cout << "Earn Options: -v [-drD]" << std::endl; std::cout << "\t-v --value=\t\tValue for earning." << std::endl; std::cout << "\t-d --description=\tDescription for earning." << std::endl; std::cout << "\t-r --receipt=\t\tPath to file to store in DB as receipt." << std::endl; std::cout << "\t-D --date=
\tDate as dd/mm/yyyy. Default will be today." << std::endl; std::cout << "\t-t --time=\t\t24 hour time as hh/mm/ss. Default will be now." << std::endl; std::cout << "Payment Options: -v [-drD]" << std::endl; std::cout << "\t-v --value=\t\tValue for payment." << std::endl; std::cout << "\t-d --description=\tDescription for payment." << std::endl; std::cout << "\t-r --receipt=\t\tPath to file to store in DB as receipt." << std::endl; std::cout << "\t-D --date=\t\tDate as dd/mm/yyyy. Default will be today." << std::endl; std::cout << "\t-t --time=\t\t24 hour time as hh/mm/ss. Default will be now." << std::endl; std::cout << std::endl; std::cout << "Arguments are processed like blocks with each one terminated by the next Action. For example" << std::endl; std::cout << std::endl; std::cout << R"(budget -cAcct -eAcct -v10.00 -r"./receipt.pdf" -pAcct -v5.50 -r"./payment.pdf")" << std::endl; std::cout << std::endl; std::cout << "Does the following in order:" << std::endl; std::cout << "Creates an account named Acct with no description." << std::endl; std::cout << "Earns 10.00 to it with a receipt." << std::endl; std::cout << "Pays 5.50 to it with a receipt." << std::endl; }