summaryrefslogtreecommitdiffhomepage
path: root/doc/language/mrbdoc/mrbdoc.rb
blob: cd8ae3833c3b3889d84e33da5e05f8881cd5eab1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env ruby

$: << File.dirname(__FILE__) + '/lib'

require 'mrbdoc_analyze'
require 'mrbdoc_docu'

MRUBY_ROOT = ARGV[0]
DOC_ROOT = ARGV[1]

raise ArgumentError.new 'mruby root missing!' if MRUBY_ROOT.nil?
raise ArgumentError.new 'doc root missing!' if DOC_ROOT.nil?

mrbdoc = MRBDoc.new

mrbdoc.analyze_code MRUBY_ROOT do |progress|
  puts progress
end

mrbdoc.write_documentation DOC_ROOT do |progress|
  puts progress
end