forked from biblioverse/biblioteca
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use the kepub url extension to provide the ebook to kobo
- Loading branch information
Showing
7 changed files
with
140 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
namespace App\Kobo\Kepubify; | ||
|
||
use Symfony\Component\DependencyInjection\Attribute\Autowire; | ||
|
||
class KepubifyEnabler | ||
{ | ||
public function __construct( | ||
#[Autowire(param: 'KEPUBIFY_BIN')] | ||
private string $kepubifyBinary | ||
) { | ||
} | ||
|
||
public function setKepubifyBinary(string $kepubifyBinary): void | ||
{ | ||
$this->kepubifyBinary = $kepubifyBinary; | ||
} | ||
|
||
public function isEnabled(): bool | ||
{ | ||
return trim($this->kepubifyBinary) !== ''; | ||
} | ||
|
||
public function getKepubifyBinary(): string | ||
{ | ||
return $this->kepubifyBinary; | ||
} | ||
|
||
public function disable(): string | ||
{ | ||
$lastValue = $this->kepubifyBinary; | ||
$this->kepubifyBinary = ''; | ||
|
||
return $lastValue; | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
src/Kobo/Messenger/KepubifyMessage.php → src/Kobo/Kepubify/KepubifyMessage.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
<?php | ||
|
||
namespace App\Kobo\Messenger; | ||
namespace App\Kobo\Kepubify; | ||
|
||
/** | ||
* Convert an ebook with kepubify binary | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters