下面是關於Debian 系統上可用的格式轉化工具及其相關提示的資訊。
Standard based tools are in very good shape but support for proprietary data formats are limited.
如下是文字資料轉換工具。
表 11.1. 文字資料轉化工具列表
軟件包 | 流行度 | 大小 | 關鍵詞 | 說明 |
---|---|---|---|---|
libc6
|
V:933, I:999 | 10679 | 字符集 | text encoding converter between locales by iconv(1) (fundamental) |
recode
|
V:5, I:35 | 608 | charset+eol | text encoding converter between locales (versatile, more aliases and features) |
konwert
|
V:2, I:58 | 123 | 字符集 | text encoding converter between locales (fancy) |
nkf
|
V:1, I:11 | 346 | 字符集 | character set translator for Japanese |
tcs
|
V:0, I:0 | 479 | 字符集 | character set translator |
unaccent
|
V:0, I:0 | 36 | 字符集 | replace accented letters by their unaccented equivalent |
tofrodos
|
V:2, I:35 | 50 | eol | text format converter between DOS and Unix: fromdos(1) and todos(1) |
macutils
|
V:0, I:1 | 298 | eol | text format converter between Macintosh and Unix: frommac(1) and tomac(1) |
![]() |
提示 |
---|---|
iconv(1)
是 |
你能夠通過如下的命令用 iconv(1) 來轉換文字檔案的編碼。
$ iconv -f encoding1 -t encoding2 input.txt >output.txt
編碼值是大小寫不敏感的,且會在匹配時忽略“-
”和“_
”。可以使用“iconv
-l
”命令檢查支援的編碼。
表 11.2. 編碼值和用法的列表
編碼值 | 用法 |
---|---|
ASCII | 美國資訊交換標準程式碼,7位程式碼不帶重音符號 |
UTF-8 | 用於所有現代作業系統的多語言標準 |
ISO-8859-1 | 舊的西歐語言標準,ASCII + 重音符號 |
ISO-8859-2 | 舊的東歐語言標準,ASCII + 重音符號 |
ISO-8859-15 | 舊的帶有歐元符號的西歐語言標準(ISO-8859-1) |
CP850 | code page 850,用於西歐語言的微軟 DOS 的帶有圖形的字元,ISO-8859-1 的變體 |
CP932 | code page 932, Microsoft Windows style Shift-JIS variant for Japanese |
CP936 | code page 936,用於簡體中文的微軟作業系統風格的 GB2312,GBK 或者 GB18030 的變體 |
CP949 | code page 949,用於韓語的微軟作業系統風格的 EUC-KR 或者 Unified Hangul Code 的變體 |
CP950 | code page 950,用於繁體中文的微軟作業系統風格的 Big5 的變體 |
CP1251 | code page 1251,用於西裡爾字母的微軟作業系統風格的編碼 |
CP1252 | code page 1252,用於西歐語言的微軟作業系統風格的 ISO-8859-15 的變體 |
KOI8-R | 用於西裡爾字母的舊俄語 UNIX 標準 |
ISO-2022-JP | standard encoding for Japanese email which uses only 7 bit codes |
eucJP | old Japanese UNIX standard 8 bit code and completely different from Shift-JIS |
Shift-JIS | JIS X 0208 Appendix 1 standard for Japanese (see CP932) |
![]() |
注意 |
---|---|
一些編碼只支援資料轉換,它不能作為語言環境的值 (第 8.3.1 节 “編碼的基礎知識”)。 |
像 ASCII 和 ISO-8859 這樣適用於單位元組的字符集,字元編碼和字符集幾乎指的是同一件事情。
For character sets with many characters such as JIS X 0213 for Japanese or Universal Character Set (UCS, Unicode, ISO-10646-1) for practically all languages, there are many encoding schemes to fit them into the sequence of the byte data.
EUC and ISO/IEC 2022 (also known as JIS X 0202) for Japanese
Unicode 的 UTF-8、UTF-16/UCS-2 和 UTF-32/UCS-4 編碼
對於以上這些,字符集和字元編碼之間有著明顯的區別。
The code page is used as the synonym to the character encoding tables for some vendor specific ones.
![]() |
注意 |
---|---|
Please note most encoding systems share the same code with ASCII for the 7
bit characters. But there are some exceptions. If you are converting old
Japanese C programs and URLs data from the casually-called shift-JIS
encoding format to UTF-8 format, use " |
![]() |
提示 |
---|---|
recode(1)
也可能被使用並且不僅僅是
iconv(1),fromdos(1),todos(1),frommac(1)
和
tomac(1)
功能的結合。想要獲得更多資訊,請參見 " |
你能夠通過如下命令用 iconv(1) 來檢查一個文字檔案是不是用 UTF-8 編碼的。
$ iconv -f utf8 -t utf8 input.txt >/dev/null || echo "non-UTF-8 found"
![]() |
提示 |
---|---|
在上面的例子中使用 " |
Here is an example script to convert encoding of file names from ones created under older OS to modern UTF-8 ones in a single directory.
#!/bin/sh ENCDN=iso-8859-1 for x in *; do mv "$x" "$(echo "$x" | iconv -f $ENCDN -t utf-8)" done
The "$ENCDN
" variable specifies the original encoding
used for file names under older OS as in 表 11.2 “編碼值和用法的列表”.
For more complicated case, please mount a filesystem (e.g. a partition on a
disk drive) containing such file names with proper encoding as the
mount(8)
option (see 第 8.3.6 节 “檔名編碼”) and copy its entire
contents to another filesystem mounted as UTF-8 with "cp
-a
" command.
The text file format, specifically the end-of-line (EOL) code, is dependent on the platform.
表 11.3. List of EOL styles for different platforms
platform | EOL code | control | decimal | hexadecimal |
---|---|---|---|---|
Debian (unix) | LF |
^J
|
10 | 0A |
MSDOS and Windows | CR-LF |
^M^J
|
13 10 | 0D 0A |
Apple's Macintosh | CR |
^M
|
13 | 0D |
The EOL format conversion programs, fromdos(1), todos(1), frommac(1), and tomac(1), are quite handy. recode(1) is also useful.
![]() |
注意 |
---|---|
Some data on the Debian system, such as the wiki page data for the
|
![]() |
注意 |
---|---|
Most editors (eg. |
![]() |
提示 |
---|---|
The use of " |
這裡有一些轉換 TAB 程式碼的專業工具。
表 11.4. bsdmainutils
和 coreutils
包中的用於轉換 TAB
的命令列表
功能 |
bsdmainutils
|
coreutils
|
---|---|---|
把製表符擴充套件成空格 |
"col -x "
|
expand
|
不把空格擴充套件成製表符 |
"col -h "
|
unexpand
|
indent
包中的
indent(1)
命令能夠重新格式化 C 程式中的空格。
例如 vim
和 emacs
這樣的編輯軟體可以被用來擴充套件 TAB。就拿
vim
來說,你能夠按順序輸入 ":set expandtab
" 和
":%retab
" 命令來擴充套件 TAB。你也可以按順序輸入 :%set
noexpandtab
" 和 ":%retab
" 命令來複原。
像 vim
這樣的現代智慧編輯器軟體是相當聰明的並且能夠處理任何編碼系統以及任何檔案格式。你應該在支援 UTF-8
編碼的控制檯上並在 UTF-8 環境下使用這些編輯器來獲得最好的相容性。
以 latin1(iso-8859-1)編碼儲存的舊西歐語言的 Unix
文字檔案,“u-file.txt
”,能通過如下所示的用 vim
輕易的編輯。
$ vim u-file.txt
這是可能的因為 vim
的檔案編碼自動檢測機制先假定檔案是 UTF-8 編碼,如果失敗了,則假定它是 latin1
編碼。
以 latin2(iso-8859-2) 編碼儲存的舊波蘭語的 Unix
文字檔案,“pu-file.txt
”,能通過如下所示的用 vim
編輯。
$ vim '+e ++enc=latin2 pu-file.txt'
An old Japanese unix text file, "ju-file.txt
", stored in
the eucJP encoding can be edited with vim
by the
following.
$ vim '+e ++enc=eucJP ju-file.txt'
An old Japanese MS-Windows text file, "jw-file.txt
",
stored in the so called shift-JIS encoding (more precisely: CP932) can be
edited with vim
by the following.
$ vim '+e ++enc=CP932 ++ff=dos jw-file.txt'
When a file is opened with "++enc
" and
"++ff
" options, ":w
" in the Vim
command line stores it in the original format and overwrite the original
file. You can also specify the saving format and the file name in the Vim
command line, e.g., ":w ++enc=utf8 new.txt
".
Please refer to the mbyte.txt "multi-byte text support" in
vim
on-line help and 表 11.2 “編碼值和用法的列表” for locale values used with
"++enc
".
The emacs
family of programs can perform the equivalent
functions.
The following reads a web page into a text file. This is very useful when copying configurations off the Web or applying basic Unix text tools such as grep(1) on the web page.
$ w3m -dump http://www.remote-site.com/help-info.html >textfile
同樣,你可以使用如下所示的工具從其他格式提取純文字資料。
表 11.5. 用於提取純文字資料的工具列表
軟件包 | 流行度 | 大小 | 關鍵詞 | 功能 |
---|---|---|---|---|
w3m
|
V:212, I:813 | 2294 | html→text |
用 "w3m -dump " 命令把 HTML 轉化為文字的轉換器
|
html2text
|
V:21, I:74 | 258 | html→text | advanced HTML to text converter (ISO 8859-1) |
lynx
|
V:32, I:104 | 1901 | html→text |
用 "lynx -dump " 命令把 HTML 轉化為文字的轉化器
|
elinks
|
V:14, I:32 | 1587 | html→text |
用 "elinks -dump " 命令把 HTML 轉化為文字的轉換器
|
links
|
V:17, I:46 | 2149 | html→text |
用 "links -dump " 命令把 HTML 轉化為文字的轉換器
|
links2
|
V:2, I:17 | 5392 | html→text |
用 "links2 -dump " 命令把 HTML 轉化為文字的轉換器
|
antiword
|
V:6, I:14 | 623 | MSWord→text,ps | 轉化 MSWord 檔案到純文字或 ps 檔案 |
catdoc
|
V:27, I:45 | 676 | MSWord→text,TeX | 轉化 MSWord 檔案到純文字或 TeX檔案 |
pstotext
|
V:4, I:7 | 126 | ps/pdf→text | extract text from PostScript and PDF files |
unhtml
|
V:0, I:0 | 42 | html→text | 從一個 HTML 檔案裡面刪除標記標籤 |
odt2txt
|
V:3, I:6 | 53 | odt→text | 從開放文件格式到文字格式的轉化器 |
你可以通過如下所示的來高亮並格式化純文字資料。
表 11.6. 高亮純文字資料的工具列表
軟件包 | 流行度 | 大小 | 關鍵詞 | 說明 |
---|---|---|---|---|
vim-runtime
|
V:20, I:433 | 27580 | 高亮 |
Vim MACRO to convert source code to HTML with ":source
$VIMRUNTIME/syntax/html.vim "
|
cxref
|
V:0, I:0 | 1174 | c→html | 從 C 程式到 latex 和 HTML 的轉換器(C語言) |
src2tex
|
V:0, I:0 | 622 | 高亮 | 轉換許多原始碼到 TeX(C語言) |
source-highlight
|
V:1, I:7 | 2008 | 高亮 | convert many source codes to HTML, XHTML, LaTeX, Texinfo, ANSI color escape sequences and DocBook files with highlight (C++) |
highlight
|
V:1, I:16 | 997 | 高亮 | 轉化許多原始碼到帶有高亮顯示的 HTML, XHTML, RTF, LaTeX, TeX or XSL-FO 檔案。(C++) |
grc
|
V:0, I:2 | 104 | text→color | generic colouriser for everything (Python) |
txt2html
|
V:0, I:4 | 296 | text→html | 文字到 HTML 轉換器(Perl) |
markdown
|
V:0, I:7 | 56 | text→html | markdown text document formatter to (X)HTML (Perl) |
asciidoc
|
V:0, I:14 | 63 | text→any | AsciiDoc text document formatter to XML/HTML (Python) |
pandoc
|
V:4, I:26 | 69422 | text→any | general markup converter (Haskell) |
python-docutils
|
V:41, I:569 | 1725 | text→any | ReStructured Text document formatter to XML (Python) |
txt2tags
|
V:0, I:1 | 951 | text→any | document conversion from text to HTML, SGML, LaTeX, man page, MoinMoin, Magic Point and PageMaker (Python) |
udo
|
V:0, I:0 | 569 | text→any | universal document - text processing utility (C language) |
stx2any
|
V:0, I:0 | 264 | text→any | document converter from structured plain text to other formats (m4) |
rest2web
|
V:0, I:0 | 526 | text→html | document converter from ReStructured Text to html (Python) |
aft
|
V:0, I:0 | 235 | text→any | "free form" document preparation system (Perl) |
yodl
|
V:0, I:0 | 547 | text→any | pre-document language and tools to process it (C language) |
sdf
|
V:0, I:0 | 1445 | text→any | simple document parser (Perl) |
sisu
|
V:0, I:0 | 5338 | text→any | document structuring, publishing and search framework (Ruby) |
The Extensible Markup Language (XML) is a markup language for documents containing structured information.
See introductory information at XML.COM.
XML text looks somewhat like HTML. It enables
us to manage multiple formats of output for a document. One easy XML system
is the docbook-xsl
package, which is used here.
Each XML file starts with standard XML declaration as the following.
<?xml version="1.0" encoding="UTF-8"?>
The basic syntax for one XML element is marked up as the following.
<name attribute="value">content</name>
XML element with empty content is marked up in the following short form.
<name attribute="value"/>
The "attribute="value"
" in the above examples are
optional.
The comment section in XML is marked up as the following.
<!-- comment -->
Other than adding markups, XML requires minor conversion to the content using predefined entities for following characters.
表 11.7. List of predefined entities for XML
predefined entity | character to be converted into |
---|---|
"
|
" : quote
|
'
|
' : apostrophe
|
<
|
< : less-than
|
>
|
> : greater-than
|
&
|
& : ampersand
|
![]() |
小心 |
---|---|
" |
![]() |
注意 |
---|---|
When SGML style user defined entities,
e.g. " |
![]() |
注意 |
---|---|
As long as the XML markup are done consistently with certain set of the tag name (either some data as content or attribute value), conversion to another XML is trivial task using Extensible Stylesheet Language Transformations (XSLT). |
There are many tools available to process XML files such as the Extensible Stylesheet Language (XSL).
Basically, once you create well formed XML file, you can convert it to any format using Extensible Stylesheet Language Transformations (XSLT).
The Extensible Stylesheet
Language for Formatting Objects (XSL-FO) is supposed to be solution
for formatting. The fop
package is new to the Debian
main
archive due to its dependence to the Java programing language. So the
LaTeX code is usually generated from XML using XSLT and the LaTeX system is
used to create printable file such as DVI, PostScript, and PDF.
表 11.8. List of XML tools
軟件包 | 流行度 | 大小 | 關鍵詞 | 說明 |
---|---|---|---|---|
docbook-xml
|
I:530 | 2131 | xml | XML document type definition (DTD) for DocBook |
xsltproc
|
V:15, I:120 | 149 | xslt | XSLT command line processor (XML→ XML, HTML, plain text, etc.) |
docbook-xsl
|
V:15, I:231 | 14998 | xml/xslt | XSL stylesheets for processing DocBook XML to various output formats with XSLT |
xmlto
|
V:3, I:37 | 126 | xml/xslt | XML-to-any converter with XSLT |
dbtoepub
|
V:0, I:1 | 71 | xml/xslt | DocBook XML to .epub converter |
dblatex
|
V:6, I:25 | 4639 | xml/xslt | convert Docbook files to DVI, PostScript, PDF documents with XSLT |
fop
|
V:3, I:53 | 64 | xml/xsl-fo | convert Docbook XML files to PDF |
Since XML is subset of Standard Generalized Markup Language (SGML), it can be processed by the extensive tools available for SGML, such as Document Style Semantics and Specification Language (DSSSL).
表 11.9. List of DSSSL tools
軟件包 | 流行度 | 大小 | 關鍵詞 | 說明 |
---|---|---|---|---|
openjade
|
V:3, I:36 | 988 | dsssl | ISO/IEC 10179:1996 standard DSSSL processor (latest) |
openjade1.3
|
V:0, I:0 | NOT_FOUND | dsssl | ISO/IEC 10179:1996 standard DSSSL processor (1.3.x series) |
jade
|
V:0, I:11 | NOT_FOUND | dsssl | James Clark's original DSSSL processor (1.2.x series) |
docbook-dsssl
|
V:2, I:39 | 2604 | xml/dsssl | DSSSL stylesheets for processing DocBook XML to various output formats with DSSSL |
docbook-utils
|
V:1, I:27 | 281 | xml/dsssl |
utilities for DocBook files including conversion to other formats (HTML,
RTF, PS, man, PDF) with docbook2* commands with DSSSL
|
sgml2x
|
V:0, I:0 | 90 | SGML/dsssl | converter from SGML and XML using DSSSL stylesheets |
You can extract HTML or XML data from other formats using followings.
表 11.10. List of XML data extraction tools
軟件包 | 流行度 | 大小 | 關鍵詞 | 說明 |
---|---|---|---|---|
wv
|
V:6, I:9 | 717 | MSWord→any | document converter from Microsoft Word to HTML, LaTeX, etc. |
texi2html
|
V:0, I:10 | 1832 | texi→html | converter from Texinfo to HTML |
man2html
|
V:0, I:3 | 141 | manpage→html | converter from manpage to HTML (CGI support) |
tex4ht
|
V:1, I:22 | 36 | tex↔html | converter between (La)TeX and HTML |
unrtf
|
V:2, I:4 | 145 | rtf→html | document converter from RTF to HTML, etc |
info2www
|
V:3, I:4 | 156 | info→html | converter from GNU info to HTML (CGI support) |
ooo2dbk
|
V:0, I:1 | 217 | sxw→xml | converter from OpenOffice.org SXW documents to DocBook XML |
wp2x
|
V:0, I:0 | 215 | WordPerfect→any | WordPerfect 5.0 and 5.1 files to TeX, LaTeX, troff, GML and HTML |
doclifter
|
V:0, I:0 | 457 | troff→xml | converter from troff to DocBook XML |
For non-XML HTML files, you can convert them to XHTML which is an instance of well formed XML. XHTML can be processed by XML tools.
表 11.11. List of XML pretty print tools
軟件包 | 流行度 | 大小 | 關鍵詞 | 說明 |
---|---|---|---|---|
libxml2-utils
|
V:24, I:318 | 177 | xml↔html↔xhtml | command line XML tool with xmllint(1) (syntax check, reformat, lint, …) |
tidy
|
V:2, I:17 | 83 | xml↔html↔xhtml | HTML syntax checker and reformatter |
Once proper XML is generated, you can use XSLT technology to extract data based on the mark-up context etc.
Unix上的 troff 程式最初是由 AT&T 公司開發的,可以被用做簡單排版。現在被用來建立手冊頁。
Donald Knuth 發明的 Tex 是非常強大的排版工具也是實際上的標準。最初是由 Leslie Lamport 開發的 LaTex 使得使用者可以更為方便的利用 Tex 的強大功能。
傳統意義上,roff 是 Unix 上主要的文字處理系統。參見
roff(7),
groff(7),
groff(1),
grotty(1),
troff(1),
groff_mdoc(7),
groff_man(7),
groff_ms(7),
groff_me(7),
groff_mm(7)
和 "info groff
"。
You can read or print a good tutorial and reference on
"-me
" macro in
"/usr/share/doc/groff/
" by installing the
groff
package.
![]() |
提示 |
---|---|
" |
![]() |
提示 |
---|---|
To remove "^H" and "_" from a text file generated by
|
The TeX Live software distribution offers a
complete TeX system. The texlive
metapackage provides a
decent selection of the TeX Live packages
which should suffice for the most common tasks.
tex(1)
latex(1)
texdoc(1)
texdoctk(1)
"The TeXbook", 作者 Donald E. Knuth, (Addison-Wesley)
"LaTeX - A Document Preparation System", 作者 Leslie Lamport, (Addison-Wesley)
"The LaTeX Companion", 作者 Goossens, Mittelbach, Samarin, (Addison-Wesley)
This is the most powerful typesetting environment. Many SGML processors use this as their back end text
processor. Lyx provided by the
lyx
package and GNU
TeXmacs provided by the texmacs
package offer
nice WYSIWYG editing environment for LaTeX while many use Emacs and Vim as the choice
for the source editor.
有許多線上資源存在。
TEX Live Guide - TEX Live 2007
("/usr/share/doc/texlive-doc-base/english/texlive-en/live.html
")
(texlive-doc-base
包)
When documents become bigger, sometimes TeX may cause errors. You must
increase pool size in "/etc/texmf/texmf.cnf
" (or more
appropriately edit "/etc/texmf/texmf.d/95NonPath
" and run
update-texmf(8))
to fix this.
![]() |
注意 |
---|---|
The TeX source of "The TeXbook" is available at http://tug.ctan.org/tex-archive/systems/knuth/dist/tex/texbook.tex.
This file contains most of the required macros. I heard that you can
process this document with
tex(1)
after commenting lines 7 to 10 and adding " |
你能夠用如下任意一個命令在印表機上漂亮的列印手冊頁。
$ man -Tps some_manpage | lpr
$ man -Tps some_manpage | mpage -2 | lpr
The second example prints 2 pages on one sheet.
Printable data is expressed in the PostScript format on the Debian system. Common Unix Printing System (CUPS) uses Ghostscript as its rasterizer backend program for non-PostScript printers.
處理可印刷的資料的核心是 Ghostscript PostScript 直譯器,它能夠生成光柵影象。
The latest upstream Ghostscript from Artifex was re-licensed from AFPL to GPL and merged all the latest ESP version changes such as CUPS related ones at 8.60 release as unified release.
表 11.14. Ghostscript PostScript 直譯器列表
軟件包 | 流行度 | 大小 | 說明 |
---|---|---|---|
ghostscript
|
V:123, I:686 | 225 | GPL Ghostscript PostScript/PDF 直譯器 |
ghostscript-x
|
V:25, I:76 | 211 | GPL Ghostscript PostScript/PDF 直譯器-X 顯示支援 |
libpoppler64
|
V:45, I:109 | 3214 | PDF rendering library forked from the xpdf PDF viewer |
libpoppler-glib8
|
V:233, I:525 | 435 | PDF 渲染庫(基於 Glib 的共享庫) |
poppler-data
|
V:96, I:669 | 12123 | CMaps for PDF rendering library (for CJK support: Adobe-*) |
![]() |
提示 |
---|---|
" |
你能夠使用 Ghostscript 中的 gs(1) 來合併兩個 PostScript(PS) 或可移植文件格式(PDF) 檔案。
$ gs -q -dNOPAUSE -dBATCH -sDEVICE=pswrite -sOutputFile=bla.ps -f foo1.ps foo2.ps $ gs -q -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=bla.pdf -f foo1.pdf foo2.pdf
![]() |
提示 |
---|---|
對於命令列來說,psmerge(1)
和 |
如下是處理可印刷資料的工具列表。
表 11.15. 處理可印刷資料的工具列表
軟件包 | 流行度 | 大小 | 關鍵詞 | 說明 |
---|---|---|---|---|
poppler-utils
|
V:53, I:488 | 526 | pdf→ps,text,… |
PDF 工具:pdftops , pdfinfo ,
pdfimages , pdftotext ,
pdffonts
|
psutils
|
V:11, I:199 | 219 | ps→ps | PostScript 檔案轉換工具 |
poster
|
V:0, I:7 | 49 | ps→ps | create large posters out of PostScript pages |
enscript
|
V:2, I:27 | 2111 | text→ps, html, rtf | 轉化 ASCII 文字到 PostScript, HTML, RTF 或 Pretty-Print |
a2ps
|
V:3, I:28 | 3624 | text→ps | 'Anything to PostScript' converter and pretty-printer |
pdftk
|
V:8, I:57 | 3873 | pdf→pdf |
PDF 文件轉換工具:pdftk
|
mpage
|
V:0, I:5 | 141 | text,ps→ps | print multiple pages per sheet |
html2ps
|
V:0, I:5 | 320 | html→ps | 從 HTML 到 PostScript 的轉換器 |
gnuhtml2latex
|
V:0, I:1 | 53 | html→latex | 從 html 到 latex 的轉換器 |
latex2rtf
|
V:0, I:7 | 475 | latex→rtf | 轉換 LaTeX 文件到能被 Microsoft Word 讀取的 RTF 格式的文件 |
ps2eps
|
V:7, I:113 | 94 | ps→eps | 從 PostScript 到 EPS(Encapsulated PostScript)的轉換器 |
e2ps
|
V:0, I:0 | 112 | text→ps | Text to PostScript converter with Japanese encoding support |
impose+
|
V:0, I:1 | 180 | ps→ps | PostScript 工具 |
trueprint
|
V:0, I:0 | 138 | text→ps | 漂亮的列印許多源程式(C, C++, Java, Pascal, Perl, Pike, Sh, 和 Verilog)到 PostScript。(C 語言) |
pdf2svg
|
V:0, I:5 | 27 | ps→svg | PDF 到可升級的向量圖形格式的轉換器 |
pdftoipe
|
V:0, I:0 | 63 | ps→ipe | 從 PDF 到 IPE‘s XML 格式的轉換器 |
Unix 通用列印系統(CUPS) 中的 lp(1) 和 lpr(1) 命令都提供了自定義列印資料的選項。
你可以使用下列命令中的一個來列印 3 份有裝訂頁碼的檔案。
$ lp -n 3 -o Collate=True filename
$ lpr -#3 -o Collate=True filename
你能夠通過 "-o number-up=2
", "-o
page-set=even
", "-o page-set=odd
", "-o
scaling=200
", "-o natural-scaling=200
"
等等印表機選項來進一步定製印表機操作,詳細的文件參見命令列列印和選項。
下列郵件資料轉換軟體包捕獲了我的眼球。
表 11.16. 有助於郵件資料轉換的軟體包列表
軟件包 | 流行度 | 大小 | 關鍵詞 | 說明 |
---|---|---|---|---|
sharutils
|
V:8, I:117 | 1385 | 郵件 | shar(1), unshar(1), uuencode(1), uudecode(1) |
mpack
|
V:2, I:25 | 91 | MIME | 編碼和解碼 MIME 資訊: mpack(1) 和 munpack(1) |
tnef
|
V:6, I:11 | 98 | ms-tnef | 解包 MIME 附件型別 "application/ms-tnef",該格式僅由微軟使用 |
uudeview
|
V:0, I:5 | 97 | 郵件 | 下列格式的編碼器和解碼器: uuencode, xxencode, BASE64, quoted printable 和 BinHex |
readpst
|
I:1 | 21 | PST | 轉化微軟的 Outlook PST 檔案 到 mbox 格式 |
![]() |
提示 |
---|---|
如果郵件客戶端可以配置使用 IMAP4 伺服器,網際網路訊息訪問協議 版本 4 (IMAP4) 伺服器 (參見 第 6.7 节 “POP3/IMAP4 伺服器”) 可以用來把郵件從專有郵件系統裡面移出來。 |
郵件 (SMTP) 資料需要被限制為 7 位資料序列。二進位制資料和 8 位文字資料使用 Multipurpose Internet Mail Extensions (MIME) 網際網路多用途郵件擴充套件 和選擇的字符集編碼到 7 位格式。(參見 第 8.3.1 节 “編碼的基礎知識”).
標準的郵件儲存格式是 mbox,它是依據 RFC2822 (由 RFC822
更新) 來的格式. 參見
mbox(5)
(由 mutt
軟體包提供).
對於歐洲語言,由於沒有什麼 8 位字元,"Content-Transfer-Encoding:
quoted-printable
" 加 ISO-8859-1 字符集通常被用於郵件。如果歐洲文字是被編碼為 UTF-8,由於幾乎全是
7 位資料,使用 "Content-Transfer-Encoding: quoted-printable
"
也是合適的。
對於日語,傳統的 "Content-Type: text/plain; charset=ISO-2022-JP
"
通常被用於郵件來保持文字在 7 位。但是老的微軟系統會在沒有宣告的情況下使用 Shift-JIS 來發送郵件。如果日語文字是用 UTF-8 編碼,
由於含有許多 8 位資料,使用 Base64 是合適的。其它亞洲語言也是類似情形。
![]() |
注意 |
---|---|
如果你的非 Unix 郵件資料可以通過一個具備和 IMAP4 服務通訊的非 Debian 客戶端訪問,你可以通過執行你的 IMAP4 服務來將郵件資料移出。(參見 第 6.7 节 “POP3/IMAP4 伺服器”). |
![]() |
注意 |
---|---|
如果你使用其它郵件儲存格式,第一步把它們移動到 mbox 格式比較好。像 mutt(1) 這樣多功能的客戶端程式可以便捷的完成這類操作。 |
你可以使用 procmail(1) 和 formail(1) 把郵箱內容分開成每一封郵件.
每一封郵件能夠使用來自 mpack
軟體包的
munpack(1)
命令(或其它特異的工具)來獲得 MIME 編碼內容。
如下是關於圖形資料轉換、編輯和管理的工具包。
表 11.17. 圖形資料工具列表
軟件包 | 流行度 | 大小 | 關鍵詞 | 說明 |
---|---|---|---|---|
gimp
|
V:91, I:507 | 16278 | 圖形(點陣圖) | GNU 圖形處理程式 |
imagemagick
|
V:142, I:538 | 192 | 圖形(點陣圖) | 圖形處理程式 |
graphicsmagick
|
V:7, I:15 | 4821 | 圖形(點陣圖) |
影象處理程式(imagemagick 派生出來的)
|
xsane
|
V:22, I:191 | 909 | 圖形(點陣圖) | GTK+-based X11 frontend for SANE (Scanner Access Now Easy) |
netpbm
|
V:29, I:541 | 4302 | 圖形(點陣圖) | 圖形介面的轉換工具 |
icoutils
|
V:8, I:80 | 191 | png↔ico(bitmap) | convert MS Windows icons and cursors to and from PNG formats (favicon.ico) |
scribus
|
V:13, I:29 | 19136 | ps/pdf/SVG/… | Scribus DTP 編輯器 |
libreoffice-draw
|
V:320, I:478 | 8970 | 圖形(向量) | LibreOffice 辦公套件-繪畫 |
inkscape
|
V:141, I:354 | 129840 | 圖形(向量) | SVG(可升級向量圖形)編輯器 |
dia-gnome
|
V:5, I:10 | 20 | 圖形(向量) | 圖表編輯器(GNOME) |
dia
|
V:25, I:41 | 3881 | 圖形(向量) | 圖表編輯器(Gtk) |
xfig
|
V:12, I:19 | 1795 | 圖形(向量) | Facility for Interactive Generation of figures under X11 |
pstoedit
|
V:13, I:339 | 667 | ps/pdf→image(向量) | PostScript 和 PDF 檔案到可編輯的向量圖形的轉換器(SVG) |
libwmf-bin
|
V:13, I:359 | 104 | Windows/image(vector) | Windows metafile (vector graphic data) conversion tools |
fig2sxd
|
V:0, I:0 | 149 | fig→sxd(vector) | 轉換 XFig 檔案為 OpenOffice.org 繪畫格式 |
unpaper
|
V:2, I:16 | 453 | image→image | post-processing tool for scanned pages for OCR |
tesseract-ocr
|
V:4, I:28 | 558 | image→text | 基於惠普的商業 OCR 引擎的免費 OCR 軟體 |
tesseract-ocr-eng
|
I:29 | 37486 | image→text | OCR engine data: tesseract-ocr language files for English text |
gocr
|
V:1, I:23 | 477 | image→text | 免費 OCR 軟體 |
ocrad
|
V:1, I:7 | 299 | image→text | 免費 OCR 軟體 |
eog
|
V:95, I:329 | 10582 | image(Exif) | Eye of GNOME 影象瀏覽程式 |
gthumb
|
V:15, I:26 | 3269 | image(Exif) | 影象瀏覽器(GNOME) |
geeqie
|
V:16, I:24 | 1588 | image(Exif) | 基於 GTK+ 的影象瀏覽器 |
shotwell
|
V:15, I:126 | 5762 | image(Exif) | 數碼相片管理器(GNOME) |
gtkam
|
V:0, I:7 | 1079 | image(Exif) | application for retrieving media from digital cameras (GTK+) |
gphoto2
|
V:1, I:14 | 969 | image(Exif) | gphoto2 軟體是命令列方式的管理數碼相機的工具 |
gwenview
|
V:29, I:104 | 4509 | image(Exif) | 圖片瀏覽器(KDE) |
kamera
|
V:3, I:104 | 230 | image(Exif) | KDE 上的支援數碼相機的應用軟體 |
digikam
|
V:4, I:17 | 1760 | image(Exif) | 用於 KDE 桌面環境的數字照片管理應用 |
exiv2
|
V:5, I:71 | 247 | image(Exif) | EXIF/IPTC 元資料處理工具 |
exiftran
|
V:2, I:25 | 71 | image(Exif) | transform digital camera jpeg images |
jhead
|
V:1, I:13 | 105 | image(Exif) | manipulate the non-image part of Exif compliant JPEG (digital camera photo) files |
exif
|
V:1, I:10 | 236 | image(Exif) | 顯示 JPEG 檔案中的 EXIF 資訊的命令列工具 |
exiftags
|
V:0, I:4 | 288 | image(Exif) | utility to read Exif tags from a digital camera JPEG file |
exifprobe
|
V:0, I:3 | 482 | image(Exif) | 從數碼圖片中讀取元資料 |
dcraw
|
V:3, I:24 | 384 | image(Raw)→ppm | decode raw digital camera images |
findimagedupes
|
V:0, I:1 | 79 | image→fingerprint | 找到相似或重複的影象 |
ale
|
V:0, I:0 | 753 | image→image | merge images to increase fidelity or create mosaics |
imageindex
|
V:0, I:0 | 144 | image(Exif)→html | generate static HTML galleries from images |
outguess
|
V:0, I:1 | 216 | jpeg,png | universal Steganographic tool |
librecad
|
V:11, I:18 | 8039 | DXF | CAD 資料編輯器(KDE) |
blender
|
V:4, I:31 | 101399 | blend, TIFF, VRML, … | 3D content editor for animation etc |
mm3d
|
V:0, I:0 | 5314 | ms3d, obj, dxf, … | 基於 OpenGL 的 3D 模型編輯器 |
open-font-design-toolkit
|
I:0 | 11 | ttf, ps, … | metapackage for open font design |
fontforge
|
V:1, I:10 | 91 | ttf, ps, … | 用於 PS,TrueType 和 OpenType 的字型編輯器 |
xgridfit
|
V:0, I:0 | 898 | ttf | program for gridfitting and hinting TrueType fonts |
![]() |
提示 |
---|---|
在
aptitude(8)
(參考第 2.2.6 节 “aptitude 搜尋方式選項”)中用正則表示式
" |
雖然像 gimp(1) 這樣的圖形介面程式是非常強大的,但像 imagemagick(1) 這樣的命令列工具在用指令碼自動化處理影象時是很有用的。
實際上的數碼相機的影象是可交換的影象檔案格式(EXIF),這種格式是在 JPEG 影象檔案格式上新增一些元資料標籤。它能夠儲存諸如日期、時間和相機設定的資訊。
The Lempel-Ziv-Welch (LZW)無損資料壓縮專利已經過期了。使用 LZW 壓縮方式的 圖形互動格式(GIF)工具現在可以在 Debian 系統上自由使用了。
![]() |
提示 |
---|---|
任何帶有可移動記錄介質的數碼相機或掃描器都可以在 Linux 上通過 USB 儲存讀取器來工作,因為它遵循相機檔案系統設計規則並且使用 FAT 檔案系統,參考第 10.1.7 节 “可移動儲存裝置”。 |
這裡有許多其他用於資料轉換的工具。在
aptitude(8)(參考
第 2.2.6 节 “aptitude 搜尋方式選項”) 裡用正則表示式
"~Guse::converting"
" 來查詢如下的軟體包。
你能夠通過如下的命令從 RPM 格式的包中提取資料。
$ rpm2cpio file.src.rpm | cpio --extract