epubforge 0.0.10 → 0.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +17 -10
  3. data/VERSION +1 -1
  4. data/bin/epubforge +1 -1
  5. data/config/actions/epub.rb +50 -0
  6. data/config/actions/forge.rb +34 -13
  7. data/config/actions/git.rb +106 -0
  8. data/config/actions/help.rb +13 -13
  9. data/config/actions/html.rb +33 -0
  10. data/config/actions/mobi.rb +60 -0
  11. data/config/actions/new.rb +182 -0
  12. data/config/actions/word_count.rb +26 -24
  13. data/config/{actions → actions_to_ignore}/generate.rb +1 -1
  14. data/config/{actions → actions_to_ignore}/generate_chapter.rb +0 -0
  15. data/config/{actions → actions_to_ignore}/git_backup.rb +2 -2
  16. data/config/{actions → actions_to_ignore}/globals.rb +1 -1
  17. data/config/{actions → actions_to_ignore}/kindle.rb +3 -3
  18. data/config/{actions → actions_to_ignore}/local_action.rb +1 -1
  19. data/config/{actions → actions_to_ignore}/mobify.rb +3 -3
  20. data/config/actions_to_ignore/notes_to_epub.rb +19 -0
  21. data/config/actions_to_ignore/notes_to_kindle.rb +18 -0
  22. data/config/{actions → actions_to_ignore}/spell.rb +1 -1
  23. data/config/{actions → actions_to_ignore}/version.rb +3 -3
  24. data/config/{actions → actions_to_ignore}/wrap_scene_notes_in_hidden_div.rb +1 -1
  25. data/config/converters/epub_to_mobi.calibre.rb +8 -0
  26. data/config/converters/epub_to_mobi.kindlegen.rb +11 -0
  27. data/config/html_translators/default_kramdown.html_translator.rb +9 -0
  28. data/config/html_translators/default_markdown.html_translator.rb +10 -0
  29. data/config/html_translators/default_markdown_pandoc.html_translator.rb +10 -0
  30. data/config/html_translators/default_textile_pandoc.html_translator.rb +8 -0
  31. data/config/html_translators/default_xhtml.html_translator.rb +7 -0
  32. data/config/html_translators/fallback_html.html_translator.rb +9 -0
  33. data/config/html_translators/fallback_markdown.html_translator.rb +8 -0
  34. data/config/html_translators/fallback_textile.html_translator.rb +7 -0
  35. data/config/html_translators/fallback_txt.html_translator.rb +8 -0
  36. data/config/html_translators/fallback_unknown.html_translator.rb +7 -0
  37. data/lib/epubforge.rb +37 -82
  38. data/lib/{action/thor_action.rb → epubforge/action/action.rb} +89 -69
  39. data/lib/epubforge/action/action2.rb +109 -0
  40. data/lib/epubforge/action/action_definition.rb +62 -0
  41. data/lib/epubforge/action/actions_lookup.rb +45 -0
  42. data/lib/epubforge/action/chatterbox.rb +93 -0
  43. data/lib/{action → epubforge/action}/cli_command.rb +2 -2
  44. data/lib/{action → epubforge/action}/cli_sequence.rb +0 -0
  45. data/lib/{action → epubforge/action}/file_transformer.rb +0 -0
  46. data/lib/{action → epubforge/action}/hooks_interface.rb +2 -2
  47. data/lib/{action → epubforge/action}/run_description.rb +12 -9
  48. data/lib/{action → epubforge/action}/runner.rb +23 -24
  49. data/lib/{epub → epubforge/builder}/assets/asset.rb +1 -1
  50. data/lib/{epub → epubforge/builder}/assets/font.rb +1 -1
  51. data/lib/epubforge/builder/assets/html.rb +9 -0
  52. data/lib/{epub → epubforge/builder}/assets/image.rb +1 -1
  53. data/lib/epubforge/builder/assets/markdown.rb +9 -0
  54. data/lib/{epub → epubforge/builder}/assets/page.rb +12 -4
  55. data/lib/{epub → epubforge/builder}/assets/stylesheet.rb +1 -1
  56. data/lib/epubforge/builder/assets/textile.rb +9 -0
  57. data/lib/epubforge/builder/assets/xhtml.rb +9 -0
  58. data/lib/epubforge/builder/builder.rb +134 -0
  59. data/lib/{epub/builder.rb → epubforge/builder/epub.rb} +58 -161
  60. data/lib/epubforge/builder/html.rb +22 -0
  61. data/lib/epubforge/builder/packager.rb +16 -0
  62. data/lib/epubforge/core_extensions/array.rb +2 -0
  63. data/lib/{core_extensions → epubforge/core_extensions}/kernel.rb +0 -0
  64. data/lib/epubforge/core_extensions/nil_class.rb +2 -0
  65. data/lib/epubforge/core_extensions/object.rb +24 -0
  66. data/lib/{core_extensions → epubforge/core_extensions}/string.rb +1 -5
  67. data/lib/{custom_helpers.rb → epubforge/custom_helpers.rb} +0 -1
  68. data/lib/{errors.rb → epubforge/exceptions/errors.rb} +0 -0
  69. data/lib/{project → epubforge/project}/project.rb +23 -17
  70. data/lib/epubforge/utils/action_loader.rb +8 -0
  71. data/lib/epubforge/utils/class_loader.rb +102 -0
  72. data/lib/epubforge/utils/converter.rb +94 -0
  73. data/lib/{utils → epubforge/utils}/downloader.rb +0 -0
  74. data/lib/{utils → epubforge/utils}/file_orderer.rb +0 -0
  75. data/lib/epubforge/utils/file_path.rb +8 -0
  76. data/lib/epubforge/utils/html_translator.rb +126 -0
  77. data/lib/epubforge/utils/html_translator_queue.rb +113 -0
  78. data/lib/epubforge/utils/htmlizer.rb +61 -0
  79. data/lib/{utils → epubforge/utils}/misc.rb +0 -0
  80. data/lib/epubforge/utils/root_path.rb +8 -0
  81. data/lib/epubforge/utils/settings.rb +147 -0
  82. data/lib/epubforge/utils/template_evaluator.rb +7 -0
  83. data/templates/{default/book/afterword.markdown.template → project/book/afterword.markdown} +0 -0
  84. data/templates/project/book/chapter-%0000chapter%.markdown.template +4 -0
  85. data/templates/{default → project}/book/cover.xhtml.template +2 -2
  86. data/templates/{default/book/foreword.markdown.template → project/book/foreword.markdown} +0 -0
  87. data/templates/{default → project}/book/images/cover.png +0 -0
  88. data/templates/{default/book/stylesheets/stylesheet.css.template → project/book/stylesheets/stylesheet.css} +0 -0
  89. data/templates/project/book/title_page.markdown.template +5 -0
  90. data/templates/project/notes/character.%character.name_for_file%.markdown.template +15 -0
  91. data/templates/{default → project}/notes/images/cover.png +0 -0
  92. data/templates/{default/notes/stylesheets/stylesheet.css.template → project/notes/stylesheets/stylesheet.css} +0 -0
  93. data/templates/{default → project}/settings/actions/local_action.rb.example +1 -1
  94. data/templates/project/settings/config.rb.template +70 -0
  95. data/templates/project/settings/html_translators/example_translator.rb +29 -0
  96. data/templates/{default → project}/settings/wordcount.template +1 -1
  97. data/test/answers01.yml +30 -0
  98. data/test/helper.rb +62 -39
  99. data/test/misc/config.rb +5 -7
  100. data/test/test_epubforge.rb +18 -14
  101. data/test/{test_htmlizers.rb → test_html_translators.rb} +4 -8
  102. data/test/test_template_evaluator.rb +42 -0
  103. data/test/test_utils.rb +0 -11
  104. metadata +186 -189
  105. data/config/actions/gitify.rb +0 -72
  106. data/config/actions/init.rb +0 -138
  107. data/config/actions/notes_to_epub.rb +0 -18
  108. data/config/actions/notes_to_kindle.rb +0 -17
  109. data/config/htmlizers.rb +0 -70
  110. data/lib/action/actions_lookup.rb +0 -45
  111. data/lib/core_extensions/array.rb +0 -5
  112. data/lib/core_extensions/nil_class.rb +0 -5
  113. data/lib/core_extensions/object.rb +0 -5
  114. data/lib/epub/assets/html.rb +0 -8
  115. data/lib/epub/assets/markdown.rb +0 -8
  116. data/lib/epub/assets/textile.rb +0 -8
  117. data/lib/epub/assets/xhtml.rb +0 -8
  118. data/lib/epub/packager.rb +0 -16
  119. data/lib/utils/action_loader.rb +0 -7
  120. data/lib/utils/class_loader.rb +0 -102
  121. data/lib/utils/directory_builder.rb +0 -181
  122. data/lib/utils/file_path.rb +0 -152
  123. data/lib/utils/html_translator.rb +0 -100
  124. data/lib/utils/html_translator_queue.rb +0 -70
  125. data/lib/utils/htmlizer.rb +0 -92
  126. data/lib/utils/root_path.rb +0 -20
  127. data/lib/utils/settings.rb +0 -146
  128. data/lib/utils/template_evaluator.rb +0 -20
  129. data/templates/default/book/chapter-%i%.markdown.sequence +0 -4
  130. data/templates/default/book/title_page.markdown.template +0 -4
  131. data/templates/default/notes/character.named.markdown.template +0 -4
  132. data/templates/default/payload.rb +0 -65
  133. data/templates/default/settings/config.rb.form +0 -55
  134. data/templates/default/settings/htmlizers.rb +0 -0
  135. data/test/test_directory_builder.rb +0 -141
