четверг, 2 апреля 2020 г.

Скачивание некоторых видео с яндекс-эфира

Примечание: экспериментировал на видосах, скорее всего, полученном яфиром с ютуба. На другом не сработало (не нашелся playlist).

Спасибо сотрудникам StackOverflow.com и Товарищам, которые там тусуются за то, что столкнулись с теми же вопросами, нашли на них ответы и поделились последними.

Используемые пакеты и утилиты: firefox, ex, ffmpeg.

Скачивание списка воспроизведения

Это очень просто: нужно найти в сетевом логе запрос списка воспроизведения. И скачать его.

Алгоритм действий следующий (в firefox).
  1. На странице яфира, на которой воспроизводится желаемый видосик, открываем developer tools.
  2. Переходим на вкладку Network.
  3. Выключаем фильтрацию по типу media (установкой all в списке доступных типов документов).
  4. Дальше - маневр: обновляем страницу.
  5. Смотрим на качество (шестеренка в окне видео). Если нужное (максимальное?), все нормально. Иначе - выбираем нужное.
  6. В поле фильтра запросов вводим тип списка воспроизведения: m3u8.
  7. Дальше - как видно на картинке - правый щелк по списку воспроизведения (может быть несколько, нужно выбрать тот, у которого нужное разрешение - его видно в URL при наведении на строку в колонке File сетевого лога).
  8. Copy > Copy URL (см. Картинку ниже).
  9. Теперь в буфере сидит ссылка на список воспроизведения. Открываем новую вкладку.
  10. В адресной строке новой вкладки делаем правый щелк, выбираем Paste & Go.
  11. Браузер покажет окно сохранения файла. Сохраняем в “какую-то-директорию” (у меня, для примера: ~/Downloads/streadmp/).
  12. Я еще переименовал файл, чтобы проще стало разбираться и он стал ~/Downloads/streadmp/pl (PLaylist).

Отлично, playlist скачан, можно качать и собирать фрагменты.

Преобразование playlist-а в список входных URL-ов

Я прекрасно понимаю, что действия, описанные ниже элементарно скриптуются (и я даже сделаю это и опубликую на гитхабе… хотя не, забанят…), но мне нужно было срочно сделать дамп алгоритма. При наличии последнего, написать скрипт не составит труда (а если его еще в компаньон оформить и браузерное расширение создать, то вообще красота получится). Поэтому ниже - тупо действия по конверсии, которые нужно сделать, но не оформленные в скрипт, а перечисленные. Для скриптинга можно использовать все, что работает с текстом: ed, ex, sed, awk.

Итак, мой алгоритм - для ex.

  1. Открываем эмулятор терминала (куда же без него?): любой
  2. Переходим в директорию, где будет производиться работа и куда уже сохранен playlist. В моем примере - команда: cd ~/Downloads/streadmp/
  3. Теперь открываем файл списка воспроизведения: ex pl
  4. Удаляем все системные теги M3U: 1,$g/^#/d
  5. Супер, меняем secure-протокол на обычный: 1,$s/^https:/http:
  6. Для ffmpeg нужно пометить, что это - файлы; за одно, поместим их в кавычки: 1,$s/^/file ‘
  7. Теперь закрывающие кавычки: 1,$s/$/’
  8. Сохраняемся, выходим: wq

Пример файла, который должен был получиться - далее.

file 'http://ext-strm-kivretn14.strm.yandex.net/vh-youtube-converted/vod-content/2277395201434660047_169_720p0.ts?lid=1514&no_cache=1&vsid=f71702081381f4195004d69dfd91f89839b1c675e411xWEBx3481x1585849614'
file 'http://ext-strm-kivretn14.strm.yandex.net/vh-youtube-converted/vod-content/2277395201434660047_169_720p1.ts?lid=1514&no_cache=1&vsid=f71702081381f4195004d69dfd91f89839b1c675e411xWEBx3481x1585849614'
file 'http://ext-strm-kivretn14.strm.yandex.net/vh-youtube-converted/vod-content/2277395201434660047_169_720p2.ts?lid=1514&no_cache=1&vsid=f71702081381f4195004d69dfd91f89839b1c675e411xWEBx3481x1585849614'
file 'http://ext-strm-kivretn14.strm.yandex.net/vh-youtube-converted/vod-content/2277395201434660047_169_720p3.ts?lid=1514&no_cache=1&vsid=f71702081381f4195004d69dfd91f89839b1c675e411xWEBx3481x1585849614'
file 'http://ext-strm-kivretn14.strm.yandex.net/vh-youtube-converted/vod-content/2277395201434660047_169_720p4.ts?lid=1514&no_cache=1&vsid=f71702081381f4195004d69dfd91f89839b1c675e411xWEBx3481x1585849614'
И так далее, таких строк на 5-минутное видео - 30. На час будет больше трех с половиной сотен.

