<commit_before>"
A RTHTMLExporterExample is the example class for RTHTMLExporter
"
Class {
	#name : #RTHTMLExporterExample,
	#superclass : #RTObject,
	#category : #'Roassal2-Exporter-HTML'
}

{ #category : #example }
RTHTMLExporterExample >> exampleDependencyAnalyzerBuilder [
	
	"self new exampleDependencyAnalyzerBuilder"

	| b |	
	b := RTDependencyAnalyzerBuilder new. 
	b shape circle
				size: [ :cls | cls numberOfMethods max: 5 ];
				fillColor: (Color red alpha: 0.3);
				if: [ :cls | ('TR*' match: cls name)  ] fillColor: (Color purple alpha: 0.3).
	b addClasses: RTObject withAllSubclasses.
	b addClasses: TRObject withAllSubclasses.
	b 
		dependencyFromAllClassesMatching: [ :cls | ('RT*' match: cls name) ] 
		toAllClassesMatching: [ :cls | ('TR*' match: cls name) ].

	b open.
	"This line does the export"
	RTHTMLExporter exportBuilderAsHTML: b title: 'Roassal and Trachel'
]

{ #category : #example }
RTHTMLExporterExample >> exampleMapBuilder [

	"self new exampleMapBuilder"

	| b countries cn |	
	b := RTMapBuilder new.	
		
	countries := RTMapBuilder countriesPopulation select: [ :c | RTSVGPath countries includes: (c at: 1) ].
	
	cn := RTNColorLinearNormalizer
		inContext: (countries collect: [:c | c at: 2])
		lowColor: (Color r:0.8 g:0.8 b:1)<commit_msg>0.129 : improved a bit the example of the HTMLExporter<commit_after>"
A RTHTMLExporterExample is the example class for RTHTMLExporter
"
Class {
	#name : #RTHTMLExporterExample,
	#superclass : #RTObject,
	#category : #'Roassal2-Exporter-HTML'
}

{ #category : #example }
RTHTMLExporterExample >> exampleDependencyAnalyzerBuilder [
	
	"self new exampleDependencyAnalyzerBuilder"

	| b exporter |	
	b := RTDependencyAnalyzerBuilder new. 
	b shape circle
				size: [ :cls | cls numberOfMethods max: 5 ];
				fillColor: (Color red alpha: 0.3);
				if: [ :cls | ('TR*' match: cls name)  ] fillColor: (Color purple alpha: 0.3).
	b addClasses: RTObject withAllSubclasses.
	b addClasses: TRObject withAllSubclasses.
	b 
		dependencyFromAllClassesMatching: [ :cls | ('RT*' match: cls name) ] 
		toAllClassesMatching: [ :cls | ('TR*' match: cls name) ].

	b open.
	
	"This line does the export"
	exporter := RTHTMLExporter new builder: b filename: 'Dependencies' title: 'Dependencies between Roassal2 and Trachel'; yourself.
	RTHTMLHightlight on: exporter color: Color blue targets: TREllipseShape.
	RTHTMLTextPopup on: exporter text:#name color: Color white size: 15 targets: TREllipseShape.
	exporter exportToFile.  
	
]

{ #category : #example }
RTHTMLExporterExample >> exampleMapBuilder [

	"self new exampleMapBuilder"

	| b countries cn |	
	b := RTMapBuilder new.	
		
	countries := RTMapBuilder countriesPopulation select: [ :c | RTSVGPath countries includes: (c at: 1) ].
	
	cn := RTNColorLinearNormalizer
		inContext: (countries collect: [:c | c at: 2])
		lowColor: (Color r:0.8 g:0.8 b:1)
{'fraction_non_alphanumeric': 0.11068435754189944, 'fraction_numerical': 0.011522346368715084, 'mean_word_length': 4.426136363636363, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3737974', 'n_tokens_mistral': 1054, 'n_tokens_neox': 985, 'n_words': 286}