January 13, 2017 Egbert Broerse (C) Updated May 2019 In cloc.pl, after line 5290 insert: 'shtml' => 'HTML' , to include our flavor of html. To prepare the local JMRI repo, do a 'cleanall' so we don't count the javadoc files. Open Terminal: cd to folder containing your JMRI repo Type the command: perl cloc.pl JMRI/java --csv --by-file --report-file=java.cloc (JMRI/java is the path to start analysing; java.cloc is the file name) See progress, ending in: [counting] 12546 text files. 11295 unique files. 3803 files ignored. Wrote java.cloc (note that in 2017 the java code contained 12,5k files, compared to 24k in 2019) Repeat for the following paths: JMRI (all, too large for the script?), JMRI/java, JMRI/xml and JMRI/help In a browser open http://www.redotheweb.com/CodeFlower/ Paste the contents of each of the files into field over [Convert] button. Select from the pop-up: (Origins: clog) Click [Convert] button Click [Update] button [Update date JMRI codeflower:] Copy JSON data from the Input Data Format field into a separate file named: jmri.json Copy this file to a new branch of JMRI/Website/Community/codeflower.js Follow the instructions on the page: To create a CodeFlower, include the CodeFlower.js file together with d3.js, just like in this page. Create a new CodeFlower instance using a CSS selector (of the div where the flower should be inserted), and the width and height of the desired visualization. Then, bind JSON data to the flower using CodeFlower.update(), and you're done. var myFlower = new CodeFlower("#visualization", 300, 200); myflower.update(jsonData); Credits:

Licence

All this work is open-source, published by François Zaninotto under the MIT license.

Page source essence:
Copy the mentioned scripts to the folder on your web server: - CodeFlower.js - d3.js

Licence

CodeFlower is open-source, published by François Zaninotto under the MIT license. That means that nothing prevents you from growing as many CodeFlowers as you want!

Fork me on GitHub Made some changes to CodeFlower.js to show the late code set of JMRI inside a reasonable square: line 19: .charge(function(d) { return d._children ? -d.size / 100 : -40; }) // change 100:-40 to 80:4 line 20: .linkDistance(function(d) { return d.target._children ? 80 : 25; }) // change 80:25 to 8:25 line 40: .gravity(Math.atan(total / 50) / Math.PI * 0.4) // line 72: .attr("r", function(d) { return d.children ? 3.5 : Math.pow(d.size, 2/5) || 1; }) // change 2/5 to 1/5 (or use .log for .pow?) !keep the same as line 66