-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclimage.cpp
More file actions
33 lines (26 loc) · 711 Bytes
/
Copy pathclimage.cpp
File metadata and controls
33 lines (26 loc) · 711 Bytes
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
27
28
29
30
31
32
33
// MIT License
//
// Copyright (c) 2021 Ferhat Geçdoğan All Rights Reserved.
// Distributed under the terms of the MIT License.
//
// climage - an image format for commandline.
//
// github.com/ferhatgec/climage
//
#include "include/climage.hpp"
#include <fstream>
int main(int argc, char** argv) noexcept {
if(argc < 2) {
std::cout << "climage - an image format for commandline\n"
"\n" <<
argv[0] << " {file}\n";
return 1;
}
std::ifstream file(argv[1]);
std::string data;
for(std::string temp; std::getline(file, temp); data.append(temp + "\n"))
; file.close();
climage x;
x.parse(data);
x.generate();
}