52610.fb2 Пишем программу для создания книг FB2. - читать онлайн бесплатно полную версию книги . Страница 25

Пишем программу для создания книг FB2. - читать онлайн бесплатно полную версию книги . Страница 25

begin

// head

for i:= 1 to max do

OutList.Add(Mas[i]);

with form1.GenresBox do

if Items.Count > 0 then

for i:= 0 to Items.Count - 1 do

OutList.Add('<genre>'+GetGaner(Items[i])+'</genre>');

SavePersons('author',Form1.ListBox3);

SavePersons('translator',Form1.ListBox2);

with Form1 do

begin

PrintString('book-title',book_title.text);

if Annotation.Lines.Count > 0

then SaveAnnotation;

//if _date.text <> '' then

//OutList.Add('<date value="'+_date.text+'-01-01">'+_date.text+'</date>');

SaveSequence;

OutList.Add(' <lang>'+Lang.Text+'</lang>');

if SLang.ItemIndex > -1 then

begin

S:= Lg[SLang.ItemIndex][1];

if S <> '' then

OutList.Add(' <src-lang>'+S+'</src-lang>');

end;

OutList.Add(' </title-info>');

// **** document-info ****

OutList.Add(' <document-info>');

OutList.Add(' <program-used>my_Make_FB2</program-used>');

PrintString('src-url', url.Text); //??

OutList.Add(' <date value="'+FormatDateTime('yyyy-mm-dd', Now)+'">'+ DateToStr(now) +'</date>');

PrintString('id', id.Text); //??

OutList.Add(' <version>1.0</version>');

OutList.Add(' </document-info>');

// **** publish-info ****

OutList.Add(' <publish-info>');

if Book_name.Text = ''

then PrintString('book-name', book_title.Text)

else PrintString('book-name', Book_name.Text);

PrintString('publisher', publisher.Text); //

PrintString('city', city.Text); //

PrintString('year', year.Text); //

PrintString('isbn', isbn.Text); //

//OutList.Add(' <version>1.0</version>');

OutList.Add(' </publish-info>');

end;

OutList.Add(' </description>');

OutList.Add('<body>');

end;

function SubStyle(m,w: TmyStyle):integer;