文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>电子书推荐python for you and me

电子书推荐python for you and me

时间:2009-05-05  来源:适兕

这是fedorahosted.org下的一个子项目。项目地址在:https://fedorahosted.org/pym/
其实你大可以不按照下面的内容走,直接下载pdf文档或在线看就是了。而我却想简单的将publican的工具操作介绍一番:
在开源界混熟了的人。都喜欢用版本控制工具直接下载源码,svn,git,cvs等等。那么我也不能例外:
切换到我放置源代码的目录:执行:
git clone git://git.fedorahosted.org/git/pym.git
终端输出:
Initialized empty Git repository in /media/disk-2/linux_third_party_software/pym/.git/
remote: Counting objects: 173, done.
remote: Compressing objects: 100% (112/112), done.
remote: Total 173 (delta 57), reused 173 (delta 57)
Receiving objects: 100% (173/173), 177.49 KiB | 20 KiB/s, done.
Resolving deltas: 100% (57/57), done.
切换到pym目录:然后执行:
[lee@python pym]$ make
Makefile:13: /usr/share/publican/make/Makefile.common: 没有那个文件或目录
make: *** 没有规则可以创建目标“/usr/share/publican/make/Makefile.common”。 停止。
这个时候表明我的系统里没有publican套件:庆幸有yum.
先搜索关键字:
[lee@python pym]$ sudo yum search publican
[sudo] password for lee:
载入插件: fastestmirror, refresh-packagekit
Repository fedora-debuginfo is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * updates-source: ftp.chg.ru
 * kriehn: optics.csufresno.edu
 * fedora: ftp.chg.ru
 * kde-redhat: ftp.heanet.ie
 * rpmfusion-free-updates: astromirror.uchicago.edu
 * rpmfusion-free: astromirror.uchicago.edu
 * updates-debuginfo: ftp.chg.ru
 * rpmfusion-nonfree-updates: astromirror.uchicago.edu
 * updates: ftp.chg.ru
 * freshrpms: ayo.ie.freshrpms.net
 * rpmfusion-nonfree: astromirror.uchicago.edu
 * kde-redhat-all: ftp.heanet.ie
