mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-25 08:12:36 +02:00
57 lines
2.8 KiB
XML
57 lines
2.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<package version="3.0" unique-identifier="BookID" xmlns="http://www.idpf.org/2007/opf">
|
|
{{ $info := .Info }}
|
|
<metadata xmlns:opf="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
|
<dc:title>{{ .Title }}</dc:title>
|
|
<dc:language>en-US</dc:language>
|
|
<dc:identifier id="BookID">urn:uuid:{{ $info.UID }}</dc:identifier>
|
|
<dc:contributor id="contributor">{{ $info.Publisher }}</dc:contributor>
|
|
<dc:publisher>{{ $info.Publisher }}</dc:publisher>
|
|
<dc:date>{{ $info.UpdatedAt }}</dc:date>
|
|
<dc:creator>{{ $info.Author }}</dc:creator>
|
|
<meta property="dcterms:modified">{{ $info.UpdatedAt }}</meta>
|
|
<meta name="original-resolution" content="{{ $info.ViewWidth }}x{{ $info.ViewHeight }}"/>
|
|
<meta name="book-type" content="comic"/>
|
|
<meta name="primary-writing-mode" content="horizontal-{{ if $info.Manga }}rl{{ else }}lr{{ end }}"/>
|
|
<meta property="rendition:layout">pre-paginated</meta>
|
|
<meta name="rendition:spread" content="landscape"/>
|
|
{{ if eq $info.AddPanelView true }}
|
|
<meta name="region-mag" content="true"/>
|
|
{{ end }}
|
|
{{ if gt .Total 1 }}
|
|
<meta name="calibre:series" content="{{ $info.Title }}"/>
|
|
<meta name="calibre:series_index" content="{{ .Part }}"/>
|
|
{{ end }}
|
|
</metadata>
|
|
<manifest>
|
|
<item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
|
|
<item id="nav" href="nav.xhtml" properties="nav" media-type="application/xhtml+xml"/>
|
|
<item id="style_css" href="Text/style.css" media-type="text/css"/>
|
|
{{ if eq $info.AddPanelView true }}
|
|
<item id="panelview_css" href="Text/panelview.css" media-type="text/css"/>
|
|
{{ end }}
|
|
<item id="cover" href="Images/{{ .Cover.Id }}_p{{ .Cover.Part }}.jpg" media-type="image/jpeg" properties="cover-image"/>
|
|
{{ range .Images }}
|
|
{{ if eq .IsCover false }}
|
|
<item id="img_{{ .Id }}_p{{ .Part}}" href="Images/{{ .Id }}_p{{ .Part}}.jpg" media-type="image/jpeg"/>
|
|
{{ end }}
|
|
{{ end }}
|
|
<item id="page_part" href="Text/part.xhtml" media-type="application/xhtml+xml"/>
|
|
{{ range .Images }}
|
|
<item id="page_{{ .Id }}_p{{ .Part}}" href="Text/{{ .Id }}_p{{ .Part}}.xhtml" media-type="application/xhtml+xml"/>
|
|
{{ if eq .NeedSpace true }}
|
|
<item id="page_{{ .Id }}_sp" href="Text/{{ .Id }}_sp.xhtml" media-type="application/xhtml+xml"/>
|
|
{{ end }}
|
|
{{ end }}
|
|
</manifest>
|
|
<spine toc="ncx" page-progression-direction="{{ if $info.Manga }}rtl{{ else }}ltr{{ end }}">
|
|
<itemref idref="page_part" linear="yes"/>
|
|
{{ range .Images }}
|
|
{{ if eq .NeedSpace true }}
|
|
<itemref idref="page_{{ .Id }}_sp" linear="yes" />
|
|
{{ end }}
|
|
<itemref idref="page_{{ .Id }}_p{{ .Part }}" linear="yes" {{ if eq .Part 1 }}properties="page-spread-left"{{ end }}{{ if eq .Part 2 }}properties="page-spread-right"{{ end }}/>
|
|
{{ end }}
|
|
</spine>
|
|
</package>
|