Malinová knihovna

Jak ješ­tě vyu­žít Raspber­ry? Co takhle Calib­re ser­ver? Máme doma tři Kind­lí­ky a párek table­tů, tak­že by se hodi­lo mít kníž­ky stá­le pří­stup­né. V repo­si­tá­řích Raspbmc jsem obje­vil insta­lač­ní balíč­ky Calib­re. Toho se musí vyu­žít, abychom si moh­li naše Kind­lí­ky krmit i bez spuš­tě­né­ho počí­ta­če. Tak­že jde­me na to.

Používaná sestava

Postup

  1. Na při­po­je­ném dis­ku vytvo­ří­me adre­sář pro kni­hov­nu. Při­hlá­sí­me se do Raspber­ry přes SSH a zadá­me
    sudo mkdir /devices/verbatim/knihovna
  2. Nově vytvo­ře­ný adre­sář zpří­stup­ní­me v síti
    sudo nano /etc/samba/smb.conf

    do sou­bo­ru při­dá­me řád­ky

    [knihovna]
     browsable = yes
     read only = no
     guest ok = yes
     path = /media/verbatim/knihovna
     force user = root
  3. restar­tu­je­me sam­bu
    sudo service samba restart
  4. Sdí­le­ný disk nyní při­po­jí­me do sys­té­mu (root nahra­dí­me při­hla­šo­va­cí­mi úda­ji do Raspber­ry)
    sudo mount -t cifs -o username=root,password=root //raspberry/knihovna /home/vlad/knihovna
  5. V Calib­re nej­pr­ve pře­su­ne­me kni­hov­nu na disk při­po­je­ný k Raspber­ry.  K tomu pou­ži­je­me dia­log “Přepnout/vytvořit kni­hov­nu” a jako cílo­vé umís­tě­ní vybe­re­me umís­tě­ný z před­cho­zí­ho kro­ku.
  6. Je čas nain­sta­lo­vat Calib­re na Raspber­ry. Seznam insta­lo­va­ných balíč­ků je vel­mi obsáh­lý, cel­kem přes 300 MB.[spoiler title=“Zobrazit výpis” open=“0” style=“2”]
    root@raspbmc:~# apt-get install calibre
    Reading package lists... Done
    Building dependency tree 
    Reading state information... Done
    The following extra packages will be installed:
    ca-certificates calibre-bin cpp cpp-4.6 fontconfig fonts-droid
    fonts-liberation ghostscript gsfonts hicolor-icon-theme imagemagick
    imagemagick-common javascript-common libaudio2 libcairo2 libchm1 libcroco3
    libcupsimage2 libdatrie1 libdjvulibre-text libdjvulibre21 libdrm-nouveau1a
    libdrm-radeon1 libdrm2 libencode-locale-perl libexiv2-12
    libfile-basedir-perl libfile-desktopentry-perl libfile-listing-perl
    libfile-mimeinfo-perl libfont-afm-perl libfontenc1 libgdk-pixbuf2.0-0
    libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa
    libgmp10 libgs9 libgs9-common libhtml-form-perl libhtml-format-perl
    libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl
    libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl
    libhttp-message-perl libhttp-negotiate-perl libicu48 libijs-0.35 libilmbase6
    libio-socket-ip-perl libio-socket-ssl-perl libjbig2dec0 libjs-jquery
    libjs-sphinxdoc libjs-underscore liblcms1 liblcms2-2 liblensfun-data
    liblensfun0 liblqr-1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl
    libmagickcore5 libmagickcore5-extra libmagickwand5 libmailtools-perl libmng1
    libmpc2 libmpfr4 libnet-dbus-perl libnet-http-perl libnet-ssleay-perl
    libnetpbm10 libopenexr6 libpango1.0-0 libpaper-utils libpaper1 libpixman-1-0
    libpodofo0.9.0 libpoppler19 libqt4-dbus libqt4-declarative libqt4-designer
    libqt4-help libqt4-network libqt4-script libqt4-scripttools libqt4-sql
    libqt4-sql-mysql libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns
    libqtassistantclient4 libqtcore4 libqtgui4 libqtwebkit4 librsvg2-2
    librsvg2-common libsocket-perl libthai-data libthai0 libtidy-0.99-0
    libtie-ixhash-perl libtimedate-perl liburi-perl libwmf0.2-7 libwww-perl
    libwww-robotrules-perl libx11-protocol-perl libxaw7 libxcb-glx0
    libxcb-render0 libxcb-shape0 libxcb-shm0 libxcomposite1 libxcursor1
    libxdamage1 libxfixes3 libxft2 libxinerama1 libxml-parser-perl
    libxml-twig-perl libxml-xpathengine-perl libxmu6 libxmuu1 libxpm4 libxrandr2
    libxrender1 libxslt1.1 libxt6 libxv1 libxxf86dga1 libxxf86vm1 netpbm openssl
    poppler-data poppler-utils python-beautifulsoup python-chardet
    python-cherrypy3 python-cssutils python-dateutil python-dnspython
    python-feedparser python-imaging python-libxml2 python-lxml python-mechanize
    python-pkg-resources python-pyparsing python-qt4 python-repoze.lru
    python-routes python-sip python-utidylib python-webob qdbus ttf-liberation
    ufraw-batch wwwconfig-common x11-utils x11-xserver-utils xdg-utils
    Suggested packages:
    cpp-doc gcc-4.6-locales ghostscript-cups ghostscript-x hpijs imagemagick-doc
    autotrace cups-bsd lpr lprng curl enscript ffmpeg gimp gnuplot grads hp2xx
    html2ps libwmf-bin mplayer povray radiance sane-utils texlive-base-bin
    transfig apache2 httpd nas exiv2 libglide3 libdata-dump-perl liblcms-utils
    liblcms2-utils libcrypt-ssleay-perl ttf-baekmuk ttf-arphic-gbsn00lp
    ttf-arphic-bsmi00lp ttf-arphic-gkai00mp ttf-arphic-bkai00mp
    libqt4-declarative-folderlistmodel libqt4-declarative-gestures
    libqt4-declarative-particles libqt4-declarative-shaders qt4-qmlviewer
    libqt4-dev qt4-qtconfig librsvg2-bin libauthen-ntlm-perl
    libunicode-map8-perl libunicode-string-perl xml-twig-tools
    fonts-japanese-mincho fonts-ipafont-mincho fonts-japanese-gothic
    fonts-ipafont-gothic fonts-arphic-ukai fonts-arphic-uming fonts-unfonts-core
    python-imaging-doc python-imaging-dbg python-lxml-dbg python-distribute
    python-distribute-doc python-qt4-dbg python-paste ufraw mysql-client
    postgresql-client mesa-utils nickle cairo-5c xorg-docs-core gvfs-bin
    The following NEW packages will be installed:
    ca-certificates calibre calibre-bin cpp cpp-4.6 fontconfig fonts-droid
    fonts-liberation ghostscript gsfonts hicolor-icon-theme imagemagick
    imagemagick-common javascript-common libaudio2 libcairo2 libchm1 libcroco3
    libcupsimage2 libdatrie1 libdjvulibre-text libdjvulibre21 libdrm-nouveau1a
    libdrm-radeon1 libdrm2 libencode-locale-perl libexiv2-12
    libfile-basedir-perl libfile-desktopentry-perl libfile-listing-perl
    libfile-mimeinfo-perl libfont-afm-perl libfontenc1 libgdk-pixbuf2.0-0
    libgdk-pixbuf2.0-common libgl1-mesa-dri libgl1-mesa-glx libglapi-mesa
    libgmp10 libgs9 libgs9-common libhtml-form-perl libhtml-format-perl
    libhtml-parser-perl libhtml-tagset-perl libhtml-tree-perl
    libhttp-cookies-perl libhttp-daemon-perl libhttp-date-perl
    libhttp-message-perl libhttp-negotiate-perl libicu48 libijs-0.35 libilmbase6
    libio-socket-ip-perl libio-socket-ssl-perl libjbig2dec0 libjs-jquery
    libjs-sphinxdoc libjs-underscore liblcms1 liblcms2-2 liblensfun-data
    liblensfun0 liblqr-1-0 liblwp-mediatypes-perl liblwp-protocol-https-perl
    libmagickcore5 libmagickcore5-extra libmagickwand5 libmailtools-perl libmng1
    libmpc2 libmpfr4 libnet-dbus-perl libnet-http-perl libnet-ssleay-perl
    libnetpbm10 libopenexr6 libpango1.0-0 libpaper-utils libpaper1 libpixman-1-0
    libpodofo0.9.0 libpoppler19 libqt4-dbus libqt4-declarative libqt4-designer
    libqt4-help libqt4-network libqt4-script libqt4-scripttools libqt4-sql
    libqt4-sql-mysql libqt4-svg libqt4-test libqt4-xml libqt4-xmlpatterns
    libqtassistantclient4 libqtcore4 libqtgui4 libqtwebkit4 librsvg2-2
    librsvg2-common libsocket-perl libthai-data libthai0 libtidy-0.99-0
    libtie-ixhash-perl libtimedate-perl liburi-perl libwmf0.2-7 libwww-perl
    libwww-robotrules-perl libx11-protocol-perl libxaw7 libxcb-glx0
    libxcb-render0 libxcb-shape0 libxcb-shm0 libxcomposite1 libxcursor1
    libxdamage1 libxfixes3 libxft2 libxinerama1 libxml-parser-perl
    libxml-twig-perl libxml-xpathengine-perl libxmu6 libxmuu1 libxpm4 libxrandr2
    libxrender1 libxslt1.1 libxt6 libxv1 libxxf86dga1 libxxf86vm1 netpbm openssl
    poppler-data poppler-utils python-beautifulsoup python-chardet
    python-cherrypy3 python-cssutils python-dateutil python-dnspython
    python-feedparser python-imaging python-libxml2 python-lxml python-mechanize
    python-pkg-resources python-pyparsing python-qt4 python-repoze.lru
    python-routes python-sip python-utidylib python-webob qdbus ttf-liberation
    ufraw-batch wwwconfig-common x11-utils x11-xserver-utils xdg-utils
    0 upgraded, 169 newly installed, 0 to remove and 21 not upgraded.
    Need to get 89.7 MB of archives.
    After this operation, 302 MB of additional disk space will be used.
    Do you want to continue [Y/n]?
    [/spoiler]Instalace u mě trva­la dlou­hých 18 minut i se sta­že­ním balíč­ků.
  7. Potom už jen spus­tí­me ser­ver. Pokud pou­ží­vá­me i XBMC musí­me si dát pozor na port, na kte­rém Calib­re ser­ver pobě­ží, pro­to­že stan­dard­ně obě služ­by běží na por­tu 8080. Pro­to u Calib­re nasta­ví­me port pomo­cí para­me­t­ru. Seznam všech para­me­t­rů pro calib­re-ser­ver
    sudo calibre-server --with-library=/devices/verbatim/knihovna --port=4040 --daemonize

Mír­nou nevý­ho­dou je, že calib­re má poměr­ně vel­kou spo­tře­bu pamě­ti, tak­že na Mali­nách s 256 MB RAM může váz­nout pře­hrá­vá­ní. Ješ­tě vyře­šit spouš­tě­ní po star­tu.