diff options
Diffstat (limited to 'tool')
-rw-r--r-- | tool/probes_to_wiki.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tool/probes_to_wiki.rb b/tool/probes_to_wiki.rb new file mode 100644 index 0000000000..75b263aaaf --- /dev/null +++ b/tool/probes_to_wiki.rb @@ -0,0 +1,16 @@ +### +# Converts the probes.d file to redmine wiki format. Usage: +# +# ruby probes.d + +File.read(ARGV[0]).scan(/\/\*.*?\*\//m).grep(/ruby/).each do |comment| + comment.gsub!(/^(\/\*|[ ]*)|\*\/$/, '').strip! + puts + comment.each_line.each_with_index do |line, i| + if i == 0 + puts "=== #{line.chomp}" + else + puts line.gsub(/`([^`]*)`/, '(({\1}))') + end + end +end |