Calibre İçerik sunucusu

calibre İçerik sunucusu calibre kitaplıklarınıza erişmenizi ve kitapları doğrudan favori cep telefonunuz veya tablet bilgisayarınızdaki bir tarayıcıdan okumanızı sağlar. Sonuç olarak, telefonunuza herhangi bir özel kitap okuma/yönetim uygulaması yüklemenize gerek yoktur. Sadece tarayıcıyı kullanın. Sunucu, okuduğunuz kitabı çevrimdışı bir önbellekte indirir ve saklar, böylece internet bağlantısı olmadığında bile okuyabilirsiniz.

Sunucuyu başlatmak için Bağlan/paylaş düğmesine tıklayın ve İçerik sunucusunu başlat`ı seçin. Bilgisayarınızın güvenlik duvarından veya anti-virüs programından “calibre.exe”ye erişime izin vermenin uygun olup olmadığını soran bir mesaj alabilirsiniz. ``İzin Ver` veya Tamam düğmesini tıklayın. Daha sonra bilgisayarınızda bir tarayıcı (tercihen Chrome veya Firefox) açın ve aşağıdaki adresi yazın:

http://127.0.0.1:8080

This will open a page in the browser showing you your calibre libraries, click on any one and browse the books in it. Click on a book, and it will show you all the metadata about the book, along with buttons to Read and Download the book. Click the Read button to start reading the book.

Not

Yukarıda kullanılan adres http://127.0.0.1:8080 yalnızca calibre’yi çalıştıran bilgisayarda çalışacaktır. Sunucuya diğer bilgisayarlardan/telefonlardan/tabletlerden vb. erişmek için. Bir sonraki bölümde açıklandığı gibi biraz daha çalışmanız gerekecek.

İçerik sunucusuna diğer cihazlardan erişme

Genellikle ihtiyaç duyacağınız iki tür uzaktan cihaz erişimi vardır. İlk, daha basit tür, ev ağınızın içindendir. Calibre’yi ev ağınızdaki bir bilgisayarda çalıştırıyorsanız ve diğer cihazlarınızı da aynı ev ağına bağladıysanız, bu cihazlardaki sunucuya kolayca erişebilmeniz gerekir.

Sunucuya ev ağınızdaki cihazlardan erişme

Sunucuyu yukarıda açıklandığı gibi calibre’de başlattıktan sonra Bağlan/paylaş düğmesine tekrar tıklayın. İçerik sunucusunu Başlat eylemi yerine, İçerik sunucusunu Durdur eylemini görmelisiniz. Bu eylemin sağında bir IP adresi ve port numarası listelenecektir. Bunlar noktalarla ayrılmış bir grup sayıya benziyor. Örneğin:

Stop Content server [192.168.1.5, port 8080]

Bu numaralar, cihazlarınızdaki sunucuya bağlanmak için hangi adresi kullanmanız gerektiğini size söyler. Yukarıdaki örneği takip edersek adres şu şekilde olur:

http://192.168.1.5:8080

Adresin ilk kısmı her zaman http:// olur, sonraki kısım IP adresidir, yani virgülden önceki sayılardır ve son olarak IP adresine iki nokta üst üste () eklenmesi gereken port numarasını alırız. :). Şanslıysanız ihtiyacınız olan tek şey bu olmalı ve cihazınızdaki calibre kitaplıklarına bakıyor olacaksınız. Değilse, okumaya devam edin.

Ev ağı bağlantısında sorun giderme

Cihazınızdan sunucuya erişemiyorsanız aşağıdaki adımları deneyin:

  1. Sunucuyla aynı bilgisayarda çalışan bir tarayıcıda http://127.0.0.1:8080 adresini açarak sunucunun çalışıp çalışmadığını kontrol edin.

  2. Güvenlik duvarınızın/anti-virüsünüzün bilgisayarınıza 8080 bağlantı noktasından ve calibre programına bağlantılara izin verdiğini kontrol edin. Sorunların kaynağı olan güvenlik duvarını/antivirüsü ortadan kaldırmanın en kolay yolu, her ikisini de geçici olarak kapatmak ve ardından bağlanmayı denemektir. Bilgisayarınızı güvende tutmak için güvenlik duvarını kapatmadan önce öncelikle internet bağlantısını kesmelisiniz.

  3. Cihazınızın ve bilgisayarınızın aynı ağda olup olmadığını kontrol edin. Bu, her ikisinin de aynı kablosuz yönlendiriciye bağlı olması gerektiği anlamına gelir. Özellikle hücresel veya İSS tarafından sağlanan doğrudan WiFi bağlantısı kullanılmamalıdır.

  4. Standart dışı ağ kurulumunuz varsa, Bağlan/paylaş menüsünde gösterilen IP adresi yanlış olabilir. Böyle bir durumda kullanacağınız doğru IP adresinin ne olduğunu kendiniz bulmanız gerekecektir. Ne yazık ki, mümkün olan ağ yapılandırmalarının sonsuz çeşitliliği göz önüne alındığında, bunu yapmak için size bir yol haritası vermek mümkün değildir.

  5. If you have set up a username and password, first try it without that to see if it is causing issues. Some e-ink devices have browsers that do not handle authentication. You can sometimes workaround this by including the username and password in the URL, for example: http://username:password@192.168.1.2:8080.

  6. Eğer takılırsanız, her zaman calibre kullanıcı forumlarından yardım isteyebilirsiniz.

