plucker的man手册

PLUCKER-BUILD

Section: 用户命令 (1)
Updated: Plucker 1.2 – http://plkr.org/
索引 返回主目录


名称

plucker-build – 生成plucker格式(电子书)文档

SYNOPSIS

plucker-build [--alt-maxheight=pixel-height] [--alt-maxwidth=pixel-width] [--author=string] [--backup] [--beamable] [--bpp=image-depth] [--category=default-category-name] [--charset=charset-indicator] [--compression=compression-type] [--depth-first] [--doc-file=name-prefix] [--doc-name=document-name] [--doc-compression] [--exclusion-list=filename] [--extra-section=section-name] [--help] [--home-url=base-URL] [--icon=image-filename] [--launchable] [--maxdepth=depth] [--maxheight=pixel-height] [--maxwidth=pixel-width] [--no-backup] [--noimages] [--not-beamable] [--not-launchable] [--no-urlinfo] [--owner-id=name] [--pluckerdir=output-directory] [--pluckerhome=plucker-home-directory] [--quiet] [--referrer=string] [--status-file=filename] [--staybelow=url-prefix] [--stayonhost] [--title=string] [--update-cache] [--url-pattern=pattern] [--user-agent=string] [--verbosity=verbosity-level] [--zlib-compression] [HOME-URL]

描述

plucker-build 从URL建立Plucker二进制文档,一种电子书。本文档为运行在Palm设备上的Plucker阅读器程序提供格式化。 操作的普通模式是抓取一个 home URL生成Plucker文档, 或者输出到标准输出,如果指定了 –doc-file 则到一个文件。 或者,指定选项–update-cache会更新Plucker记录的缓存(though it’s not clear what this is good for)。Plucker文档格式在 http://www.plkr.org/index.pl/cvs/docs/DBFormat.html?rev=HEAD.规定了。

选项

有许多选项和参数可以在配置文件$HOME/.pluckerrc中,或者在默认的配置文件中使用。应用后,配置文件参数的名字显示在选项文档之后。在命令行给定一个选项将覆盖配置文件参数。更多配置文件的信息,请看下面。

