calibre install on centos 32bit
こちらを参考にさせていただきました ありがとうございまする
http://blog.livedoor.jp/takoyaki4610-ebook/archives/22445112.html
ええ感じデス
pythonのワンライナーをコピペして実行するだけ。
32/64ビットとかの違いは処理してくれているようです
ご親切にどうも、ですw
[root@localhost ~]# sudo python -c "import sys; py3 = sys.version_info[0] > 2; u = __import__('urllib.request' if py3 else 'urllib', fromlist=1); exec(u.urlopen('http://status.calibre-ebook.com/linux_installer').read()); main()"
Enter the installation directory for calibre [/opt]:
Will download and install calibre-0.9.28-i686.tar.bz2
Downloading calibre-0.9.28-i686.tar.bz2
100% [======================================================================]
Downloaded 57020584 bytes
Checking downloaded file integrity...
Extracting files to /opt/calibre ...
Extracting application files...
Creating symlinks...
Symlinking /opt/calibre/fetch-ebook-metadata to /usr/bin/fetch-ebook-metadata
Symlinking /opt/calibre/lrf2lrs to /usr/bin/lrf2lrs
Symlinking /opt/calibre/ebook-convert to /usr/bin/ebook-convert
Symlinking /opt/calibre/ebook-meta to /usr/bin/ebook-meta
Symlinking /opt/calibre/lrfviewer to /usr/bin/lrfviewer
Symlinking /opt/calibre/calibre to /usr/bin/calibre
Symlinking /opt/calibre/markdown-calibre to /usr/bin/markdown-calibre
Symlinking /opt/calibre/calibre-debug to /usr/bin/calibre-debug
Symlinking /opt/calibre/calibre-parallel to /usr/bin/calibre-parallel
Symlinking /opt/calibre/web2disk to /usr/bin/web2disk
Symlinking /opt/calibre/calibre-server to /usr/bin/calibre-server
Symlinking /opt/calibre/calibre-customize to /usr/bin/calibre-customize
Symlinking /opt/calibre/ebook-polish to /usr/bin/ebook-polish
Symlinking /opt/calibre/ebook-viewer to /usr/bin/ebook-viewer
Symlinking /opt/calibre/calibre-smtp to /usr/bin/calibre-smtp
Symlinking /opt/calibre/lrs2lrf to /usr/bin/lrs2lrf
Symlinking /opt/calibre/ebook-device to /usr/bin/ebook-device
Symlinking /opt/calibre/calibredb to /usr/bin/calibredb
Setting up command-line completion...
Installing bash completion to /etc/bash_completion.d/calibre
Setting up desktop integration...
You can automate future calibre installs by specifying the
installation directory in the install command itself, like
this:
sudo python -c "import sys; py3 = sys.version_info[0] > 2; u = __import__('urllib.request' if py3 else 'urllib', fromlist=1); exec(u.urlopen('http://status.calibre-ebook.com/linux_installer').read()); main(install_dir='/opt')"
Change /opt above to whatever directory you want calibre to be
automatically installed to
Run "calibre" to start calibre
[root@localhost ~]#
pythonをつかってるんだね
以下、インストールの流れの概要
最初はこちらを直実行するところから始まり、
sudo python -c "
import sys;
py3 = sys.version_info[0] > 2;
u = __import__('urllib.request' if py3 else 'urllib', fromlist=1);
exec(u.urlopen('http://status.calibre-ebook.com/linux_installer').read());
main()
"
実際の働いている部分は以下のようになっている
[hirasawa@localhost ~]$ wget http://status.calibre-ebook.com/linux_installer
--2013-05-25 11:00:17-- http://status.calibre-ebook.com/linux_installer
status.calibre-ebook.com をDNSに問いあわせています... 209.20.65.15
status.calibre-ebook.com|209.20.65.15|:80 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 14329 (14K) [text/x-python]
`linux_installer.2' に保存中
100%[======================================>] 14,329 25.0K/s 時間 0.6s
2013-05-25 11:00:23 (25.0 KB/s) - `linux_installer.2' へ保存完了 [14329/14329]
[hirasawa@localhost ~]$ cat -n linux_installer | grep def
67 def __init__(self, term_stream=sys.stdout):
121 def _escape_code(self, raw):
128 def _tigetstr(self, cap_name):
138 def render(self, template):
141 def _render_sub(self, match):
150 def __init__(self, term, header):
160 def update(self, percent, message=''):
173 def clear(self):
183 def prints(*args, **kwargs): # {{{
202 def __init__(self, fname):
209 def __call__(self, blocks, block_size, total_size):
223 def clean_cache(cache, fname):
228 def check_signature(dest, signature):
241 def http_error_206(self, url, fp, errcode, errmsg, headers, data=None):
245 def do_download(dest):
278 def download_tarball():
318 def extract_tarball(tar, destdir):
327 def download_and_extract(destdir):
347 def main(install_dir=None, bin_dir=None, share_dir=None):
348 defdir = '/opt'
353 destdir = raw_input('Enter the installation directory for calibre [%s]: '%defdir).strip()
359 destdir = defdir
[hirasawa@localhost ~]$