A simple gem to merge different asciidoc files into 1 big file. It also copies all images into a folder along the merged file.
- Install the gem
gem install asciidoc-merger
- Create a new instance and provide your main file
require 'asciidoc-merger'
asciidoc_parser = AsciiDocMerger::Parser.new
asciidoc_parser.file = "/path/to/my/file.asciidoc"
asciidoc_parser.merge!
- Ignore non existing images:
asciidoc_parser.ignore_non_existing_images = true
- Set the output folder
asciidoc_parser.output_folder = "/path/to/folder/"
- Set the file name of the merged file
asciidoc_parser.merged_file_name = "my_awesome_filename.asciidoc"