#include "docwire.h"
 
int main(int argc, char* argv[])
{
using namespace docwire
std::filesystem::path("1.pst") | content_type::detector{} |
mail_parser{} | office_formats_parser{}
| [](Tag&& tag, const emission_callbacks& emit_tag) // Create an input from file path, parser and connect them to transformer
{
if (std::holds_alternative<tag::Mail>(tag)) // if current node is mail
{
auto subject = std::get<tag::Mail>(tag).subject // get the subject attribute
if (subject) // if subject attribute exists
{
if (subject->find("Hello") != std::string::npos) // if subject contains "Hello"
{
return continuation::skip // skip the current node
}
}
}
return emit_tag(std::move(tag))
}
| PlainTextExporter() // sets exporter to plain text
| std::cout
return 0
}
posted on 2025-07-05 10:08  北京开发  阅读(5)  评论(0)    收藏  举报