制作mobi格式的PostgreSQL文档

前端之家收集整理的这篇文章主要介绍了制作mobi格式的PostgreSQL文档前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

1、下载源代码

git clone -b REL_10_STABLE git://git.postgresql.org/git/postgresql.git pg10
cd pg10
git branch
[root@localhost postgresql]# git branch
* REL_10_STABLE

2、安装对应依赖包:

yum install docbook-dtds docbook-style-xsl fop libxslt opensp

参考:https://www.postgresql.org/docs/current/static/docguide-toolsets.html

3、准备工作:

./configure
cd pg10
cd doc/src/sgml

4、编译:

[root@localhost sgml]# make postgres.epub
{ \
  echo "<!ENTITY version \"10.0\">"; \
  echo "<!ENTITY majorversion \"10\">"; \
} > version.sgml
'/usr/bin/perl' ./mk_feature_tables.pl YES ../../../src/backend/catalog/sql_feature_packages.txt ../../../src/backend/catalog/sql_features.txt > features-supported.sgml
'/usr/bin/perl' ./mk_feature_tables.pl NO ../../../src/backend/catalog/sql_feature_packages.txt ../../../src/backend/catalog/sql_features.txt > features-unsupported.sgml
'/usr/bin/perl' ./generate-errcodes-table.pl ../../../src/backend/utils/errcodes.txt > errcodes-table.sgml
/usr/bin/osx -wall -wno-unused-param -wno-empty -wfully-tagged -D . -D . -x lower postgres.sgml >postgres.xml.tmp
'/usr/bin/perl' -p -e 's/\[(aacute|acirc|aelig|agrave|amp|aring|atilde|auml|bull|copy|eacute|egrave|gt|iacute|lt|mdash|nbsp|ntilde|oacute|ocirc|oslash|ouml|pi|quot|scaron|uuml) *\]/\&\1;/gi;' -e '$_ .= qq{<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">\n} if $. == 1;' <postgres.xml.tmp > postgres.xml
rm postgres.xml.tmp
/usr/bin/xmllint --noout --valid postgres.xml
/usr/share/sgml/docbook/xsl-stylesheets-1.78.1/epub/bin/dbtoepub postgres.xml

[root@localhost sgml]# 
[root@localhost sgml]# ls postgres.epub 
postgres.epub

5、拷贝出来,并进行转换,我是利用软件calibre转换的。

下载链接:https://pan.baidu.com/s/1o7O2MeA

欢迎下载收藏,谢谢。

原文链接:https://www.f2er.com/postgresql/193459.html

猜你在找的Postgre SQL相关文章