–alt-maxheight=pixel-height
以像素为单位,指定一个图像的 alternate rendition 的最大高度。(当嵌入图像太大,无法完整包含时,就转换为比较小的版本,尺寸由参数MAXHEIGHT和MAXWIDTH决定,并且链接到比较大的图像,叫做 alternate rendition。) [alt_maxheight]
–alt-maxwidth=pixel-width
以像素为单位,指定一个图像的 alternate rendition 的最大宽度。 (当嵌入图像太大,无法完整包含时,就转换为比较小的版本,尺寸由参数MAXHEIGHT和MAXWIDTH决定,并且链接到比较大的图像,叫做 alternate rendition。) [alt_maxwidth]
–author=string
设置文档作者为 string,string要在文档的字符集内(参考–charset),如果字符集没有指定默认为ASCII。 [author_md]
–backup
设置输出文档的备份位,使文档可以在Palm同步时备份。默认备份文档。[backup_bit]
–beamable
设置输出文档的发射位,允许文档发射传播。默认,文档可以发射。[copyprevention_bit]
–bpp=image-depth
指定用于图像的分辨率(单位为bpp)。Plucker 1.1的有效值为0、1(默认值)、2、4、8。如果为0,则文档不包括图像。参见–noimages. [bpp]
–category=default-category-name
指定默认默认Plucker分类或包含在文档中的分类。如果指定了超过一个的分类,分类名应该用逗号隔开。[category]
–charset=charset-indicator
指定攫取文档文本时使用的编码的默认字符集。charset-indicator 既可以是一个字符集名(来自一个小列表;参考src/parser/python/PyPlucker/__init__.py.in查看可用字符集名列表),或者一个代表字符集MIBenum值的十进制整数,见表http://www.iana.org/assignments/character-sets. [default_charset]
–compression=compression-type
指定文档中使用的压缩类型。有两个compression-type可用值:doc zlib。默认是doc,与Palm的DOC格式文档使用的压缩系统相同。zlib压缩通常生成较小的文档。参考–zlib-compression–doc-compression。 [compression]
–depth-first
指定网络遍历深度优先,而非默认的宽度优先。This often works better on bushy acyclic graph structures than the breadth-first traversal. [depth_first]
–doc-file=name-prefix (or -f name-prefix)
也可作 -f name-prefix。 指定不带目录(由–pluckerdir指定)的文档输出的名字, 不带扩展名(总是.pdb)。如果不指定,而且标准输出不是一个tty,文档输出到stdout。 [doc_file]
–doc-name=document-name (or -N document-name)
指定文档在阅读器中识别用的短名。默认为 –doc-file的值。如果–doc-file没有指定,文档名默认使用home URL。名字要限制在26个字符。[doc_name]
–doc-compression
指定文档压缩为Palm Doc格式开发的压缩方案,应该应用到这个文档的各个部分。这是默认。参考–zlib-compression–compression.
–exclusion-list=filename (or -E filename)
用于添加附加文件到exclusion list,一个包含从文档中排除的URLs信息的文件列表。有关排除列表的更多信息,参考用户手册。[exclusion_lists]
–extra-section=section-name (or -s section-name)
用于添加附加section到配置文件中searched section的列表中。一个section是一个命名的配置信息的集合。默认,DEFAULT section将被搜索,然后是所有操作系统指定的sections,再次是在命令行指定的sections。
–help (or -h)
输出命令行参数的帮助。
–home-url=base-url (or -H base-URL)
指定抓取文档的URL。这也可以在命令行指定为一个独立的参数。如果home URL没有指定,则默认为文件:/$HOME/.plucker/home.html。这个默认值可以在你的.pluckerrc文件中改变。注意,这个 值必须是一个有效的绝对URL。支持一个特殊的URL方案: plucker:。它指定在包含在PluckerDir(Plucker当前工作目录)和PluckerHome(Plucker家目录)里的Plucker搜索路径中的文件。[home_url]
–icon=image-filename
如果输出文件是 launchable,这个开关可以为文档在应用程序中指定大图标。如果不指定,就使用默认的图标。如果输出文件不是launchable,这个开关无效。参考–launchable. [big_icon]
–launchable
指定输出文档在系统launcher中显示为一个图标。点击这个图标会启动Plucker并执行这个文档。默认文档不是launchable。[launchable_bit]
–maxdepth=depth (or -M depth)
这指定了转换输入文档时语法分析器遍历链接的级数。最好保持这个值小一点,否则文件尺寸会很大。如果你只有一页,没有指向的页面,使用值为1。[home_maxdepth]
–maxheight=pixel-height
以像素为单位,为内嵌图像指定最大高度。覆盖了配置文件中的MAXHEIGHT参数,但会依次被图像链接自身的任一高度规格覆盖。[maxheight]
–maxwidth=pixel-width
以像素为单位,为内嵌图像指定最大宽度。覆盖了配置文件中的MAXWIDTH参数,但会依次被图像链接自身的任一宽度规格覆盖。 [maxwidth]
–no-backup
清除输出文件的备份位(会使文档在Palm同步时被备份)。默认,文档被备份。 [backup_bit]
–noimages
指定不包含图像。等同于–bpp=0。参考 –bpp.
–not-beamable
阻止文档发射传播。默认,文档可以发射。 [copyprevention_bit]
–not-launchable
指定输出文档不在系统launcher中显示为图标。默认,文档不可执行。[launchable_bit]
–no-urlinfo
指定文档中不含URL信息。当链接包含在文档中时,默认包括真实URL的信息。用于外部参考非常方便(链接到文档外的文档)。使用这一选项可能生成更小些的文档。[no_urlinfo]
–owner-id=name
指定文档的所有者ID。以这种方式稍微给文档加密,它只能在匹配所有者id的机器上打开。PalmOS阅读器中,同步用户名作为所有者id。 [owner_id_build]
–pluckerhome=plucker-home-directory (or -P plucker-home-directory)
覆盖PluckerHome的默认值,默认值为 $HOME/.plucker/。也可以通过设置环境变量PLUCKERHOME指定。一个明确的–pluckerhome的值覆盖所有的PLUCKERHOME设置。 [PLUCKERHOME]
–pluckerdir=output-directory (or -p output-directory)
覆盖PluckerDir的默认值,默认值为 PluckerHome (见–pluckerhome)。 PluckerDir是输出文档的默认目录,如果使用plucker: URL机制,则搜索该目录寻找输入文件。[pluckerdir]
–quiet (or -q)
同–verbosity=0.
–referrer=string
当使用HTTP获取输入时,发送string作为Referrer HTTP header的值。默认不改善referrer header. [referrer]
–status-file=filename
Gives the name of a file to read to get an estimate for the total number of pages that have to be processed, and to continually write with a single line giving the number of pages collected so far, the number of links still to process, and the estimated number of total pages that will be gathered (or zero if this is not known). The three values are written as space-separated ASCII numbers. The status line in the file is continually over-written as the pluck progresses, so the file will always contain only a single line. [status_file]
–staybelow=url-prefix
获取文档仅包括url-prefix下的URLs。处理子目录的一个方便方法。[home_staybelow]
–stayondomain
指定获取文档仅限同一域。[home_stayondomain]
–stayonhost
指定获取文档仅限同一主机。[home_stayonhost]
–title=string
设置文档标题为string。这与文档名(见–doc-name=)不同在于它相对长一些。string使用文档的字符集(见–charset),或者如果未指定字符集就使用 ASCII。[title_md]
–update-cache (or -c)
更新记录的Plucker 缓存,而不是建立文档。 [use_cache]
–url-pattern=pattern
自动排除不匹配规则表达式pattern的所有URLs。使用的规则表达式语言是在http://www.python.org/doc/current/lib/re-syntax.html.规定的Python ‘re’模块。 [home_url_pattern]
–user-agent=string
当使用HTTP获取输入时,改善string作为User-Agent HTTP header的值。默认是发送 “Plucker/Py-XX“,这里的XX是Plucker的版本。[user_agent]
–verbosity=verbosity-level (or -V verbosity-level)
设置状态信息输出的等级为verbosity-level指定的值。大约上,0是完全静默,1是标准处理状态(默认值),2是许多有关获取和分析输入的输出(通常用于调试)。大于2的值也可以用,但倾向给出大量输出仅对开发者有用。参考–quiet. [verbosity]
–zlib-compression
指定Zlib压缩用于文档。这被公认比默认压缩格式Doc压缩更高效。参考–doc-compression–compression.

