Calibre Web 2021
A recent update to Calibre Web version .6 added the series info, so there is no longer a need to add that to the templates. And they did make a few changes to the code for the publishing date.
Reminder You can edit the script through View Package Contents
Now to add the pub date so my python web scraping program can access it:
After ~line 71 on /cps/templates/shelf.html
{% if (entry.Books.pubdate|string)[:10] != '0101-01-01' %}
<p class="series" id="pubdate">{{entry.Books.pubdate|formatdate}} </p>
{% endif %}
—just after the {% endif %} for the series section.
Remember to go to Admin and restart Calibre before exporting.
Note: updated March 2022
– to change the class to “series” to match the previous lines and add an id of “pubdate” for the script to search for.
Note: updated July 2022
– changing the class to “series” caused “pubdate”to show up if there was no series. So I added id=”series” to the preceding {if} as well (see below) — around line 64 — and then searched for id
rather than class
in the python script.
{% if entry.Books.series.__len__() > 0 %}
<p id="series" class="series"p>
Note: updated Oct 2022
The source code was changed from entry.pubdate
to entry.Books.pubdate
(and all other calls — see series above)
Note: Update April 2024
Edited opds.py to enable Homepage widget: https://github.com/janeczku/calibre-web/commit/0499e578cdd45db656da34cd2d7152c8d88ceb23#diff-4ec64b67724eadd1f9c30601b50791079ee157b6bf63c411ce68d637c9793f1dR416-R425