Skip to content

Commit 4e09ffb

Browse files
Updated the README to highlight CWA's affiliate projects and their creators as well as minor UI tweaks
1 parent 1e6b335 commit 4e09ffb

4 files changed

Lines changed: 179 additions & 1 deletion

File tree

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,28 @@
2727
- [Further Development](#further-development-️) 🏗️
2828
- [Support / Buy me a Coffee](https://ko-fi.com/crocodilestick)
2929

30+
## _Affiliated Projects_ 👬
31+
32+
### [Calibre-Web Automated Book Downloader](https://github.com/calibrain/calibre-web-automated-book-downloader)
33+
34+
- An intuitive web interface for searching and requesting book downloads, designed to work seamlessly with Calibre-Web-Automated. This project streamlines the process of downloading books and preparing them for integration into your Calibre library
35+
36+
[<img src="https://raw.githubusercontent.com/vadret/android/master/assets/get-github.png" alt="Get it on GitHub" height="80">](https://github.com/calibrain/calibre-web-automated-book-downloader)
37+
38+
___
39+
40+
### [Calibre-Web Companion](https://github.com/doen1el/calibre-web-companion)
41+
42+
- Built with **Flutter** and using **Material You**, [**Calibre Web Companion**](https://github.com/doen1el/calibre-web-companion) is an **unofficial companion application** for **Calibre Web** & **Calibre Web Automated** that allows you to browse your book collection and download books directly on your device, providing a much **more modern, mobile-friendly UX** than either service can currently provide on its own
43+
44+
<br>
45+
46+
[![Calibre Web Companion Preview](README_images/cw-companion-screenshots.png)](https://github.com/doen1el/calibre-web-companion)
47+
48+
[<img src="https://upload.wikimedia.org/wikipedia/commons/7/78/Google_Play_Store_badge_EN.svg" alt="Get it on Google Play" height="53" style="margin-bottom: 1rem; padding-left: 14px; padding-right: 10px">](https://play.google.com/store/apps/details?id=de.doen1el.calibreWebCompanion)
49+
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png" alt="Get it on F-Droid" height="80">](https://f-droid.org/en/packages/de.doen1el.calibreWebCompanion/)
50+
[<img src="https://raw.githubusercontent.com/vadret/android/master/assets/get-github.png" alt="Get it on GitHub" height="80">](https://github.com/doen1el/calibre-web-companion)
51+
3052
## Why does it exist? 🔓
3153

3254
Calibre, while a fantastic tool for its age, has several problems when containerised, including its reliance on a KasmVNC server instance for the UI, which is near impossible to use on mobile and is relatively resource-heavy if you're running a small, lower power server like I am.
286 KB
Loading
Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
{% import 'image.html' as image %}
2+
{% extends "layout.html" %}
3+
{% block body %}
4+
{% if current_user.show_detail_random() and page != "discover" %}
5+
<div class="discover random-books">
6+
<h2 class="random-books">{{_('Discover (Random Books)')}}</h2>
7+
<div class="row display-flex">
8+
{% for entry in random %}
9+
<div class="col-sm-3 col-lg-2 col-xs-6 book session" id="books_rand">
10+
<div class="cover">
11+
<a href="{{ url_for('web.show_book', book_id=entry.Books.id) }}" {% if simple==false %}data-toggle="modal" data-target="#bookDetailsModal" data-remote="false"{% endif %}>
12+
<span class="img" title="{{ entry.Books.title }}">
13+
{{ image.book_cover(entry.Books) }}
14+
{% if entry[2] == True %}<span class="badge read glyphicon glyphicon-ok"></span>{% endif %}
15+
</span>
16+
</a>
17+
</div>
18+
<div class="meta">
19+
<a href="{{ url_for('web.show_book', book_id=entry.Books.id) }}" {% if simple==false %}data-toggle="modal" data-target="#bookDetailsModal" data-remote="false"{% endif %}>
20+
<p title="{{entry.Books.title}}" class="title">{{entry.Books.title|shortentitle}}</p>
21+
</a>
22+
<p class="author">
23+
{% for author in entry.Books.authors %}
24+
{% if loop.index > g.config_authors_max and g.config_authors_max != 0 %}
25+
{% if not loop.first %}
26+
<span class="author-hidden-divider">&amp;</span>
27+
{% endif %}
28+
<a class="author-name author-hidden" href="{{url_for('web.books_list', data='author', sort_param='stored', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
29+
{% if loop.last %}
30+
<a href="#" class="author-expand" data-authors-max="{{g.config_authors_max}}" data-collapse-caption="({{_('reduce')}})">(...)</a>
31+
{% endif %}
32+
{% else %}
33+
{% if not loop.first %}
34+
<span>&amp;</span>
35+
{% endif %}
36+
<a class="author-name" href="{{url_for('web.books_list', data='author', sort_param='stored', book_id=author.id) }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
37+
{% endif %}
38+
{% endfor %}
39+
</p>
40+
{% if entry.Books.series.__len__() > 0 %}
41+
<p class="series">
42+
<a href="{{url_for('web.books_list', data='series', sort_param='stored', book_id=entry.Books.series[0].id )}}">
43+
{{entry.Books.series[0].name}}
44+
</a>
45+
({{entry.Books.series_index|formatfloat(2)}})
46+
</p>
47+
{% endif %}
48+
{% if entry.Books.ratings.__len__() > 0 %}
49+
<div class="rating">
50+
{% for number in range((entry.Books.ratings[0].rating/2)|int(2)) %}
51+
<span class="glyphicon glyphicon-star good"></span>
52+
{% if loop.last and loop.index < 5 %}
53+
{% for numer in range(5 - loop.index) %}
54+
<span class="glyphicon glyphicon-star-empty"></span>
55+
{% endfor %}
56+
{% endif %}
57+
{% endfor %}
58+
</div>
59+
{% endif %}
60+
</div>
61+
</div>
62+
{% endfor %}
63+
</div>
64+
</div>
65+
{% endif %}
66+
<div class="discover load-more">
67+
<h2 class="{{title}}">{{title}}</h2>
68+
{% if page != 'discover' %}
69+
<div class="filterheader hidden-xs">
70+
{% if page == 'hot' %}
71+
<a data-toggle="tooltip" title="{{_('Sort ascending according to download count')}}" id="hot_asc" class="btn btn-primary{% if order == "hotasc" %} active{% endif%}" href="{{url_for('web.books_list', data=page, book_id=id, sort_param='hotasc')}}"><span class="glyphicon glyphicon-sort-by-order"></span></a>
72+
<a data-toggle="tooltip" title="{{_('Sort descending according to download count')}}" id="hot_desc" class="btn btn-primary{% if order == "hotdesc" %} active{% endif%}" href="{{url_for('web.books_list', data=page, book_id=id, sort_param='hotdesc')}}"><span class="glyphicon glyphicon-sort-by-order-alt"></span></a>
73+
{% else %}
74+
<a data-toggle="tooltip" title="{{_('Sort according to book date, newest first')}}" id="new" class="btn btn-primary{% if order == "new" %} active{% endif%}" href="{{url_for('web.books_list', data=page, book_id=id, sort_param='new')}}"><span class="glyphicon glyphicon-book"></span> <span class="glyphicon glyphicon-calendar"></span><span class="glyphicon glyphicon-sort-by-order"></span></a>
75+
<a data-toggle="tooltip" title="{{_('Sort according to book date, oldest first')}}" id="old" class="btn btn-primary{% if order == "old" %} active{% endif%}" href="{{url_for('web.books_list', data=page, book_id=id, sort_param='old')}}"><span class="glyphicon glyphicon-book"></span> <span class="glyphicon glyphicon-calendar"></span><span class="glyphicon glyphicon-sort-by-order-alt"></span></a>
76+
<a data-toggle="tooltip" title="{{_('Sort title in alphabetical order')}}" id="asc" class="btn btn-primary{% if order == "abc" %} active{% endif%}" href="{{url_for('web.books_list', data=page, book_id=id, sort_param='abc')}}"><span class="glyphicon glyphicon-font"></span><span class="glyphicon glyphicon-sort-by-alphabet"></span></a>
77+
<a data-toggle="tooltip" title="{{_('Sort title in reverse alphabetical order')}}" id="desc" class="btn btn-primary{% if order == "zyx" %} active{% endif%}" href="{{url_for('web.books_list', data=page, book_id=id, sort_param='zyx')}}"><span class="glyphicon glyphicon-font"></span><span class="glyphicon glyphicon-sort-by-alphabet-alt"></span></a>
78+
<a data-toggle="tooltip" title="{{_('Sort authors in alphabetical order')}}" id="auth_az" class="btn btn-primary{% if order == "authaz" %} active{% endif%}" href="{{url_for('web.books_list', data=page, book_id=id, sort_param='authaz')}}"><span class="glyphicon glyphicon-user"></span><span class="glyphicon glyphicon-sort-by-alphabet"></span></a>
79+
<a data-toggle="tooltip" title="{{_('Sort authors in reverse alphabetical order')}}" id="auth_za" class="btn btn-primary{% if order == "authza" %} active{% endif%}" href="{{url_for('web.books_list', data=page, book_id=id, sort_param='authza')}}"><span class="glyphicon glyphicon-user"></span><span class="glyphicon glyphicon-sort-by-alphabet-alt"></span></a>
80+
<a data-toggle="tooltip" title="{{_('Sort according to publishing date, newest first')}}" id="pub_new" class="btn btn-primary{% if order == "pubnew" %} active{% endif%}" href="{{url_for('web.books_list', data=page, book_id=id, sort_param='pubnew')}}"><span class="glyphicon glyphicon-calendar"></span><span class="glyphicon glyphicon-sort-by-order"></span></a>
81+
<a data-toggle="tooltip" title="{{_('Sort according to publishing date, oldest first')}}" id="pub_old" class="btn btn-primary{% if order == "pubold" %} active{% endif%}" href="{{url_for('web.books_list', data=page, book_id=id, sort_param='pubold')}}"><span class="glyphicon glyphicon-calendar"></span><span class="glyphicon glyphicon-sort-by-order-alt"></span></a>
82+
{% if page == 'series' %}
83+
<a data-toggle="tooltip" title="{{_('Sort ascending according to series index')}}" id="series_asc" class="btn btn-primary{% if order == "seriesasc" %} active{% endif%}" href="{{url_for('web.books_list', data=page, book_id=id, sort_param='seriesasc')}}"><span class="glyphicon glyphicon-sort-by-order"></span></a>
84+
<a data-toggle="tooltip" title="{{_('Sort descending according to series index')}}" id="series_desc" class="btn btn-primary{% if order == "seriesdesc" %} active{% endif%}" href="{{url_for('web.books_list', data=page, book_id=id, sort_param='seriesdesc')}}"><span class="glyphicon glyphicon-sort-by-order-alt"></span></a>
85+
{% endif %}
86+
{% endif %}
87+
</div>
88+
{% endif %}
89+
<div class="row display-flex">
90+
{% if entries[0] %}
91+
{% for entry in entries %}
92+
<div class="col-sm-3 col-lg-2 col-xs-6 book session" id="books">
93+
<div class="cover">
94+
<a href="{{ url_for('web.show_book', book_id=entry.Books.id) }}" {% if simple==false %}data-toggle="modal" data-target="#bookDetailsModal" data-remote="false"{% endif %}>
95+
<span class="img" title="{{ entry.Books.title }}">
96+
{{ image.book_cover(entry.Books) }}
97+
{% if entry[2] == True %}<span class="badge read glyphicon glyphicon-ok"></span>{% endif %}
98+
</span>
99+
</a>
100+
</div>
101+
<div class="meta">
102+
<a href="{{ url_for('web.show_book', book_id=entry.Books.id) }}" {% if simple==false %}data-toggle="modal" data-target="#bookDetailsModal" data-remote="false"{% endif %}>
103+
<p title="{{ entry.Books.title }}" class="title">{{entry.Books.title|shortentitle}}</p>
104+
</a>
105+
<p class="author">
106+
{% for author in entry.Books.authors %}
107+
{% if loop.index > g.config_authors_max and g.config_authors_max != 0 %}
108+
{% if not loop.first %}
109+
<span class="author-hidden-divider">&amp;</span>
110+
{% endif %}
111+
<a class="author-name author-hidden" href="{{url_for('web.books_list', data='author', book_id=author.id, sort_param='stored') }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
112+
{% if loop.last %}
113+
<a href="#" class="author-expand" data-authors-max="{{g.config_authors_max}}" data-collapse-caption="({{_('reduce')}})">(...)</a>
114+
{% endif %}
115+
{% else %}
116+
{% if not loop.first %}
117+
<span>&amp;</span>
118+
{% endif %}
119+
<a class="author-name" href="{{url_for('web.books_list', data='author', book_id=author.id, sort_param='stored') }}">{{author.name.replace('|',',')|shortentitle(30)}}</a>
120+
{% endif %}
121+
{% endfor %}
122+
{% if entry.Books.data|music %}
123+
<span class="glyphicon glyphicon-music"></span>
124+
{% endif %}
125+
</p>
126+
{% if entry.Books.series.__len__() > 0 %}
127+
<p class="series">
128+
{% if page != "series" %}
129+
<a href="{{url_for('web.books_list', data='series', sort_param='stored', book_id=entry.Books.series[0].id )}}">
130+
{{entry.Books.series[0].name}}
131+
</a>
132+
{% else %}
133+
<span>{{entry.Books.series[0].name}}</span>
134+
{% endif %}
135+
({{entry.Books.series_index|formatfloat(2)}})
136+
</p>
137+
{% endif %}
138+
{% if entry.Books.ratings.__len__() > 0 %}
139+
<div class="rating">
140+
{% for number in range((entry.Books.ratings[0].rating/2)|int(2)) %}
141+
<span class="glyphicon glyphicon-star good"></span>
142+
{% if loop.last and loop.index < 5 %}
143+
{% for numer in range(5 - loop.index) %}
144+
<span class="glyphicon glyphicon-star-empty"></span>
145+
{% endfor %}
146+
{% endif %}
147+
{% endfor %}
148+
</div>
149+
{% endif %}
150+
</div>
151+
</div>
152+
{% endfor %}
153+
{% endif %}
154+
</div>
155+
</div>
156+
{% endblock %}

root/app/calibre-web/cps/web.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ def render_books_list(data, sort_param, book_id, page):
452452
db.Books.id == db.books_series_link.c.book,
453453
db.Series)
454454
return render_title_template('index.html', random=random, entries=entries, pagination=pagination,
455-
title=_(f"Books ({cwa_get_num_books_in_library():,})"), page=website, order=order[1])
455+
title=_(f'Books (<span style="color: white">{cwa_get_num_books_in_library()}</span>)'), page=website, order=order[1])
456456

457457

458458
def render_rated_books(page, book_id, order):

0 commit comments

Comments
 (0)