updates-source                                                                                                                 |  703 B     00:00    
http://ftp.chg.ru/pub/Linux/fedora/linux/updates/10/SRPMS/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for updates-source: Damaged repomd.xml file
尝试其他镜像.
updates-source                                                                                                                 | 2.1 kB     00:01    
skype                                                                                                                          |  951 B     00:00    
kriehn                                                                                                                         | 1.0 kB     00:00    
fedora                                                                                                                         |  703 B     00:00    
http://ftp.chg.ru/pub/Linux/fedora/linux/releases/10/Everything/i386/os/repodata/repomd.xml: [Errno -1] Error importing repomd.xml for fedora: Damaged repomd.xml file
尝试其他镜像.
fedora                                                                                                                         | 2.8 kB     00:01    
kde-redhat                                                                                                                     | 2.1 kB     00:01    
rpmfusion-free-updates                                                                                                         | 2.1 kB     00:00    
planetccrma                                                                                                                    | 1.9 kB     00:00    
planetccrma/primary_db                                                                                                         | 208 kB     00:11    
rpmfusion-free                                                                                                                 | 2.7 kB     00:00    
adobe-linux-i386                                                                                                               |  951 B     00:00    
updates-debuginfo                                                                                                              | 1.9 kB     00:00    
rpmfusion-nonfree-updates                                                                                                      | 2.1 kB     00:00    
fedora-debuginfo                                                                                                               | 2.2 kB     00:01    
planetcore                                                                                                                     | 1.9 kB     00:00    
updates                                                                                                                        | 2.3 kB     00:00    
freshrpms                                                                                                                      | 2.0 kB     00:00    
rpmfusion-nonfree                                                                                                              | 2.7 kB     00:00    
kde-redhat-all                                                                                                                 | 1.9 kB     00:01    
================================================================= Matched: publican ==================================================================
publican.noarch : Common files and scripts for publishing with DocBook XML
publican-doc.noarch : Documentation for the Publican package
publican-fedora.noarch : Publican documentation template files for fedora
publican-genome.noarch : Common documentation files for genome
publican-ovirt.noarch : Common documentation files for oVirt
接着安装:
[lee@python pym]$ sudo yum install publican publican-doc publican-fedora publican-genome publican-ovirt
设置安装进程
分析安装参数的语法
解决依赖相关
-->运行处理检查
---> 包 publican.noarch 0:0.44-0.fc10 设置为 升级
--> 过程依赖: perl-XML-TreeBuilder >= 3.09-11 依赖于包: publican
--> 过程依赖: sazanami-fonts-gothic 依赖于包: publican
--> 过程依赖: lohit-fonts-malayalam 依赖于包: publican
--> 过程依赖: perl(HTML::Template) 依赖于包: publican
--> 过程依赖: perl(XML::TreeBuilder) 依赖于包: publican
--> 过程依赖: /usr/bin/xml2pot 依赖于包: publican
--> 过程依赖: perl(Parse::LexEvent) 依赖于包: publican
--> 过程依赖: baekmuk-ttf-fonts-batang 依赖于包: publican
--> 过程依赖: sazanami-fonts-mincho 依赖于包: publican
--> 过程依赖: perl-ParseLex 依赖于包: publican
--> 过程依赖: fop 依赖于包: publican
--> 过程依赖: perl-HTML-Template 依赖于包: publican
--> 过程依赖: /usr/bin/po2xml 依赖于包: publican
--> 过程依赖: batik 依赖于包: publican
--> 过程依赖: xerces-j2 依赖于包: publican
---> 包 publican-doc.noarch 0:0.44-0.fc10 设置为 升级
---> 包 publican-fedora.noarch 0:0.18-0.fc10 设置为 升级
---> 包 publican-genome.noarch 0:1.0-1.fc10 设置为 升级
---> 包 publican-ovirt.noarch 0:0.4-3.fc10 设置为 升级
-->运行处理检查
---> 包 baekmuk-ttf-fonts-batang.noarch 0:2.2-9.fc10 设置为 升级
--> 过程依赖: baekmuk-ttf-fonts-common 依赖于包: baekmuk-ttf-fonts-batang
---> 包 batik.noarch 0:1.7-0.6 设置为 升级
---> 包 fop.noarch 0:0.95-0.2.beta1 设置为 升级
--> 过程依赖: jakarta-commons-io >= 1.2 依赖于包: fop
--> 过程依赖: xmlgraphics-commons >= 1.2 依赖于包: fop
--> 过程依赖: avalon-framework >= 4.1.4 依赖于包: fop
--> 过程依赖: jakarta-commons-logging >= 1.0.4 依赖于包: fop
--> 过程依赖: java-1.6.0-openjdk 依赖于包: fop
--> 过程依赖: jakarta-commons-httpclient 依赖于包: fop
---> 包 kdesdk-utils.i386 0:4.2.2-2.fc10 设置为 升级
---> 包 lohit-fonts-malayalam.noarch 0:2.3.1-1.fc10 设置为 升级
---> 包 perl-HTML-Template.noarch 0:2.9-2.fc9 设置为 升级
---> 包 perl-ParseLex.noarch 0:2.15-12.fc9 设置为 升级
---> 包 perl-XML-TreeBuilder.noarch 0:3.09-11.fc10 设置为 升级
--> 过程依赖: perl(HTML::Element) >= 3.08 依赖于包: perl-XML-TreeBuilder
--> 过程依赖: perl(HTML::Element) 依赖于包: perl-XML-TreeBuilder
---> 包 sazanami-fonts-gothic.noarch 0:0.20040629-4.20061016.fc8 设置为 升级
---> 包 sazanami-fonts-mincho.noarch 0:0.20040629-4.20061016.fc8 设置为 升级
---> 包 xerces-j2.i386 0:2.7.1-10.2.fc10 设置为 升级
--> 过程依赖: xml-commons-resolver >= 1.1 依赖于包: xerces-j2
-->运行处理检查
---> 包 avalon-framework.i386 0:4.1.4-4.fc10 设置为 升级
---> 包 baekmuk-ttf-fonts-common.noarch 0:2.2-9.fc10 设置为 升级
---> 包 jakarta-commons-httpclient.i386 1:3.1-0.3.fc10 设置为 升级
---> 包 jakarta-commons-io.noarch 0:1.3.2-1.2.fc10 设置为 升级
---> 包 jakarta-commons-logging.i386 0:1.0.4-7.8.fc10 设置为 升级
---> 包 java-1.6.0-openjdk.i386 1:1.6.0.0-15.b14.fc10 设置为 升级
---> 包 perl-HTML-Tree.noarch 1:3.23-4.fc9 设置为 升级
---> 包 xml-commons-resolver.i386 0:1.1-2.14.fc10 设置为 升级
---> 包 xmlgraphics-commons.noarch 0:1.3-1 设置为 升级
--> 完成依赖性检查

