\n"); ?> /opds/all All Standard Ebooks Free and liberated ebooks, carefully produced for the true book lover. /images/logo.png Standard Ebooks registerXPathNamespace('dc', 'http://purl.org/dc/elements/1.1/'); $authors = array(); $temp = $xml->xpath('/package/metadata/dc:identifier') ?: []; $url = preg_replace('/^url:/ius', '', (string)array_shift($temp)) ?? ''; $url = preg_replace('/^https:\/\/standardebooks.org/ius', $webUrl, $url) ?? ''; $relativeUrl = preg_replace('/^' . preg_quote($webUrl, '/') . '/ius', '', $url) ?? ''; $temp = $xml->xpath('/package/metadata/dc:title') ?: []; $title = array_shift($temp); $temp = $xml->xpath('/package/metadata/meta[@property="se:long-description"]') ?: []; $longDescription = array_shift($temp); $authors = $xml->xpath('/package/metadata/dc:creator') ?: []; $temp = $xml->xpath('/package/metadata/dc:date') ?: []; $published = array_shift($temp); $temp = $xml->xpath('/package/metadata/dc:language') ?: []; $language = array_shift($temp); $temp = $xml->xpath('/package/metadata/meta[@property="dcterms:modified"]') ?: []; $modified = array_shift($temp); $temp = $xml->xpath('/package/metadata/dc:description') ?: []; $description = array_shift($temp); $subjects = $xml->xpath('/package/metadata/dc:subject') ?: []; $sources = $xml->xpath('/package/metadata/dc:source') ?: []; $filesystemPath = preg_replace('/\/src\/epub\/content.opf$/ius', '', $path) ?? ''; $temp = glob($filesystemPath . '/dist/*.epub'); $epubFilename = preg_replace('/(\|\.epub)/ius', '', preg_replace('/.+\//ius', '', array_shift($temp) ?? '') ?? '') ?? ''; $temp = glob($filesystemPath . '/dist/*.azw3'); $kindleFilename = preg_replace('/.+\//ius', '', array_shift($temp) ?? '') ?? ''; ?> <?= $title ?> attributes() !== null){ $id = $author->attributes()->id; } $temp = $xml->xpath('/package/metadata/meta[@property="se:url.encyclopedia.wikipedia"][@refines="#' . $id . '"]') ?: []; $wikiUrl = array_shift($temp); $temp = $xml->xpath('/package/metadata/meta[@property="se:name.person.full-name"][@refines="#' . $id . '"]') ?: []; $fullName = array_shift($temp); $temp = $xml->xpath('/package/metadata/meta[@property="se:url.authority.nacoaf"][@refines="#' . $id . '"]') ?: []; $nacoafLink = array_shift($temp); ?> Standard Ebooks Public domain in the United States; original content released to the public domain via the Creative Commons CC0 1.0 Universal Public Domain Dedication registerXPathNamespace('dc', 'http://purl.org/dc/elements/1.1/'); $xml->registerXPathNamespace('schema', 'http://schema.org/'); $allUpdated = $xml->xpath('/feed/entry[id="https://standardebooks.org/opds/all"]/updated')[0]; $allUpdated[0] = $updatedTimestamp; file_put_contents($webRoot . '/www/opds/index.xml', str_replace(" ns=", " xmlns=", $xml->asXml())); exec('se clean ' . escapeshellarg($webRoot) . '/www/opds/index.xml'); } } } catch(Exception $ex){ rename($tempFilename, $webRoot . '/www/opds/all.xml'); } unlink($tempFilename); ?>