-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.cpp
More file actions
34 lines (25 loc) · 801 Bytes
/
main.cpp
File metadata and controls
34 lines (25 loc) · 801 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
34
#include <fstream>
#include <iostream>
#include <vector>
#include "utils.hpp"
#include "citation.h"
std::vector<Citation*> loadCitations(const std::string& filename) {
// FIXME: load citations from file
}
int main(int argc, char** argv) {
// "docman", "-c", "citations.json", "input.txt"
auto citations = loadCitations(argv[2]);
std::vector<Citation*> printedCitations{};
// FIXME: read all input to the string, and process citations in the input text
// auto input = readFromFile(argv[3]);
// ...
std::ostream& output = std::cout;
// output << input; // print the paragraph first
// output << "\nReferences:\n";
for (auto c : printedCitations) {
// FIXME: print citation
}
for (auto c : citations) {
delete c;
}
}