public void Process() { var pipelineText = _context.GetPipelineText <TextSegment>(); var filename = _context.CreateGlobalInstance <InjectFilename>(); filename.Filename = _context.Basename; var artigos = pipelineText .ConvertText <CreateTaggedSegments, TextTaggedSegment>() .ConvertText <TransformConteudo4, Conteudo>() .ConvertText <TransformArtigo2, Artigo>() .LogFiles <GenerateArtigoTmp>($"{_context.OutputFolder}/{_context.Basename}/artigos/{_context.Basename}-artigo{{0}}.xml") .LogFiles <GenerateArtigoGN4>($"{_context.OutputFolder}/{_context.Basename}/artigosGN4/{_context.Basename}-artigo{{0}}.xml") .ToList(); _context.AddOutput("artigosGN", $"{_context.OutputFolder}/{_context.Basename}/artigos/{_context.Basename}-artigo{{0}}.xml"); _context.AddOutput("artigosGN4", $"{_context.OutputFolder}/{_context.Basename}/artigosGN4/{_context.Basename}-artigo{{0}}.xml"); }
public void Process() { string basename = _context.Basename; Pipeline pipeline = _context.GetPipeline(); var page = pipeline.Input($"{_context.InputFilePrefix}.pdf") .Page(1) .ParsePdf <ProcessPdfText>() .ParseBlock <ExtractDouHeaderInfo>(); var extract = page.CreateInstance <ExtractDouHeaderInfo>(); var infoStats = extract.InfoStats; string content = infoStats.ToString(); var filename = _context.CreateGlobalInstance <InjectFilename>(); filename.Filename = _context.Basename; filename.InfoStats = infoStats; _context.WriteFile("header", $"{_context.OutputFilePrefix}-header.txt", content); }