Skip to content

Commit

Permalink
Revert "feat(kobo): Kobo book conversion using calibre and kepubify"
Browse files Browse the repository at this point in the history
This reverts commit 9d37ddb.
  • Loading branch information
ragusa87 committed Aug 17, 2024
1 parent 9d37ddb commit 5ad1ccd
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 565 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/public/alternatives/
/var/
/.composer
/vendor/
Expand Down
50 changes: 0 additions & 50 deletions calibre/Dockerfile

This file was deleted.

98 changes: 0 additions & 98 deletions calibre/server.py

This file was deleted.

8 changes: 0 additions & 8 deletions config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,6 @@ services:
tags:
- { name: kernel.event_listener, event: kernel.request, method: onKernelRequest, priority: 130 }

App\Service\BookFormatStorage:
arguments:
$storageDir: '%kernel.project_dir%/public/alternatives'

App\Service\BookConverter:
bind:
$storageDir: '%kernel.project_dir%/public/alternatives'

App\EventListener\LanguageListener:
tags:
- { name: kernel.event_listener, event: kernel.request, method: onKernelRequest, priority: 101 }
Expand Down
12 changes: 1 addition & 11 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,7 @@ services:
- 'traefik.http.routers.npm.entrypoints=https,http'
- 'traefik.http.routers.npm.rule=Host(`biblioteca-npm.docker.test`)'
- 'traefik.http.services.npm.loadbalancer.server.port=8181'
calibre:
hostname: calibre
build:
context: ./calibre
volumes:
- ./var/cache/pandoc:/tmp/pandoc
ports:
- 7654:7654
networks:
- default
- pontsun


db:
image: mariadb:10.10
Expand Down
41 changes: 0 additions & 41 deletions migrations/Version20240817142454.php

This file was deleted.

53 changes: 0 additions & 53 deletions src/Command/BookConvertCommand.php

This file was deleted.

40 changes: 0 additions & 40 deletions src/Entity/Book.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,20 +118,13 @@ class Book
#[ORM\OneToMany(mappedBy: 'book', targetEntity: KoboSyncedBook::class, cascade: ['remove'], orphanRemoval: true)]
private Collection $koboSyncedBooks;

/**
* @var Collection<int, BookFormat>
*/
#[ORM\OneToMany(mappedBy: 'book', targetEntity: BookFormat::class, orphanRemoval: true)]
private Collection $bookFormats;

public function __construct()
{
$this->bookInteractions = new ArrayCollection();
$this->shelves = new ArrayCollection();
$this->uuid = $this->generateUuid();
$this->koboSyncedBooks = new ArrayCollection();
$this->bookmarkUsers = new ArrayCollection();
$this->bookFormats = new ArrayCollection();
}

public function getId(): ?int
Expand Down Expand Up @@ -596,37 +589,4 @@ public function setBookmarkUsers(Collection $bookmarkUsers): self

return $this;
}

public function hasFormat(string $format): bool
{
foreach ($this->bookFormats as $bookFormat) {
if ($bookFormat->getType() === $format) {
return true;
}
}

return false;
}

public function addBookFormat(BookFormat $bookFormat): static
{
if (!$this->bookFormats->contains($bookFormat)) {
$this->bookFormats->add($bookFormat);
$bookFormat->setBook($this);
}

return $this;
}

public function removeBookFormat(BookFormat $bookFormat): static
{
if ($this->bookFormats->removeElement($bookFormat)) {
// set the owning side to null (unless already changed)
if ($bookFormat->getBook() === $this) {
$bookFormat->setBook(null);
}
}

return $this;
}
}
Loading

0 comments on commit 5ad1ccd

Please sign in to comment.