İnternetin olduğu her yerden sunucuya erişim

Uyarı

Bunu yapmadan önce sunucuda kullanıcı adı/şifre korumasını açmalısınız, aksi takdirde dünyadaki herkes kitaplarınıza erişebilir. Tercihler → Paylaşım → Ağ üzerinden paylaşım seçeneğine gidin ve İçerik sunucusuna erişmek için kullanıcı adı ve şifre iste seçeneğini etkinleştirin.

İnternet erişimini ayarlamaya ilişkin belirli ayrıntılar, ağ yapılandırmasına ve kullandığınız bilgisayar türüne göre değişiklik gösterse de temel şema aşağıdaki gibidir.

  1. Sunucuyu çalıştıracağınız bilgisayarın harici IP adresini öğrenin. Bunu, bilgisayarda çalışan bir tarayıcıda IP adresim nedir sitesini ziyaret ederek yapabilirsiniz.

  2. Bilgisayar bir yönlendiricinin arkasındaysa, 8080 bağlantı noktasını (veya calibre İçerik sunucusunu çalıştırmak için seçtiğiniz herhangi bir bağlantı noktasını) bilgisayara iletmek için yönlendiricide bağlantı noktası iletmeyi etkinleştirin.

  3. Calibre sunucusuna bilgisayarınızdaki herhangi bir güvenlik duvarı/anti-virüs programı üzerinden izin verildiğinden emin olun.

  4. Artık, ilk adımda bulduğunuz IP adresini kullanarak internete bağlı herhangi bir cihazdaki sunucuya erişebilmelisiniz. Örneğin, bulduğunuz IP adresi “123.123.123.123” ise ve calibre sunucusu için kullandığınız bağlantı noktası “8080” ise, cihazınızda kullanılacak adres şu şekilde olur: “http://123.123” .123.123:8080``.

  5. İsteğe bağlı olarak, ilk adımda bulduğunuz IP adresi yerine hatırlanması kolay bir adres ayarlamak için “no-ip <https://www.noip.com/free>”_ gibi bir hizmet kullanın.

Not

For maximum security, you should also enable HTTPS on the Content server. You can either do so directly in the server by providing the path to the HTTPS certificate to use in the advanced configuration options for the server, or you can set up a reverse proxy as described below, to use an existing HTTPS setup.

Sunucu arayüzü

The server interface is a simplified version of the main calibre interface, optimised for use with touch screens. The home screen shows you books you are currently reading as well as allowing you to choose a calibre library you want to browse. The server in calibre gives you access to all your libraries, not just a single one, as before.

Kitap listesi

The server book list is a simple grid of covers. Tap on a cover to see the detailed metadata for a book, or to read the book. If you prefer a more detailed list, you can change the default view by clicking the three vertical dots in the top right corner.

Sorting and searching of the book list should be familiar to calibre users. They can be accessed by clicking their icons in the top right area. They both work exactly the same as in the main calibre program. The search page even allows you to construct search queries by clicking on authors/tags/etc., just as you can using the Tag browser in the main program.

A much loved feature of the main program, Virtual libraries is present in the server interface as well. Click the three vertical dots in the top right corner to choose a Virtual library.

The book viewer

You can read any book in your calibre library by simply tapping on it and then tapping the Read button. The book viewer is very simple to operate. You can both tap and swipe to turn pages. Swiping up/down skips between chapters. Tapping the top quarter of the screen gets you the detailed controls and viewer preferences.

İçerik sunucusunu çalışır durumda bırakırsanız, aynı kitabı birden fazla cihazda bile açabilirsiniz; bu, son okuma konumunuzu hatırlayacaktır. Aksi takdirde, üst çeyreğe dokunup Sync seçeneğini seçerek senkronizasyonu zorlayabilirsiniz.

Searching book contents in OPDS applications

When full text indexing is enabled for a library, its OPDS catalog offers a catalog entry titled Search book contents. Open this entry and use the application’s search control to find books by words and phrases inside them, using calibre’s existing full text index. Each feed has a single search link, so clients do not have to choose between multiple search links. Results contain the normal book information and download links. A book is listed once even if more than one of its formats matches. Only books available to the current user are searched.

