ISBN in PDF
authorJan Szejko <janek37@gmail.com>
Tue, 16 May 2017 10:16:24 +0000 (12:16 +0200)
committerJan Szejko <janek37@gmail.com>
Tue, 16 May 2017 10:16:24 +0000 (12:16 +0200)
librarian/pdf.py
librarian/pdf/wl.cls
librarian/pdf/wl2tex.xslt

index 20ab8bb..bbe3a92 100644 (file)
@@ -86,7 +86,7 @@ def substitute_hyphens(doc):
     insert_tags(doc,
                 re.compile("(?<=[^-\s])-(?=[^-\s])"),
                 "dywiz",
     insert_tags(doc,
                 re.compile("(?<=[^-\s])-(?=[^-\s])"),
                 "dywiz",
-                exclude=[DCNS("identifier.url"), DCNS("rights.license")]
+                exclude=[DCNS("identifier.url"), DCNS("rights.license"), "meta"]
                 )
 
 
                 )
 
 
index 82098ec..30dbf63 100644 (file)
@@ -276,6 +276,11 @@ Letters={SmallCaps,UppercaseSmallCaps}
         \coverby
     \fi
 
         \coverby
     \fi
 
+    \ifdefined\isbn
+        \vspace{.6em}
+        \isbn
+    \fi
+
     \vspace{.6em}
     \emph{Wesprzyj Wolne Lektury!}
 
     \vspace{.6em}
     \emph{Wesprzyj Wolne Lektury!}
 
index 7b38e34..43092e7 100644 (file)
                 \vspace{.6em}
             </xsl:if>}
         \def\description{<TeXML escape="1"><xsl:apply-templates select=".//dc:description" mode="inline" /></TeXML>}
                 \vspace{.6em}
             </xsl:if>}
         \def\description{<TeXML escape="1"><xsl:apply-templates select=".//dc:description" mode="inline" /></TeXML>}
+        <xsl:if test=".//meta[@id='pdf-id']">
+            <xsl:variable name="isbn" select=".//meta[@id='pdf-id']"/>
+            \def\isbn{ISBN <xsl:value-of select="substring-after($isbn, 'ISBN-')"/>}
+        </xsl:if>
     </TeXML>
 </xsl:template>
 
     </TeXML>
 </xsl:template>