Сборка и конвертация

Собственно, и сборку, и конвертацию за нас сделает ffmpeg. Одна команда и результат в файле allk.mkv.

ffmpeg -f concat -safe 0 -protocol_whitelist file,http,tcp -r 30 -i pl -c copy allk.mkv

Работает примерно с пятой скоростью (то есть, в пять раз быстрее, чем идет видео), что, кстати, чмырит по производительность Video Download Helper, который качает со скоростями примерно около ¼.

понедельник, 27 августа 2018 г.

ABS for Auto BackUp System

Intro

  1. Today's software is buggy.
  2. Because of this my daily rule is "backup all twice and regularly".
This two points make me to write my own (because of 1) backup system (because of 2). I called it Auto Backup System (ABS for short).

In this article I am going to show you how to use it.

Installation

ABS is cross-platform. Because of this you need any installer for it.

Just download ABS. Don't forget to make the downloaded file executable using chmod +x.

This is a shell script written in Tenex C Shell. If you don't trust me, you can read all the script. It's less than 130 lines of code. Also it's available at GitLab.


If you are ready to install ABS, download the script and save it somewhere. For example here: /root/abs/abs

Before configuring ABS, please install Zenity and put it into the directory under the PATH.

 

Configuration

ABS doesn't have a config file. Instead of this it obtains all the configuration from the environment variables.

LIST_FILE

This variable must be a path to a file lists files and directories to put into backups. If you didn't set this variable before running ABS, ABS will create a list file in your home directory. Sample of list file is below.

/usr/home/vblinkov/projects/cdialog4php/
/etc/rc.conf
/boot/loader.conf

 

BACKUPS_DIR

This variable contains a path to directory for storing your backups. If you didn't set it before the first running of ABS, ABS will create such directory inside your home directory too.

 

TEXT_EDITOR

This variable must contain the name (from the PATH) or full path to a text editor. By default it set to pluma. But because it's going to dead I would like to recommend you something like Editor from the DeforaOS project. It's tiny but works and does not crash on Ctrl+S.

 

FILE_MANAGER

Use this variable to set the file manager you want to use to view the BACKUPS_DIR. Defaulted to caja.

If some of described variable is unset ABS will inform you with (WW) warnings in stdout.

If you think that you will be happy with defaults, you may jump right to the Scheduling section. But, to customize ABS, read the next section.

 

Wrapper script

If you want to customize the ABS you, of course, may set the described environment variables right in crontab. But as for me, I don't like long lines in the system cron file. Moreover, it's useful to setup logging for ABS (ABS itself doesn't has logging for simplicity).

I suggest the next wrapper script.



Download and save it, for example to /root/abs/abs.run.sh. It's super easy. It sets the file with a list of files and directories for backing up on a regular manner, a directory to storing backup archives and a more stable text editor. Also, abs.run.sh introduces a lightweight logging.

Scheduling

There is nothing easier for you that configuring of running the abs.run.sh on a periodic basis using cron. For example.

2       */2  *    *     *    root /root/abs/abs.run.sh

I think this is super easy. ABS will run every even hour at the 2nd minute.

Using 

If you configured ABS properly, you will see the next dialog periodically for 22 seconds.

  

In the previous picture you may see the list of directories added to created backup. The Backed up section shows files and directories successfully added to the last backup. The Missing section lists the directories and files listed in LIST_FILE, but missing in your file system.

In case of error or missing some critical environment variables you will see red text. Warnings are blue. Note, that ABS know how to created files and directories. So, some errors, once appeared, may not visit you the second time. Such a auto-repair system. (So, who say that TCSH is too dump for doing complicated work? :-) )

Press OK to dismiss the dialog.

Press View to open the directory with all created backup archives (using FILE_MANAGER).

Press Configure to open the file with the list of directories and files you want to backup using ABS (in TEXT_EDITOR).

That's all

Please, do not hesitate to contact me in case of questions and suggestions concerning the script.
 



среда, 25 июля 2018 г.

cpio(1) - copy files to and from archives