依赖性解决

======================================================================================================================================================
 包                                           架构                     版本                                           仓库                       大小
======================================================================================================================================================
正在安装:
 publican                                     noarch                   0.44-0.fc10                                    updates                   4.4 M
 publican-doc                                 noarch                   0.44-0.fc10                                    updates                   233 k
 publican-fedora                              noarch                   0.18-0.fc10                                    updates                   142 k
 publican-genome                              noarch                   1.0-1.fc10                                     fedora                    255 k
 publican-ovirt                               noarch                   0.4-3.fc10                                     fedora                    214 k
为依赖而安装:
 avalon-framework                             i386                     4.1.4-4.fc10                                   fedora                    126 k
 baekmuk-ttf-fonts-batang                     noarch                   2.2-9.fc10                                     fedora                    4.6 M
 baekmuk-ttf-fonts-common                     noarch                   2.2-9.fc10                                     fedora                    5.8 k
 batik                                        noarch                   1.7-0.6                                        updates                   2.7 M
 fop                                          noarch                   0.95-0.2.beta1                                 fedora                    2.5 M
 jakarta-commons-httpclient                   i386                     1:3.1-0.3.fc10                                 fedora                    512 k
 jakarta-commons-io                           noarch                   1.3.2-1.2.fc10                                 fedora                     90 k
 jakarta-commons-logging                      i386                     1.0.4-7.8.fc10                                 fedora                    101 k
 java-1.6.0-openjdk                           i386                     1:1.6.0.0-15.b14.fc10                          updates                    32 M
 kdesdk-utils                                 i386                     4.2.2-2.fc10                                   updates                   258 k
 lohit-fonts-malayalam                        noarch                   2.3.1-1.fc10                                   fedora                     42 k
 perl-HTML-Template                           noarch                   2.9-2.fc9                                      fedora                     72 k
 perl-HTML-Tree                               noarch                   1:3.23-4.fc9                                   fedora                    206 k
 perl-ParseLex                                noarch                   2.15-12.fc9                                    fedora                     71 k
 perl-XML-TreeBuilder                         noarch                   3.09-11.fc10                                   fedora                     15 k
 sazanami-fonts-gothic                        noarch                   0.20040629-4.20061016.fc8                      fedora                    4.3 M
 sazanami-fonts-mincho                        noarch                   0.20040629-4.20061016.fc8                      fedora                    5.5 M
 xerces-j2                                    i386                     2.7.1-10.2.fc10                                fedora                    7.9 M
 xml-commons-resolver                         i386                     1.1-2.14.fc10                                  fedora                    139 k
 xmlgraphics-commons                          noarch                   1.3-1                                          fedora                    462 k

Transaction Summary
======================================================================================================================================================
Install     25 Package(s)        
Update       0 Package(s)        
Remove       0 Package(s)        

总共下载大小: 67 M
有的时候看到自己的翻译,真是汗颜。。。。
安装好了之后,接着make.
[lee@python pym]$ make pdf-en-US

*ERROR: PRODUCT is mandatory*
You must set <productname> in en-US/Book_Info.xml
make: *** [pre] 错误 1
仍然会报错,也不要急,根据提示信息,修改就是了,将productname添加到book_info.xml中即可:
仍有疑问,请参考:http://jfearn.fedorapeople.org/Publican/sect-Publican-Files_in_the_Book_directory-Book_Info.xml.html
等待编译完成后,(如果你的环境和我一样,报一些字体错误apache fop是很正常的事情。)然后到tmp/en-US/pdf下打开Python_for_you_and_me.pdf。开始newbie python之旅吧!
相关阅读 更多 +
排行榜 更多 +
找茬脑洞的世界安卓版

找茬脑洞的世界安卓版

休闲益智 下载
滑板英雄跑酷2手游

滑板英雄跑酷2手游

休闲益智 下载
披萨对对看下载

披萨对对看下载

休闲益智 下载