File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'rexml/document'
4
+
5
+ xmlInput = File . read ( "manifest.xml" )
6
+
7
+ doc , categories = REXML ::Document . new ( xmlInput ) , [ ]
8
+
9
+ # parse list of categories
10
+ doc . elements . each ( "content/categories/category" ) do |e |
11
+ c = { :ref => e . attributes [ "ref" ] , :title => e . attributes [ "title" ] , :tutorials => [ ] }
12
+ e . elements . each ( "tutorials/tutorial" ) do |t |
13
+ c [ :tutorials ] << t . text
14
+ end
15
+ categories << c
16
+ end
17
+
18
+ # print csv for each category
19
+ rows_per_tutorial = 3
20
+ categories . each do |c |
21
+ puts c [ :title ]
22
+ puts "Tutorial name\t Assigned to\t Issues\t Solution\t Approved?\t \O S / Build type"
23
+ c [ :tutorials ] . each do |t |
24
+ rows_per_tutorial . times do
25
+ puts "=HYPERLINK(\" http://gazebosim.org/tutorials?tut=#{ t } &cat=#{ c [ :ref ] } \" ,\" #{ t } \" )"
26
+ end
27
+ end
28
+ end
You can’t perform that action at this time.
0 commit comments