例子

创建一个foo.com自助餐厅的每周自助餐菜单的pocket版,访问网址 http://www.foo.com/ops/cafe/weeklymenu.html, ,不跟随任何链接,不包含任何图片,命名文档为”Cafeteria Menu”,将文档输出到名为/tmp/Menu.pdb的文件,代码如下: % plucker-build http://www.foo.com/cafe/weeklymenu.html >/tmp/Menu.pdb

Or alternatively,

% plucker-build –pluckerdir=/tmp \

–doc-name=”Cafeteria Menu” \

–doc-file=Menu \

–home-url=”http://www.foo.com/cafe/weeklymenu.html“ \

–maxdepth=1 \

–bpp=0
Pluckerdir is ‘/tmp’…
—- 0 collected, 1 to do —-
Processing http://www.foo.com/cafe/weeklymenu.html…

Retrieved ok.

Parsed ok.
—- all pages retrieved and parsed —-

Writing out collected data…
Writing document ‘Cafeteria Menu’ to file /tmp/Menu.pdb
Converting http://www.foo.com/cafe/weeklymenu.html…
Wrote 1 <= plucker:/~special~/index
Wrote 2 <= http://www.foo.com/cafe/weeklymenu.html
Wrote 3 <= plucker:/~special~/pluckerlinks
Wrote 5 <= plucker:/~special~/metadata
Wrote 11 <= plucker:/~special~/links1
Done!
% ls -l /tmp/Menu.pdb
-rw-rw-r– 1 user somegroup 2646 Nov 2 21:19 /tmp/Menu.pdb
%

环境变量

HOME
用来决定用户配置文件的位置。如果不设定,就使用系统级的配置文件。
HTTP_PROXY, HTTP_PROXY_USER, HTTP_PROXY_PASS
如果设置了,就使用http URL机制取回URLs。
PLUCKERHOME
指定PluckerHome的值。更多信息见选项 –pluckerhome
PLUCKERDIR
指定PluckerDir的值。更多信息见选项–pluckerdir

配置文件

