Way to many changes, new start

This commit is contained in:
willifan 2024-04-01 15:24:03 +02:00
parent 63904bec07
commit a95d18c761
25 changed files with 1799 additions and 334 deletions

BIN
scripts/test/test Executable file

Binary file not shown.

43
scripts/test/test.cpp Normal file
View file

@ -0,0 +1,43 @@
#include <filesystem>
#include <iostream>
#include <string>
#include <fstream>
namespace fs = std::filesystem;
const std::string dir = "/usr/share/applications";
int main(int argc, char const *argv[])
{
for (const auto& entry : fs::directory_iterator(dir))
{
if (entry.path().extension() == ".desktop")
{
std::ifstream file(entry.path());
if (!file.is_open())
{
std::cerr << "file not opened" << std::endl;
return 1;
}
std::string output;
std::string line;
while (std::getline(file, line))
{
output += line + "\n";
}
std::cout << output << std::endl;
file.close();
}
}
return 0;
}