The Crib for cpio(1)

1. Create Archive

Example: put all the files inside the current directory into the new archive

ls | cpio -o > ar01.cpio

Example: create an archive from the file containing the names of files to put into the archive

cat blst | cpio -i > bu2.cpio

2. List Archive Contents

Example: get file names from the previously created archive

cat ar01.cpio | cpio -t

3. Extract Files from Archive

Example: extract all the files from the previously created archive

cat ar01.cpio | cpio -i

Example: extract only one file with the absolute path from the archive; with verbose output

cat bu2.cpio | cpio -i --insecure -v /tmp/cpio/one











воскресенье, 8 июля 2018 г.

DocBook on FreeBSD: the minimalist article template

A week ago I wrote an article concerting installing and running tools for DocBook-to-PDF conversion using Apache FOP.

Today I am going to show you the smallest working example of a DocBook document.

<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<article>
<para>
 This document is targeted at me.
</para>
</article>

That's all!

P.S. As I mentioned earlier in this blog, if you want to get formatting objects (FO) from this file (let's call it howto.xml), use xmlto:

xmlto fo howto.xml

This will produce the next FO:

<?xml version="1.0"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" font-family="serif,Symbol,ZapfDingbats" font-size="10pt" text-align="justify" line-height="normal" font-selection-strategy="character-by-character" line-height-shift-adjustment="disregard-shifts" writing-mode="lr-tb" language="en"><fo:layout-master-set><fo:simple-page-master master-name="blank" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body display-align="center" margin-bottom="0.5in" margin-top="0.5in" region-name="blank-body"/><fo:region-before region-name="xsl-region-before-blank" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-blank" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="titlepage-first" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-first" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="titlepage-odd" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-odd" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="titlepage-even" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-even" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="lot-first" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-first" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="lot-odd" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-odd" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="lot-even" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-even" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="front-first" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-first" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="front-odd" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-odd" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="front-even" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-even" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="body-first" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-first" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="body-odd" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-odd" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="body-even" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-even" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="back-first" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-first" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="back-odd" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-odd" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="back-even" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="1"/><fo:region-before region-name="xsl-region-before-even" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="index-first" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="2"/><fo:region-before region-name="xsl-region-before-first" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-first" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="index-odd" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="2"/><fo:region-before region-name="xsl-region-before-odd" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-odd" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:simple-page-master master-name="index-even" page-width="215.9mm" page-height="279.4mm" margin-top="0.5in" margin-bottom="0.5in" margin-left="1in" margin-right="1in"><fo:region-body margin-bottom="0.5in" margin-top="0.5in" column-gap="12pt" column-count="2"/><fo:region-before region-name="xsl-region-before-even" extent="0.4in" display-align="before"/><fo:region-after region-name="xsl-region-after-even" extent="0.4in" display-align="after"/></fo:simple-page-master><fo:page-sequence-master master-name="titlepage"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="titlepage-first" page-position="first"/><fo:conditional-page-master-reference master-reference="titlepage-odd" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="titlepage-odd"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="lot"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="lot-first" page-position="first"/><fo:conditional-page-master-reference master-reference="lot-odd" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="lot-odd"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="front"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="front-first" page-position="first"/><fo:conditional-page-master-reference master-reference="front-odd" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="front-odd"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="body"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="body-first" page-position="first"/><fo:conditional-page-master-reference master-reference="body-odd" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="body-odd"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="back"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="back-first" page-position="first"/><fo:conditional-page-master-reference master-reference="back-odd" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="back-odd"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master><fo:page-sequence-master master-name="index"><fo:repeatable-page-master-alternatives><fo:conditional-page-master-reference master-reference="blank" blank-or-not-blank="blank"/><fo:conditional-page-master-reference master-reference="index-first" page-position="first"/><fo:conditional-page-master-reference master-reference="index-odd" odd-or-even="odd"/><fo:conditional-page-master-reference odd-or-even="even" master-reference="index-odd"/></fo:repeatable-page-master-alternatives></fo:page-sequence-master></fo:layout-master-set><fo:page-sequence xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions" hyphenate="true" master-reference="body" language="en" format="1" initial-page-number="1" force-page-count="no-force" hyphenation-character="-" hyphenation-push-character-count="2" hyphenation-remain-character-count="2"><fo:static-content flow-name="xsl-region-before-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pt"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="start" display-align="before" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pt"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="start" display-align="before" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pt"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="start" display-align="before" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-before-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pt"><fo:table table-layout="fixed" width="100%" border-bottom-width="0.5pt" border-bottom-style="solid" border-bottom-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="start" display-align="before" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="before" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="right" display-align="before" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-footnote-separator"><fo:block><fo:leader color="black" leader-pattern="rule" leader-length="1in"/></fo:block></fo:static-content><fo:static-content flow-name="blank-body"><fo:block text-align="center"/></fo:static-content><fo:static-content flow-name="xsl-region-after-first"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pt"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="start" display-align="after" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="after" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell text-align="end" display-align="after" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-odd"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pt"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="start" display-align="after" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="after" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell text-align="end" display-align="after" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-even"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pt"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="start" display-align="after" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="after" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell text-align="end" display-align="after" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after-blank"><fo:block font-family="serif,Symbol,ZapfDingbats" margin-left="0pt"><fo:table table-layout="fixed" width="100%" border-top-width="0.5pt" border-top-style="solid" border-top-color="black"><fo:table-column column-number="1" column-width="proportional-column-width(1)"/><fo:table-column column-number="2" column-width="proportional-column-width(1)"/><fo:table-column column-number="3" column-width="proportional-column-width(1)"/><fo:table-body><fo:table-row block-progression-dimension.minimum="14pt"><fo:table-cell text-align="start" display-align="after" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell><fo:table-cell text-align="center" display-align="after" relative-align="baseline"><fo:block><fo:block><fo:page-number/></fo:block></fo:block></fo:table-cell><fo:table-cell text-align="end" display-align="after" relative-align="baseline"><fo:block><fo:block/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:flow flow-name="xsl-region-body"><fo:block id="idp31030500"><fo:block font-family="sans-serif,Symbol,ZapfDingbats"/></fo:block><fo:block space-before.optimum="1em" space-before.minimum="0.8em" space-before.maximum="1.2em">
 This document is targeted at me.
</fo:block></fo:flow></fo:page-sequence></fo:root>
As we seeing, FO is an intermediate format before compiling it to PDF. Styling must be applied to FO before. I'm going to get how to do this and describe it for you after my vacation if I don't become totally deaf.

Sources

1. An article template // https://supportweb.cs.bham.ac.uk/docs/tutorials/docsystem/build/tutorials/docbooksys/segmentedhtml/ch08s03.html.

понедельник, 2 июля 2018 г.

DocBook on FreeBSD: installation and Hello World!

Preface

After a couple times when LibreOffice 5 accidentally and totally removed the content of my files during Ctrl+S, I decided to switch to DocBook.

This form of documents writing and styling looks hard, but I believe that ed(1) is much more stable than LibreOffice. XML files (DocBook is just a set of tags) is much easier for version control and so on. I'm feared about styling a bit for now...

Algorithm

But, let's talking about installation. How to generate the Hello World PDF?

1. Install all the next DocBook packages

docbook-1.5
docbook-sgml-4.5_1
docbook-utils-0.6.14_13
docbook-xml-5.0_3
docbook-xsd-1.0.b1
docbook-xsl-1.76.1,1
docbook-xsl-ns-1.78.1_4
dsssl-docbook-modular-1.79_1,1
sdocbook-xml-1.1_2,2

2. Install fop and satellites

I'm not sure which of these packages is required for fop. But fop will save your day when jade (docbook2* tools) can only out tons of error messages like this.
Script started on Tue Jul  3 08:48:30 2018
Command: docbook2pdf shortest.xml
Using catalogs: /usr/local/share/sgml/catalog, /usr/local/share/sgml/iso8879/catalog, /usr/local/share/sgml/docbook/4.5/catalog, /usr/local/share/sgml/docbook/dsssl/modular/print/catalog, /usr/local/share/sgml/docbook/dsssl/modular/html/catalog, /usr/local/share/sgml/docbook/dsssl/modular/dtds/html/catalog, /usr/local/share/sgml/docbook/dsssl/modular/common/catalog, /usr/local/share/sgml/docbook/dsssl/modular/catalog, /usr/local/share/sgml/docbook/catalog, /usr/local/share/sgml/jade/catalog
Using stylesheet: /usr/local/share/sgml/docbook/utils-0.6.14/docbook-utils.dsl#print
Working on: /home/vblinkov/projects/dbk/shortest.xml
jade:/home/vblinkov/projects/dbk/shortest.xml:3:56:E: URL not supported by this version
jade:/home/vblinkov/projects/dbk/shortest.xml:3:56:E: DTD did not contain element declaration for document type name
jade:/home/vblinkov/projects/dbk/shortest.xml:4:9:E: there is no attribute "id"
jade:/home/vblinkov/projects/dbk/shortest.xml:4:18:E: element "book" undefined
jade:/home/vblinkov/projects/dbk/shortest.xml:5:9:E: element "title" undefined
jade:/home/vblinkov/projects/dbk/shortest.xml:6:15:E: there is no attribute "id"
jade:/home/vblinkov/projects/dbk/shortest.xml:6:22:E: element "chapter" undefined
jade:/home/vblinkov/projects/dbk/shortest.xml:7:12:E: element "title" undefined
jade:/home/vblinkov/projects/dbk/shortest.xml:8:11:E: element "para" undefined
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:8:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:9:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:10:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:11:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:12:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:13:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:14:28:E: "1256" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:15:28:E: "1257" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:16:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:17:28:E: "1053" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:18:28:E: "1085" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:19:28:E: "1053" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:20:28:E: "1085" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:21:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:22:28:E: "1072" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:23:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:24:28:E: "1041" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:25:28:E: "1073" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:26:28:E: "1057" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:27:28:E: "1089" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:28:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:29:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:30:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:31:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:32:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:33:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:34:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:35:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:36:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:37:28:E: "1046" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:38:28:E: "1078" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:39:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:40:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:41:28:E: "1053" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:42:28:E: "1085" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:43:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:44:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:45:28:E: "1041" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:46:28:E: "1073" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:47:28:E: "1063" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:48:28:E: "1063" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:49:28:E: "1095" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:50:28:E: "1198" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:51:28:E: "1199" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:54:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:55:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:56:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:57:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:58:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:59:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:60:28:E: "1198" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:61:28:E: "1199" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:62:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:63:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:64:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:65:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:66:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:67:28:E: "1256" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:68:28:E: "1257" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:69:28:E: "1043" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:70:28:E: "1075" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:71:28:E: "1041" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:72:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:73:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:74:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:75:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:76:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:77:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:78:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:79:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:80:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:81:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:84:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:85:28:E: "1072" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:86:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:87:28:E: "1053" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:88:28:E: "1085" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:91:28:E: "1045" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:92:28:E: "1077" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:93:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:94:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:95:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:96:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:97:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:98:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:99:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:100:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:101:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:102:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:103:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:104:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:105:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:106:28:E: "1041" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:107:28:E: "1073" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:108:28:E: "1041" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:109:28:E: "1062" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:110:28:E: "1094" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:111:28:E: "1094" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:112:28:E: "1062" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:113:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:114:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:115:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:116:28:E: "1072" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:117:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:118:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:119:28:E: "1076" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:120:28:E: "1044" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:121:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:122:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:123:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:124:28:E: "1057" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:125:28:E: "1089" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:126:28:E: "1057" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:127:28:E: "1073" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:129:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:130:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:131:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:132:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:133:28:E: "1076" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:136:31:E: "1073" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:137:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:138:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:139:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:140:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:141:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:142:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:143:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:144:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:145:28:E: "1043" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:146:28:E: "1075" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:147:34:E: "1057" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:148:28:E: "1076" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:149:33:E: "1088" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:150:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:151:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:152:28:E: "1043" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:153:29:E: "1041" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:154:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:155:28:E: "1054" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:156:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:157:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:158:28:E: "1046" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:159:28:E: "1078" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:160:28:E: "1047" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:161:28:E: "1079" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:162:29:E: "1043" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:163:29:E: "1075" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:164:28:E: "1093" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:165:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:166:28:E: "1058" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:167:28:E: "1090" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:168:28:E: "1069" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:169:28:E: "1044" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:170:29:E: "1044" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:171:28:E: "1256" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:172:29:E: "1256" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:173:28:E: "1044" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:174:28:E: "1043" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:175:28:E: "1053" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:176:28:E: "1076" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:177:28:E: "1076" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:178:28:E: "1061" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:179:28:E: "1072" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.ent:180:28:E: "1040" is not a character number in the document character set
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:69:11:E: general entity "Appendix" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:70:15:E: general entity "appendix" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:77:11:E: general entity "Chapter" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:78:15:E: general entity "chapter" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:79:35:E: general entity "Equation" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:80:35:E: general entity "Example" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:81:35:E: general entity "Figure" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:85:35:E: general entity "Part" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:87:35:E: general entity "Procedure" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:88:35:E: general entity "Reference" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:90:11:E: general entity "Section" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:91:15:E: general entity "section" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:110:39:E: general entity "sidebar" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:111:35:E: general entity "step" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:112:35:E: general entity "Table" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:120:34:E: general entity "xrefto" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:121:30:E: general entity "nonexistantelement" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:122:13:E: general entity "unsupported" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:132:16:E: general entity "in" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:150:35:E: general entity "Abstract" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:151:33:E: general entity "Answer" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:153:34:E: general entity "Article" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:154:38:E: general entity "Bibliography" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:155:31:E: general entity "Book" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:157:34:E: general entity "Caution" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:159:35:E: general entity "Copyright" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:160:36:E: general entity "Dedication" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:161:34:E: general entity "Edition" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:165:35:E: general entity "Glossary" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:166:35:E: general entity "GlossSee" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:167:38:E: general entity "GlossSeeAlso" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:168:35:E: general entity "Important" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:169:32:E: general entity "Index" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:170:35:E: general entity "Colophon" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:171:35:E: general entity "SetIndex" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:173:37:E: general entity "LegalNotice" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:174:33:E: general entity "MsgAud" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:175:35:E: general entity "MsgLevel" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:176:34:E: general entity "MsgOrig" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:177:31:E: general entity "Note" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:179:34:E: general entity "Preface" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:181:34:E: general entity "Published" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:182:35:E: general entity "Question" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:185:34:E: general entity "RefName" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:186:36:E: general entity "RevHistory" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:190:40:E: general entity "RefSynopsisDiv" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:191:35:E: general entity "Revision" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:199:32:E: general entity "see" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:200:35:E: general entity "seealso" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:201:30:E: general entity "Set" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:202:34:E: general entity "Sidebar" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:205:30:E: general entity "Tip" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:206:30:E: general entity "TableofContents" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:207:34:E: general entity "Warning" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:217:34:E: general entity "unexpectedelementname" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:372:32:E: general entity "ListofTables" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:373:34:E: general entity "ListofExamples" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:374:33:E: general entity "ListofFigures" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:375:35:E: general entity "ListofEquations" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:384:30:E: general entity "ListofUnknown" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:399:33:E: general entity "Editedby" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:402:34:E: general entity "Revisedby" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:407:27:E: general entity "and" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:413:34:E: general entity "Pgs" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:415:32:E: general entity "Notes" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:417:38:E: general entity "TableNotes" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:425:28:E: general entity "nav-prev" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:428:28:E: general entity "nav-prev-sibling" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:431:28:E: general entity "nav-next-sibling" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:434:28:E: general entity "nav-next" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:437:28:E: general entity "nav-up" not defined and no default entity
jade:/usr/local/share/sgml/docbook/dsssl/modular/print/../common/../common/dbl1mn.dsl:440:28:E: general entity "nav-home" not defined and no default entity

Command exit status: 8
Script done on Tue Jul  3 08:48:30 2018
So, just install the next packages to avoid this headache: xmlto (lifesaver!), tex-xmltex, libxslt, fop (a thingie for xmlto).

Do not forget to rehash if you use the tcsh.

3. Create the first book

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
<book id="csnpro1">
   <title>Alternative Computer Science</title>
   <chapter id="intro">
      <title>The Intro</title>
      <para>Just one line of text.</para>
   </chapter>
</book>
Save it under /tmp/hello.xml for example and cd to /tmp/.

4. Compile the book

Probably, you will want to create a Makefile for your book project ;-)

4.1. Compile FO from XML

xmlto fo hello.xml
This will generate hello.fo file.

4.2. Compile PDF from FO

fop hello.fo -pdf hello.pdf
This will generate desired hello.pdf.

Appendix

A1. Makefile

pdf:
 xmlto fo hello.xml
 fop hello.fo -pdf hello.pdf

show:
 atril hello.pdf &

all: pdf
To create a PDF file from a DocBook one use the next command
make
or the next one.
make pdf
To open created PDF file in your favorite documents viewer use
make show
It is possible to compile PDF and open it using the one command.
make pdf show

Many thanks to:

1. https://www.xul.fr/en-xml-docbook.php#example
2. https://sourceforge.net/p/libusb/mailman/message/10722501/
3. https://forums.gentoo.org/viewtopic-t-187340-start-0.html