module Asciidoctor::Diagram
Constants
- VERSION
Public Instance Methods
convert(source, format, options)
click to toggle source
# File lib/asciidoctor-diagram/blockdiag/converter.rb, line 16 def convert(source, format, options) # On Debian based systems the Python 3.x packages python3-(act|block|nw|seq)diag executables with # a '3' suffix. cmd_name = self.class.const_get(:TOOL) alt_cmd_name = "#{cmd_name}3" font_path = source.attr('fontpath') generate_stdin(source.find_command(cmd_name, :alt_cmds => [alt_cmd_name]), format.to_s, source.to_s) do |tool_path, output_path| args = [tool_path, '-a', '-o', Platform.native_path(output_path), "-T#{format.to_s}"] args << "-f#{Platform.native_path(font_path)}" if font_path args << '-' args end end
supported_formats()
click to toggle source
# File lib/asciidoctor-diagram/blockdiag/converter.rb, line 12 def supported_formats [:png, :pdf, :svg] end