[fix] Corrections ruff CI (UP017/UP041/UP012/I001/F401/FURB162) : backend/export.py
This commit is contained in:
+2
-2
@@ -359,7 +359,7 @@ def export_epub(vault_path: Path, file_path: Path) -> bytes:
|
|||||||
|
|
||||||
rendered = _render_body(body, path.parent, vault_path, path)
|
rendered = _render_body(body, path.parent, vault_path, path)
|
||||||
|
|
||||||
uid = f"obsigate-{_slugify(title)}-{int(datetime.datetime.now(tz=datetime.timezone.utc).timestamp())}"
|
uid = f"obsigate-{_slugify(title)}-{int(datetime.datetime.now(tz=datetime.UTC).timestamp())}"
|
||||||
xhtml = f"""<?xml version="1.0" encoding="utf-8"?>
|
xhtml = f"""<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
|
||||||
@@ -383,7 +383,7 @@ def export_epub(vault_path: Path, file_path: Path) -> bytes:
|
|||||||
<dc:title>{html_mod.escape(title)}</dc:title>
|
<dc:title>{html_mod.escape(title)}</dc:title>
|
||||||
<dc:creator>{html_mod.escape(author)}</dc:creator>
|
<dc:creator>{html_mod.escape(author)}</dc:creator>
|
||||||
<dc:language>fr</dc:language>
|
<dc:language>fr</dc:language>
|
||||||
<meta property="dcterms:modified">{datetime.datetime.now(datetime.timezone.utc).strftime('%Y-%m-%dT%H:%M:%SZ')}</meta>
|
<meta property="dcterms:modified">{datetime.datetime.now(datetime.UTC).strftime('%Y-%m-%dT%H:%M:%SZ')}</meta>
|
||||||
</metadata>
|
</metadata>
|
||||||
<manifest>
|
<manifest>
|
||||||
<item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
|
<item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
|
||||||
|
|||||||
Reference in New Issue
Block a user