The original search continues to search book metadata. Content search uses the same SQLite full text query syntax as calibre’s full text search window. It searches the text indexed so far; books still waiting to be indexed will not appear yet. The content search entry is absent when indexing is disabled. Both OPDS 1 and OPDS 2 catalogs support content search, through the normal search URL with full_text=y added to its query parameters.

Reading comics in OPDS applications

Applications that support OPDS 2.0 and the Readium Divina format can read CBZ comics one page at a time, without downloading the entire archive. Connect the application to the server’s /opds catalog. OPDS 2.0 applications request the JSON catalog using Accept: application/opds+json.

Comic entries link to a Divina manifest. The server lists pages only when the application opens that manifest, using the same page order as calibre’s comic conversion. Each page offers its original image format, including AVIF and JPEG XL, and alternate formats the server can produce. GIF pages, which may be animated, are only offered in their original format. The application chooses an image format it supports from those links. JPEG is offered as the default for AVIF and JPEG XL pages when conversion is available.

For manga, a ComicInfo.xml file with Manga set to YesAndRightToLeft tells the application to use right-to-left reading direction. The file can be in the root of the archive or in the folder containing the page images. Page images remain in their original order. The reading direction is only given in the comic manifest, not in OPDS feeds, as finding it requires opening the archive.

The normal username/password and library restrictions apply to manifests and page images. Complete archive downloads remain available. This feature supports CBZ archives; CBR and CB7 comics can still be downloaded as complete files.

Tarayıcı desteği

Yeni calibre sunucusu gelişmiş HTML 5 ve CSS 3 özelliklerinin çoğunu kullanıyor. Bu nedenle kullanmak için güncel bir tarayıcı gerektirir. Masaüstünde Android Chrome ve iOS Safari’nin yanı sıra Chrome ve Firefox’ta da test edilmiştir.

Sunucu, halihazırda standartlaştırılmış veya standartlar yolunda olan işlevleri kullanmaya özen göstermektedir. Bu nedenle, şu anda favori tarayıcınızla çalışmıyorsa, muhtemelen o tarayıcı yetiştiğinde çalışacaktır.

Özellikle eski veya sınırlı bir tarayıcı kullanıyorsanız veya JavaScript çalıştırmayı sevmiyorsanız, sunucu adresine /mobile ekleyerek mobil görünümünü kullanabilirsiniz.

Not

iOS’ta Apple yalnızca tek bir tarayıcı motoruna izin verir, dolayısıyla Firefox, Chrome ve Safari’nin hepsi aslında aynı tarayıcıdır. Yeni sunucu arayüzü iOS 10.3.2 veya daha yenisini gerektirir. Android’de sunucu, Chrome sürüm 58 ve daha yenisiyle test edilmiştir.

Çevrimdışı desteği etkinleştirme

The server has full support for offline mode, you can open a book and once it is loaded, continue reading it offline. However, typical browsers require the use of HTTPS connections to enable offline mode (service workers). So setup HTTPS support as described above. Scroll to the bottom of the home page and you will see a message about the status of offline mode.

Alternately, you can open a book and keep the browser tab open. As long as the tab stays open you can continue reading the book, even when offline.

Managing user accounts from the command-line only

The calibre program has a nice section in Preferences to allow you to manage user accounts for the server. However, if you want to run the standalone server and cannot run the main calibre program on the same computer/user account, you can also manage users using just the command-line.

You can manage user accounts using the --manage-users option to the standalone calibre-server program. Suppose you want to store the user database in the folder /srv/calibre, then you create it by running:

calibre-server --userdb /srv/calibre/users.sqlite --manage-users

Just follow the prompts to create user accounts, set their permissions, etc. Once you are done, you can run the server as:

calibre-server --userdb /srv/calibre/users.sqlite --enable-auth

It will use the user accounts you created in the previous step.

Syncing reading progress with KOReader

The Content server can act as a progress sync server for the KOReader e-book reader, so that devices running KOReader can sync your reading position in books with each other. In KOReader, go to Tools → Progress sync → Custom sync server and enter the address of the Content server followed by /kosync, for example:

http://192.168.1.2:8080/kosync

If you are Using a URL prefix, include it before /kosync. Then use Login with the username and password of a user account on the Content server. Accounts cannot be created from KOReader, they are managed by calibre as described above. Users that are only allowed read access cannot sync their reading positions. If user accounts are not enabled on the server, any username and password can be used, but reading positions can only be synced from devices that are allowed to make changes without authentication, see the Allow un-authenticated local connections to make changes and Allow un-authenticated connections from specific IP addresses to make changes options. Reading positions synced while user accounts are not enabled are kept separate from those of user accounts. The reading positions of each user are stored separately in the user database of the server.

