class JupyterToScrapbox::CLI

Public Instance Methods

convert(*paths) click to toggle source
# File lib/cli.rb, line 19
def convert(*paths)
  JupyterToScrapbox::Converter.set_verbose(options[:verbose])
  JupyterToScrapbox::Converter.set_register_images(options[:image])
  JupyterToScrapbox::Converter.set_parse_markdown(options[:markdown])
  JupyterToScrapbox::Converter.set_num_asterisks(options[:asterisks])

  if paths.length > 0
    paths.each do |path|
      JupyterToScrapbox::Converter.add(path)
    end
  else
    while path=$stdin.gets
      JupyterToScrapbox::Converter.add(path.chomp)
    end
  end
  JupyterToScrapbox::Converter.perform()
end
version() click to toggle source
# File lib/cli.rb, line 38
def version
  p JupyterToScrapbox::VERSION
end