mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* tool/probes_to_wiki.rb: adding a script to convert probes.d to wiki
format for easy wiki updates. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41907 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cd22445281
commit
4580394abb
2 changed files with 21 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
Thu Jul 11 03:22:10 2013 Aaron Patterson <aaron@tenderlovemaking.com>
|
||||
|
||||
* tool/probes_to_wiki.rb: adding a script to convert probes.d to wiki
|
||||
format for easy wiki updates.
|
||||
|
||||
Thu Jul 11 00:54:07 2013 Zachary Scott <zachary@zacharyscott.net>
|
||||
|
||||
* man/ri.1: Incorrect use of .Dd macro [Bug #8620] by Tristan Hill
|
||||
|
|
16
tool/probes_to_wiki.rb
Normal file
16
tool/probes_to_wiki.rb
Normal file
|
@ -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
|
Loading…
Reference in a new issue