This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
class String | |
def camelize | |
string = self | |
string.split('_').map(&:capitalize).join('') | |
end | |
end | |
module PandocFilter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fileutils' | |
# Usage: rake duokanify file=path/to/sample.epub | |
desc 'Adds dtb:depth to ncx file in an ePub' | |
task :duokanify do | |
unless ENV['file'] | |
abort("ERROR: Please provide the ePub file path!\nexit") | |
end | |
unless ENV['file'].end_with?('.epub') |
NewerOlder