четверг, 27 апреля 2017 г.

Преобразование форматов текстов


USES
 axiom:test
 axiom:TagReader
 axiom:TagWriter
 axiom:tests
;

PROCEDURE EVDtoSome
 STRING IN anExt
 IN aWriterClass

 STRING VAR l_In
 'gkbp2.evd' test:ResolveInputFilePath >>> l_In
 l_In .
 STRING VAR l_Out
 script:FileName sysutils:ExtractFileName anExt sysutils:ChangeFileExt test:ResolveOutputFilePath >>> l_Out
 l_Out .

 INTERFACE VAR l_Reader
 l_In class::TevdEVDReader TagReader:Create:WithFileName >>> l_Reader

 INTERFACE VAR l_Writer
 l_Out aWriterClass TagWriter:Create:WithFileName >>> l_Writer

 l_Writer l_Reader TagReader:GenerateTo

 nil >>> l_Reader
 nil >>> l_Writer

 l_Out '%' tests:CheckEtalon
; // EVDtoSome

Тест EVDtoSomeTest
 '.evd' class::TevdTxtEVDWriter EVDtoSome
 '.rtf' class::TddRTFWriter EVDtoSome
 '.html' class::TddHTMLWriter EVDtoSome
; // EVDtoSomeTest

EVDtoSomeTest

Есть консольная утилита...

Комментариев нет:

Отправить комментарий