By default, KOReader identifies books by a checksum of the book file. The Content server can change the metadata embedded in books when they are downloaded, so copies of a book downloaded at different times can have different checksums. Once KOReader has synced with the server, it remembers the checksums of downloaded books and of the library files they were created from, so that all copies of the same format of a book share one reading position. Different formats of a book have separate reading positions, as positions in one format cannot be used in another. Copies downloaded before KOReader first synced with the server, or obtained other than by downloading them from the server, are not recognized. If reading positions do not sync for such copies, set Document matching method in the KOReader progress sync settings to Filename on all devices and keep the file names of books the same.

Integrating the calibre Content server into other servers

Here, we will show you how to integrate the calibre Content server into another server. The most common reason for this is to make use of SSL or to serve the calibre library as part of a larger site. The basic technique is to run the calibre server and set up a reverse proxy to it from the main server.

A reverse proxy is when your normal server accepts incoming requests and passes them onto the calibre server. It then reads the response from the calibre server and forwards it to the client. This means that you can simply run the calibre server as normal without trying to integrate it closely with your main server.

Using a full virtual host

The simplest configuration is to dedicate a full virtual host to the calibre server. In this case, run the calibre server as:

calibre-server

Now setup the virtual host in your main server, for example, for nginx:

http {
    client_max_body_size 64M;  # needed to upload large books
}

server {
    listen [::]:80;
    server_name myserver.example.com;

    location / {
        proxy_pass http://127.0.0.1:8080;
    }
}

Or, for Apache:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

<VirtualHost *:80>
    ServerName myserver.example.com
    AllowEncodedSlashes On
    ProxyPreserveHost On
    ProxyPass "/"  "http://localhost:8080/"
</VirtualHost>

Using a URL prefix

If you do not want to dedicate a full virtual host to calibre, you can have it use a URL prefix. Start the calibre server as:

calibre-server --url-prefix /calibre --port 8080

The key parameter here is --url-prefix /calibre. This causes the Content server to serve all URLs prefixed by /calibre. To see this in action, visit http://localhost:8080/calibre in your browser. You should see the normal Content server website, but now it will run under /calibre.

With nginx, the required configuration is:

http {
    client_max_body_size 64M;  # needed to upload large books
}

proxy_set_header X-Forwarded-For $remote_addr;
location /calibre/ {
    proxy_buffering off;
    proxy_pass http://127.0.0.1:8080$request_uri;
}
location /calibre {
    # we need a trailing slash for the Application Cache to work
    rewrite /calibre /calibre/ permanent;
}

For Apache, first enable the proxy modules in Apache, by adding the following to httpd.conf:

LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so

The exact technique for enabling the proxy modules will vary depending on your Apache installation. Once you have the proxy modules enabled, add the following rules to httpd.conf (or if you are using virtual hosts to the conf file for the virtual host in question):

AllowEncodedSlashes On
RewriteEngine on
RewriteRule ^/calibre/(.*) http://127.0.0.1:8080/calibre/$1 [proxy]
RedirectMatch permanent ^/calibre$ /calibre/

That’s all, you will now be able to access the calibre Content server under the /calibre URL in your main server. The above rules pass all requests under /calibre to the calibre server running on port 8080 and thanks to the --url-prefix option above, the calibre server handles them transparently.

Not

When using a reverse proxy, you should tell the calibre Content server to only listen on localhost, by using --listen-on 127.0.0.1. That way, the server will only listen for connections coming from the same computer, i.e. from the reverse proxy.

Not

If you have set up SSL for your main server, you should tell the calibre server to use basic authentication instead of digest authentication, as it is faster. To do so, pass the --auth-mode=basic option to calibre-server.

Creating a service for the calibre server on a modern Linux system

You can easily create a service to run calibre at boot on a modern (systemd) based Linux system. Just create the file /etc/systemd/system/calibre-server.service with the contents shown below:

[Unit]
Description=calibre Content server
After=network.target

[Service]
Type=simple
User=mylinuxuser
Group=mylinuxgroup
ExecStart=/opt/calibre/calibre-server "/path/to/calibre library folder"

[Install]
WantedBy=multi-user.target

Change mylinuxuser and mylinuxgroup to whatever user and group you want the server to run as. This should be the same user and group that own the files in the calibre library folder. Note that it is generally not a good idea to run the server as root. Also change the path to the calibre library folder to suit your system. You can add multiple libraries if needed. See the help for the calibre-server command.

Now run:

sudo systemctl start calibre-server

to start the server. Check its status with:

sudo systemctl status calibre-server

To make it start at boot, run:

sudo systemctl enable calibre-server

Not

The calibre server does not need a running X server, but it does need the X libraries installed as some components it uses link against them.

Not

The calibre server also supports systemd socket activation, so you can use that, if needed, as well.