mirror of
https://github.com/elastic/logstash.git
synced 2025-04-25 15:17:52 -04:00
21 lines
566 B
Ruby
21 lines
566 B
Ruby
#!/usr/bin/env ruby
|
|
|
|
require "erb"
|
|
|
|
if ARGV.size != 1
|
|
$stderr.puts "No path given to search for plugin docs"
|
|
$stderr.puts "Usage: #{$0} plugin_doc_dir"
|
|
exit 1
|
|
end
|
|
|
|
basedir = ARGV[0]
|
|
docs = {
|
|
"inputs" => Dir.glob(File.join(basedir, "inputs/*.markdown")),
|
|
"filters" => Dir.glob(File.join(basedir, "filters/*.markdown")),
|
|
"outputs" => Dir.glob(File.join(basedir, "outputs/*.markdown")),
|
|
}
|
|
|
|
template_path = File.join(File.dirname(__FILE__), "index.html.erb")
|
|
template = File.new(template_path).read
|
|
erb = ERB.new(template, nil, "-")
|
|
puts erb.result(binding)
|