Add cover art database

Co-authored-by: Job Curtis <job.curtis@gmail.com>
Co-authored-by: Alex Cabal <alex@standardebooks.org>
This commit is contained in:
Mike Colagrosso 2023-12-28 16:38:39 -06:00 committed by Alex Cabal
parent 74f747df76
commit 6a5c05511a
92 changed files with 3174 additions and 146 deletions

View file

@ -40,6 +40,12 @@ class Formatter{
return htmlspecialchars(trim($text ?? ''), ENT_QUOTES|ENT_XML1, 'utf-8');
}
public static function EscapeMarkdown(?string $text): string{
$parsedown = new Parsedown();
$parsedown->setSafeMode(true);
return $parsedown->text($text);
}
public static function ToFileSize(?int $bytes): string{
// See https://stackoverflow.com/a/5501447
$output = '';