summaryrefslogtreecommitdiffstats
path: root/Src/main.cpp
blob: d1b8dfe04d4fb033116d4da280b859261d76df0a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#include <iostream>
#include "LibUwu.h"

int main(int argc, char** argv) {

    // We have arguments. Uwwuifie these instead
    if (argc > 1)
    {
        // We have to put the args together first, because some replace-rules cross word-borders
        std::stringstream  ss;
        for (std::size_t i = 1; i < argc; i++)
            ss << std::string(argv[i]) + " ";

        std::cout << MakeUwu(ss.str()) << std::endl;
    }

    // Else, be prepared to get __piped__
    else
    {
        std::string buf;
        while (std::getline(std::cin, buf))
            std::cout << MakeUwu(buf) << std::endl;
    }

    return 0;
}