// This file is part of Motion Watch. // Motion Watch is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // Motion Watch is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. #include "web.h" void genHTMLul(const string &outputDir, const string &title) { DIR *dir; struct dirent *ent; vector regNames; vector dirNames; string htmlText = "\n"; htmlText += "\n"; htmlText += "\n"; htmlText += "

" + title + "

\n"; htmlText += "\n"; htmlText += "\n"; htmlText += ""; ofstream file(string(cleanDir(outputDir) + "/index.html").c_str()); file << htmlText << endl; file.close(); } void genHTMLvid(const string &outputVid, shared_t *share) { auto filename = path(outputVid).filename().string(); auto filePath = path(outputVid).parent_path().string(); string htmlText = "\n"; filename = replaceAll(filename, share->vidExt, "html"); htmlText += "\n"; htmlText += "\n"; htmlText += "\n"; htmlText += "\n"; htmlText += ""; ofstream file(string(cleanDir(filePath) + "/" + filename + ".html").c_str()); file << htmlText << endl; file.close(); }