Skip to content

Commit

Permalink
[master] fix bookId with uuid in content.opf.
Browse files Browse the repository at this point in the history
  • Loading branch information
cyrilis committed Nov 23, 2015
1 parent 8815dc6 commit a921b1d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/content.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<opf:package version="2.0" unique-identifier="BookId" xmlns:opf="http://www.idpf.org/2007/opf" xmlns:dc="http://purl.org/dc/elements/1.1/">
<opf:metadata>
<dc:identifier id="BookId" opf:scheme="URN">urn:uuid:<%= uuid %></dc:identifier>
<dc:identifier id="BookId" opf:scheme="URN">uuid:<%= id %></dc:identifier>
<dc:title><%= title %></dc:title>
<dc:description><%= description %></dc:description>
<dc:publisher><%= publisher || "cyrilis.com" %></dc:publisher>
Expand Down
4 changes: 3 additions & 1 deletion lib/index.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ uuid = ->
return (if c is 'x' then r else r&0x3|0x8).toString(16)

class EPub
constructor: (@options, output)->
constructor: (options, output)->
@options = options
self = @
@defer = new Q.defer()

Expand Down Expand Up @@ -55,6 +56,7 @@ class EPub
@id = uuid()
@uuid = path.resolve @options.tempDir, @id
@options.uuid = @uuid
@options.id = @id
@options.images = []
@options.content = _.map @options.content, (content, index)->
titleSlug = uslug removeDiacritics content.title || "no title"
Expand Down
1 change: 1 addition & 0 deletions lib/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a921b1d

Please sign in to comment.