# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
def index_book(book_id, book_info=None, **kwargs):
from catalogue.models import Book
try:
return Book.objects.get(id=book_id).search_index(book_info, **kwargs)
def index_book(book_id, book_info=None, **kwargs):
from catalogue.models import Book
try:
return Book.objects.get(id=book_id).search_index(book_info, **kwargs)
def build_custom_pdf(book_id, customizations, file_name, waiter_id=None):
"""Builds a custom PDF file."""
try:
def build_custom_pdf(book_id, customizations, file_name, waiter_id=None):
"""Builds a custom PDF file."""
try:
pdf = wldoc.as_pdf(
customizations=customizations,
morefloats=settings.LIBRARIAN_PDF_MOREFLOATS,
pdf = wldoc.as_pdf(
customizations=customizations,
morefloats=settings.LIBRARIAN_PDF_MOREFLOATS,