解释两个配置文件来定制不同plucker-build参数的设置。第一个是系统级配置文件,默认是/usr/local/etc/pluckerrc或你的Debian系统中的 /etc/pluckerrc。这个文件中的任何设置都会被个人配置文件$HOME/.pluckerrc覆盖。这两个文件包含了许多sections,每个都有一个名字,都用中括弧围住,跟着变量设置。通常,只有名为”default”的会被examined。额外的sections可能会特别用–extra-section选项;这些sections中的设置会覆盖默认section中的值 参数设置有个格式name = value,这里名字是plucker-build参数的名字,值是一个字符串、整数、浮点数或 布尔值。冒号可能用来替代等号来分隔名字和值。注释由”rem”在行首开头,或者用字符”#”,或者用字符”;”。布尔值为真表示为”TRUE”, “true”, “True” , “on”,或 “1″。布尔值为假表示为”FALSE”, “false”, “False” ,”off”,或 “0″。

配置sections常用于特定的常用选项组。可能在配置文件的一个section中定义这些选项,然后指定section为plucker-build的参数;其它选项全部从section中丢弃。

理解下列参数

PLUCKERHOME
见选项–pluckerhome.
alt_maxheight
见选项–alt-maxheight.
alt_maxwidth
见选项–alt-maxwidth.
anchor_color
链接所用颜色,表示为16个标准web颜色之一,或用web标准的RGB色彩概念。更多允许的颜色名和RGB概念见HTTP 4.0.1标准。
author_md
见选项–author.
auto_scale_images
一个布尔值;如果为真,plucker-build会自动尝试转换包含在文档中过大的图片到适合文档的较小的格式。默认为假。
backup_bit
见选项–backup.
big_icon
见选项–icon.
bmp_to_tbmp
windows中bmp2bmp程序名。默认为Bmp2Tbmp.exe。
bmp_to_tbmp_parameter
Windows中bmp2tbmp程序的参数。ImageMagick image parser.
bpp
见选项 –bpp.
cache_dir_name
指定PluckerDir的子目录用于存储缓存。默认为 “cache”。
category
见选项–category
color_paragraphs
布尔值;若为真,则在每段开始时插入特定的前景色。不是必要,默认关闭。
compression
见选项–compression.
convert_program
If using the deprecated imagemagick image parser, the name of the convert program. Defaults to convert (convert.exe for Windows).
convert_program_parameter
Windows ImageMagick 使用convert图像分析的参数。
copyprevention_bit
见选项–beamable.
db_file
Deprecated alternative to doc_file. May disappear in any release.
db_name
Deprecated alternative to doc_name. May disappear in any release.
default_charset
见选项–charset.
depth_first
见选项 –depth-first.
djpeg_program
djpeg程序名字。默认为djpeg.被netpbm2 image parser使用。
doc_file
见选项 –doc-file.
doc_name
见选项 –doc-name.
exclusion_lists
见选项 –exclusion-list. 如果这里指定了多个文件,它们应该用相应的操作系统的分隔符隔开(Unix平台是冒号,Windows平台是分号)。
filename_extension
用于文件名的扩展,默认为pdb。另一个可能是plkr。
giftopnm_program
用于转换GIF图片文件到PNM图片文件的程序名。用于netpbm和netpbm2 image parsers。默认为giftopnm.
guess_tbmp_size
布尔值,默认为真。用于Windows image parser.
home_maxdepth
见选项–maxdepth.
home_staybelow
见选项–staybelow.
home_stayondomain
见选项 –stayondomain.
home_stayonhost
见选项–stayonhost.
home_url
见选项–home-url.
home_url_pattern
见选项 –url-pattern.
http_proxy
String giving any HTTP proxy server to use. Sets the environment variable HTTP_PROXY to this value.
http_proxy_pass
String giving a password for any HTTP proxy. Sets the environment variable HTTP_PROXY_PASS to this value.
http_proxy_user
String giving a username for any HTTP proxy. Sets the environment variable HTTP_PROXY_USER to this value.
image_compression_limit
整数,设定压缩的图片字节的最小值。默认为0.图片小于这个的不会被压缩。
image_parser
字符串,指定使用的image parser。如果不指定,默认使用一个一个可用的。建议不指定这个配置参数,除非你知道你在做什么。可接受的值是 netpbm2, pil2, imagemagick2, netpbm (deprecated), pil (deprecated), imagemagick (deprecated), windowspil, windows (deprecated)。这个值在Java版的plucker-build中被忽略。
imagemagick_convert_command
imagemagick2 image parser中的ImageMagic转换程序的标识。默认为convert。
indent_paragraphs
布尔值,Boolean which when set will cause paragraphs to have leading indentation, but no extra leading space. Defaults to off.
launchable_bit
见选项 –launchable.
max_tbmp_size
Integer, maximum size for an image in the windows image parser.
maxheight
见选项 –maxheight.
maxwidth
见选项 –maxwidth.
no_dithering_in_java_image_quantization
布尔值,用在Java plucker-build image parser中当 图片量化为用在Palm中灰度或8位色图颜色固定的集合时关闭抖动。默认为假。
no_urlinfo
见选项 –no-urlinfo.
owner_id_build
见选项 –owner-id.
palm1bit_graymap_file
字符串,netpbm2和netpbm image parsers用来获取Palm色图文件的位置。
palm2bit_graymap_file
字符串,netpbm2和netpbm image parsers用来 获取Palm色图文件的位置。
palm4bit_graymap_file
字符串,netpbm2和netpbm image parsers用来获取Palm色图文件的位置。
palm8bit_stdcolormap_file
字符串,netpbm2和netpbm image parsers用来获取Palm色图文件的位置。
palmtopnm_program
字符串,netpbm2 image parser用来指定palmtopnm程序的位置。默认为palmtopnm.
pgmtopbm_program
字符串,netpbm2 image parser用来指定pgmtopbm程序的位置。默认为 pgmtopbm.
pluckerdir
见选项 –pluckerdir.
pngtopnm_program
字符串,netpbm2 image parser用来指定pngtopnm程序的位置。默认为 pngtopnm.
pnmcut_program
字符串,netpbm2 image parser用来指定pnmcut程序的位置。默认为pnmcut.
pnmdepth_program
字符串,netpbm2 image parser用来指定pnmdepth程序的位置。默认为 pnmdepth.
pnmfile_program
字符串,netpbm2 image parser用来指定pnmfile程序的位置。默认为pnmfile.
pnmscale_program
字符串,netpbm2 image parser用来指定pnmscale程序的位置。默认为 pnmscale.
ppmquant_program
字符串,netpbm2 image parser用来指定pnmquant程序的位置。默认为 pnmquant.
ppmtoTbmp_program
字符串,许多image parsers用来指定ppmtoTbmp(in various deprecated image parsers)程序或in netpbm2,the pnmtopalm program. In netpbm2的位置。 默认为pnmtopalm.
ppmtopgm_program
字符串,netpbm2 image parser用于指定ppmtopgm程序的位置。默认为ppmtopgm.
referrer
见选项–referrer.
retrieval_timeout
整数,用来以秒为单位尝试设置所有收取的超时。不会影响Java版plucker-build的超时。
small_icon
包含Palm图标的文件的文件名,用作文档的小图标,如果设定的launchable位。默认为内置的图标。
status_file
见选项–status-file.
status_line_length
整数,以字符数指定distiller输出的状态行的长度。默认为60。如果一行太长,省略中间的一部分字符。
tbmp_compression
布尔值,windows图像分析器用来标示是否在图片上使用Palm压缩。默认为真。
tbmp_compression_type
似乎也是布尔值,windows图像分析器用来标示是否在图片上使用Palm压缩。默认为真。这个参数与tbmp_compression 的不同不太清楚。
title_md
见选项 –title.
try_reduce_bpp
布尔值,控制图像分析器是否尝试缩放一个大图片通过降低图片的bpp数使之合适。只对netpbm2, imagemagick2, pil2, java, and windows parser有效。默认关闭。 try_reduce_bpp优先于 try_reduce_dimensionauto_scale_image.
try_reduce_dimension
布尔值,控制图像分析器是否尝试缩放一个大图片通过降低图片的尺寸使之合适。只对netpbm2, imagemagick2, pil2, java, and windows parser有效。
use_cache
见选项–update-cache. 名字误导人。
user_agent
见选项–user-agent.
verbosity
见选项–verbosity.
zlib_compression
指定使用zlib压缩。Deprecated in favor of compression.

参考

Plucker用户指南, at http://plkr.org/docs/.

BUGS

使用Debian BTs和reportbug工具报告bugs,或者直接反馈到http://bugs.plkr.org/ 或 <plucker-bugs@rubberchicken.org>

作者

Holger Duerer, <holly@starship.python.net>, and Bill Janssen, <bill@janssen.org>


Index

名称
SYNOPSIS
描述
选项
例子
环境变量
配置文件
参考
BUGS
作者

本文档由man2html使用手册页建立。
时间:2007年11月16日 10:30:24 GMT

Leave a Reply

Spam Protection by WP-SpamFree