Пример #1
0
        public static Dictionary <string, string> RunParserPDF(IVirtualFS virtualFS, string basename, string inputfolder, string outputfolder)
        {
            VirtualFS.ConfigureFileSystem(virtualFS);

            PdfReaderException.ContinueOnException();

            using (var context = new ParserStages.StageContext(basename, inputfolder, outputfolder))
            {
                //var dbg0 = new ParserStages.StageDbgFlow(context);
                //dbg0.Process();

                var stage0 = new ParserStages.StagePdfInput(context);
                stage0.Process();

                var stage1 = new ParserStages.StagePageMargins(context);
                stage1.Process();

                var stage2 = new ParserStages.StageBlocksets(context);
                stage2.Process();

                var stage3 = new ParserStages.StageRetrieveBlocks(context);
                stage3.Process();

                var stageText1 = new ParserStages.StageConvertText(context);
                stageText1.Process();

                var stageText2 = new ParserStages.StageConvertStructure(context);
                stageText2.Process();
                //stageText2.ProcessWithConfiguration($"{outputfolder}/{basename}/{basename}-tree.config");

                var stageTextTree = new ParserStages.StageConvertTree(context);
                stageTextTree.Process();

                var stageContent = new ParserStages.StageConvertContent(context);
                stageContent.Process();

                var stageArtigos = new ParserStages.StageConvertArtigoGN(context);
                stageArtigos.Process();

                string logStage3 = context.GetOutput("stage3");
                string logTree   = context.GetOutput("tree");

                return(context.FileListOutput);
            }
        }
Пример #2
0
 public StageConvertText(StageContext context)
 {
     this._input   = context.InputFolder;
     this._output  = context.OutputFolder;
     this._context = context;
 }
Пример #3
0
 public StageDbgFlow(StageContext context)
 {
     this._input   = context.InputFolder;
     this._output  = context.OutputFolder;
     this._context = context;
 }
Пример #4
0
 public StageRetrieveBlocks(StageContext context)
 {
     this._input   = context.InputFolder;
     this._output  = context.OutputFolder;
     this._context = context;
 }
Пример #5
0
 public StagePageMargins(StageContext context)
 {
     this._context = context;
 }
Пример #6
0
 public StageFullV1(StageContext context)
 {
     this._input   = context.InputFolder;
     this._output  = context.OutputFolder;
     this._context = context;
 }
Пример #7
0
 public StageBlocksets(StageContext context)
 {
     this._context = context;
 }