aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--tool/probes_to_wiki.rb16
2 files changed, 21 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 97757187b4..42196547a2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
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