[前][次][番号順一覧][スレッド一覧]

ruby-changes:29855

From: tenderlove <ko1@a...>
Date: Thu, 11 Jul 2013 03:23:04 +0900 (JST)
Subject: [ruby-changes:29855] tenderlove:r41907 (trunk): * tool/probes_to_wiki.rb: adding a script to convert probes.d to wiki

tenderlove	2013-07-11 03:22:52 +0900 (Thu, 11 Jul 2013)

  New Revision: 41907

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=41907

  Log:
    * tool/probes_to_wiki.rb: adding a script to convert probes.d to wiki
      format for easy wiki updates.

  Added files:
    trunk/tool/probes_to_wiki.rb
  Modified files:
    trunk/ChangeLog

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 41906)
+++ ChangeLog	(revision 41907)
@@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1
+Thu Jul 11 03:22:10 2013  Aaron Patterson <aaron@t...>
+
+	* 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@z...>
 
 	* man/ri.1: Incorrect use of .Dd macro [Bug #8620] by Tristan Hill
Index: tool/probes_to_wiki.rb
===================================================================
--- tool/probes_to_wiki.rb	(revision 0)
+++ tool/probes_to_wiki.rb	(revision 41907)
@@ -0,0 +1,16 @@ https://github.com/ruby/ruby/blob/trunk/tool/probes_to_wiki.rb#L1
+###
+# 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

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]