@@ -1,72 +0,0 @@
1
- module EpubForge
2
- module Action
3
- class Gitify < ThorAction
4
- description "create a remote git repository of the project folder"
5
- keywords :gitify, :git_init
6
- usage "#{$PROGRAM_NAME} gitify <project_directory>"
7
-
8
- desc( "do:gitify", "create a git repository to hold backups" )
9
- def do( project, *args )
10
- @project = project
11
- @conf = @project.config
12
- @gitconf = @conf.git
13
- @cli_sequence = CliSequence.new
14
- @cli_sequence.default( :verbose, true )
15
- @cli_sequence.default( :local_dir, @project.target_dir )
16
-
17
-
18
- if project_already_gitted?
19
- say_error "Already seems to be a git project. delete the .git folder if this is incorrect."
20
- return false
21
- end
22
-
23
- project_name_with_folder = @gitconf["repo_folder"].fwf_filepath.expand
24
-
25
- if @gitconf["remote_host"]
26
- remote_host = "#{@gitconf['remote_user']}@#{@gitconf['remote_host']}"
27
- @cli_sequence.default( :remote, remote_host )
28
- project_url = "ssh://#{remote_host}#{project_name_with_folder}"
29
-
30
- @cli_sequence.add_remote_command( "mkdir -p #{project_name_with_folder}", "rm -rf #{project_name_with_folder}" )
31
- @cli_sequence.add_remote_command( "git --bare init #{project_name_with_folder}" )
32
- identifier = project_name_with_folder.join( @gitconf["repo_id"] )
33
- @cli_sequence.add_remote_command( "touch #{identifier}", "rm #{identifier}" ) # undo isn't needed here, since the directory will be wiped out.
34
- else
35
- project_url = "file://#{project_name_with_folder}"
36
- @cli_sequence.add_local_command( "mkdir -p #{project_name_with_folder}", "rm -rf #{project_name_with_folder}" )
37
- @cli_sequence.add_local_command( "git --bare init #{project_name_with_folder}" )
38
- identifier = project_name_with_folder.join( @gitconf["repo_id"] )
39
- @cli_sequence.add_local_command( "touch #{identifier}", "rm #{identifier}" )
40
- end
41
-
42
- # running locally
43
- @cli_sequence.add_local_command "git init", "rm -rf .git"
44
- @cli_sequence.add_local_command "git remote add origin #{project_url}"
45
- @cli_sequence.add_local_command "git add ."
46
- @cli_sequence.add_local_command "git commit -a -m \"Initial commit\""
47
- @cli_sequence.add_local_command "git config branch.master.remote origin"
48
- @cli_sequence.add_local_command "git config branch.master.merge refs/heads/master"
49
- @cli_sequence.add_local_command "git push origin master" # need to be explicit about branch the first time
50
-
51
- if @cli_sequence.execute
52
- say_all_is_well( "All done. The url for this project is #{project_url}" )
53
- else
54
- say_error( "Command sequence failed." )
55
- end
56
- end
57
-
58
- protected
59
- def git_remote_exec( cmd )
60
- say_subtly( "attempting to run remotely: #{cmd}" )
61
- `cd #{@project.target_dir} && ssh #{@gitconf["remote_user"]}@#{@gitconf["remote_host"]} "#{cmd}"`
62
- say( "Success: #{$?.success?}")
63
- end
64
-
65
- def git_local_exec( cmd )
66
- say_subtly( "attempting to run locally: #{cmd}" )
67
- `cd #{@project.target_dir} && #{cmd}`
68
- say( "Success: #{$?.success?}")
69
- end
70
- end
71
- end
72
- end
@@ -1,138 +0,0 @@
1
- module EpubForge
2
- module Action
3
- class Init < ThorAction
4
- include_standard_options
5
- project_not_required
6
-
7
- desc("init", "create a new epubforge project")
8
- def init( *args )
9
- unless @project.nil?
10
- say_error "Project already exists. Quitting."
11
- return false
12
- end
13
-
14
- return false unless parse_args( *args )
15
-
16
- @template_dir = EpubForge.root.join( "templates", @template_to_use )
17
- src_entries = @template_dir.glob( "**", "*" ).map{ |entry|
18
- entry.relative_path_from( @template_dir )
19
- }
20
-
21
- self.source_paths.push( @template_dir )
22
- src_dirs = src_entries.select{ |d| @template_dir.join(d).directory? }.uniq
23
-
24
- for dir in src_dirs
25
- empty_directory( self.destination_root_filepath.join( dir ) )
26
- end
27
-
28
- for entry in src_entries - src_dirs
29
- case entry.ext
30
- when "template"
31
- dst = self.destination_root_filepath.join( entry ).without_ext
32
- template( entry, dst )
33
- when "sequence"
34
- @chapter_count ||= @opts[:answers][:chapter_count] if @opts[:answers]
35
- @chapter_count ||= ask_prettily("Setting up chapter files.\n How many chapters will your book have (you can add more later)? >>> ").to_i
36
-
37
- 1.upto( @chapter_count ) do |i|
38
- @i = i
39
- dst = self.destination_root_filepath.join( entry ).gsub( /%i%/, sprintf( "%04i", @i) ).without_ext
40
- template( entry, dst )
41
- end
42
- when "form"
43
- configure_configuration( @opts[:answers] || {} )
44
- dst = self.destination_root_filepath.join( entry ).without_ext
45
- template( entry, dst, @template_options )
46
- say_all_is_well( "Your configuration is all set up!" )
47
- say_instruction( "run 'epubforge gitify' to initialize the backup repository." )
48
- else
49
- copy_file( entry, self.destination_root_filepath.join( entry ) )
50
- end
51
- end
52
- end
53
-
54
- protected
55
- def configure_configuration(opts = {})
56
- say_instruction( "Don't think too hard about these next few questions. You can always change your mind by editing settings/config" )
57
-
58
- opts[:title] ||= ask_prettily("What is the name of your book?")
59
- opts[:author] ||= ask_prettily( "What is the name of the author?" )
60
- opts[:license] ||= ask_from_menu "What license do you want your book under?", [ "All Rights Reserved",
61
- "Creative Commons Non-Commercial, No Derivatives License",
62
- "Creative Commons Non-Commercial, Share-Alike License",
63
- "GNU Free Documentation License",
64
- "Public Domain",
65
- "Other" ]
66
- if opts[:license] == "Other"
67
- opts[:license] = ask_prettily( "Type in the license you wish to use : " )
68
- end
69
-
70
- @template_options = opts
71
-
72
- if git_installed?
73
- if opts[:use_git] || opts[:use_git].nil? && yes_prettily?( "Do you want to back up your project using git?" )
74
- configure_git( opts[:git] || {} )
75
- end
76
- else
77
- warn("The program 'git' must be installed and locatable if you want epubforge to back up your project.")
78
- end
79
- end
80
-
81
-
82
-
83
- def configure_git( opts = {})
84
- opts[:remote] = "Back up to a remote host."
85
- opts[:thumb] = "Back up to an external or thumb drive."
86
- opts[:backup_type] ||= ask_from_menu( "Where would you like to back up your project to?",
87
- [ opts[:remote],
88
- opts[:thumb] ] )
89
-
90
- opts[:repo_id] ||= rand(16**32).to_s(16)
91
-
92
- if opts[:backup_type] == opts[:remote]
93
- opts[:host] ||= ask_prettily("Enter the name of the remote host : ")
94
- opts[:user] ||= ask_prettily("Enter your user name : ")
95
- opts[:repo] ||= ask_prettily("Enter the name of the folder on the remote host. A folder called #{backup_folder_name} will be created there : ")
96
- elsif opts[:backup_type] == opts[:thumb]
97
- opts[:repo] ||= ask_prettily("Enter the full path to the backup folder. A folder called #{backup_folder_name} will be created there: ")
98
- else
99
- say_error("I'm confused by the requested backup style <#{opts[:backup_type]}>. Skipping git configuration.")
100
- opts = nil
101
- return false
102
- end
103
-
104
- # TODO: What if the target file system uses a different file separator?
105
- opts[:repo] = opts[:repo].fwf_filepath.join( backup_folder_name ) if opts[:repo].is_a?(String)
106
- @template_options[:git] = opts
107
- true
108
- end
109
-
110
- def backup_folder_name
111
- (@template_options[:title] || "").epf_underscorize + ".epubforge.git"
112
- end
113
-
114
- # Expects the following arguments: 1:<project directory (shouldn't exist)>, 2: options hash.
115
- # Options hash includes:
116
- def parse_args( *args )
117
- @opts = args.last.is_a?(Hash) ? args.pop : {}
118
- root = args.shift
119
-
120
- if root.nil?
121
- say_error "No destination directory given."
122
- return false
123
- end
124
-
125
- self.destination_root_filepath = root.fwf_filepath
126
-
127
- if self.destination_root_filepath.exist? &&
128
- (!(self.destination_root_filepath.empty?) || !(self.destination_root_filepath.directory?))
129
- say_error "This action must create a new directory or act upon an empty directory. Quitting."
130
- return false
131
- end
132
-
133
- @template_to_use = "default" # TODO: should turn into an option
134
- true
135
- end
136
- end
137
- end
138
- end
@@ -1,18 +0,0 @@
1
- module EpubForge
2
- module Action
3
- class Forge < ThorAction
4
- include_standard_options
5
-
6
- desc( "forge:notes", "Wraps your story notes up in a .epub (ebook) file." )
7
- def notes( *args )
8
- before_start
9
- builder = EpubForge::Epub::Builder.new( @project, book_dir: @project.target_dir.join("notes"),
10
- page_order: @project.config[:pages][:notes] )
11
- builder.build
12
- builder.package( @project.filename_for_epub_notes )
13
- builder.clean
14
- puts "Done building epub <#{@project.filename_for_epub_notes}>"
15
- end
16
- end
17
- end
18
- end
@@ -1,17 +0,0 @@
1
- module EpubForge
2
- module Action
3
- class NotesToKindle < Kindle
4
- description "Create a .mobi book from the notes and try to push it to your Kindle"
5
- keywords :n2k
6
- usage "#{$PROGRAM_NAME} n2k <project_directory>"
7
-
8
- def do( project, args )
9
- @project = project
10
- @src_epub = @project.filename_for_epub_notes.fwf_filepath
11
- @dst_mobi = @project.filename_for_mobi_notes.fwf_filepath
12
-
13
- mobify
14
- end
15
- end
16
- end
17
- end
data/config/htmlizers.rb DELETED
@@ -1,70 +0,0 @@
1
- EpubForge::Utils::Htmlizer.define do |html|
2
- html.format :xhtml
3
- html.group :default
4
- html.executable "false"
5
- html.cmd "cat {{f}}"
6
- end
7
-
8
-
9
- EpubForge::Utils::Htmlizer.define do |html|
10
- html.format :markdown
11
- html.group :default # the default is :user, so user-defined ones don't have to set it
12
- html.executable "multimarkdown"
13
- html.cmd "{{x}} {{o}} {{f}}"
14
- # html.opts "" # the default
15
- end
16
-
17
- EpubForge::Utils::Htmlizer.define do |html|
18
- html.format :markdown
19
- html.group :default
20
- html.executable "pandoc"
21
- html.cmd "{{x}} {{o}} {{f}}"
22
- html.opts "--from=markdown --to=html"
23
- end
24
-
25
- EpubForge::Utils::Htmlizer.define do |html|
26
- html.format :textile
27
- html.group :default
28
- html.executable "pandoc"
29
- html.cmd "{{x}} {{o}} {{f}}"
30
- html.opts "--from=textile --to=html"
31
- end
32
-
33
-
34
- # Emergency backups
35
- EpubForge::Utils::Htmlizer.define do |html|
36
- html.format :markdown
37
- html.group :fallback
38
- html.executable "false"
39
- html.cmd "echo \"<pre>\" && cat {{f}} && echo \"</pre>\""
40
- end
41
-
42
- EpubForge::Utils::Htmlizer.define do |html|
43
- html.format :textile
44
- html.group :fallback
45
- html.executable "false"
46
- html.cmd "echo \"<pre>\" && cat {{f}} && echo \"</pre>\""
47
- end
48
-
49
- EpubForge::Utils::Htmlizer.define do |html|
50
- html.format :txt
51
- html.group :fallback
52
- html.executable "false"
53
- html.cmd "echo \"<pre>\" && cat {{f}} && echo \"</pre>\""
54
- end
55
-
56
- # Would be nice to detect and strip out the outer tags
57
- # leaving only the content.
58
- EpubForge::Utils::Htmlizer.define do |html|
59
- html.format :html
60
- html.group :fallback
61
- html.executable "false"
62
- html.cmd "cat {{f}}"
63
- end
64
-
65
- EpubForge::Utils::Htmlizer.define do |html|
66
- html.format :unknown
67
- html.group :fallback
68
- html.executable "false"
69
- html.cmd "echo \"<pre>\" && cat {{f}} && echo \"</pre>\""
70
- end
@@ -1,45 +0,0 @@
1
- module EpubForge
2
- module Action
3
- class ActionsLookup
4
- attr_accessor :actions, :actions_directories, :keywords
5
-
6
- def initialize
7
- clear
8
- end
9
-
10
- def clear
11
- @keywords = {}
12
- @actions = []
13
- @actions_directories = []
14
- end
15
-
16
- def add_actions( *args )
17
- Utils::ActionLoader.load_me( *args )
18
-
19
- new_actions = Utils::ActionLoader.loaded_classes - @actions
20
- @actions += new_actions
21
- new_directories = Utils::ActionLoader.loaded_directories - @actions_directories
22
- @actions_directories += new_directories
23
-
24
- for action in new_actions
25
- for keyword in action.keywords
26
- @keywords[keyword] = action
27
- end
28
- end
29
- end
30
-
31
- # Find all the actions with keywords that start with the given string.
32
- # If this results in more than one action being found, the proper
33
- # response is to panic and flail arms.
34
- def keyword_to_action( keyword )
35
- exact_match = @keywords.keys.select{ |k| k == keyword }
36
-
37
- return [@keywords[exact_match.first]] if exact_match.length == 1
38
-
39
- # if no exact match can be found, find a partial match, at the beginning
40
- # of the keywords.
41
- @keywords.keys.select{ |k| k.match(/^#{keyword}/) }.map{ |k| @keywords[k] }.uniq
42
- end
43
- end
44
- end
45
- end
@@ -1,5 +0,0 @@
1
- class Array
2
- def epf_blank?
3
- length == 0
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class NilClass
2
- def epf_blank?
3
- true
4
- end
5
- end
@@ -1,5 +0,0 @@
1
- class Object
2
- def umethods( regex = /.*/ )
3
- (self.methods.sort - Object.new.methods).grep( regex )
4
- end
5
- end
@@ -1,8 +0,0 @@
1
- module EpubForge
2
- module Epub
3
- module Assets
4
- class HTML < Page
5
- end
6
- end
7
- end
8
- end
@@ -1,8 +0,0 @@
1
- module EpubForge
2
- module Epub
3
- module Assets
4
- class Markdown < Page
5
- end
6
- end
7
- end
8
- end
@@ -1,8 +0,0 @@
1
- module EpubForge
2
- module Epub
3
- module Assets
4
- class Textile < Page
5
- end
6
- end
7
- end
8
- end
@@ -1,8 +0,0 @@
1
- module EpubForge
2
- module Epub
3
- module Assets
4
- class XHTML < Page
5
- end
6
- end
7
- end
8
- end
data/lib/epub/packager.rb DELETED
@@ -1,16 +0,0 @@
1
- module EpubForge
2
- module Epub
3
- class Packager
4
- def initialize( src_dir, dst_filename )
5
- @src_dir = src_dir
6
- @dst_filename = dst_filename
7
- end
8
-
9
- def package
10
- @dst_filename = @dst_filename.expand
11
- FileUtils.rm( @dst_filename ) if @dst_filename.exist?
12
- `cd #{@src_dir} && zip -Xr #{@dst_filename.to_s.epf_backhashed_filename} mimetype META-INF OEBPS`
13
- end
14
- end
15
- end
16
- end