From a63e62610ed79d43af38669fb6a4f6c9319f5bfe Mon Sep 17 00:00:00 2001 From: Moon <108756201+LifeAdventurer@users.noreply.github.com> Date: Wed, 4 Oct 2023 00:07:24 +0800 Subject: [PATCH] Add files via upload --- generate_quotes_json.cpp | 49 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 generate_quotes_json.cpp diff --git a/generate_quotes_json.cpp b/generate_quotes_json.cpp new file mode 100644 index 0000000..2141af5 --- /dev/null +++ b/generate_quotes_json.cpp @@ -0,0 +1,49 @@ +/** _ ___ _ + * | | _ / _| | | _ + * | | |_| | | _____ ____ ___| |__ __ _____ _____ | | _ _ ____ _____ ____ + * author: | | _ [ ]/ _ \ / _ \ / _ |\ \ / // _ \| _ \[ ] | | | || __|/ _ \| __| + * | L__ | | | | | ____| | |_\ \ | |_| | \ \/ / | ____|| | | | | |_ | |_| || / | ____|| / + * L____||_| |_| \_____| \____\_\\_____/ \__/ \_____||_| |_| |___|\_____/|_| \_____||_| + * + * Life is an adventure. Be adventurous. + * + * created: 02.10.2023 01:14:44 + * +**/ +#include +#include + +using namespace std; + +#ifdef LOCAL +#include "algo/debug.h" +#else +#define debug(...) 42 +#endif + +int main() { + ios_base::sync_with_stdio(false); + cin.tie(0); + + freopen("C:\\Users\\Life Adventurer\\Desktop\\Develop\\Quote_Generator\\quote_input.txt", "r", stdin); + freopen("C:\\Users\\Life Adventurer\\Desktop\\Develop\\Quote_Generator\\quote_output.txt", "w", stdout); + + string quote, author; + while(true){ + getline(cin, quote); + if(quote == "EOF") break; + getline(cin, author); + cout << "{\n"; + cout << " \"quote\": \"" << quote << "\",\n"; + cout << " \"author\": \"" << author << "\"\n"; + cout << "},\n"; + } + + return 0; +} + +/** + * "To stop trying is never the solution." + * "You are not alone. Lord have your way." + * "Failure is another blessing. Only by accepting it calmly can it bring growth." +**/ \ No newline at end of file