Skip to content

Commit

Permalink
add simple markdown report
Browse files Browse the repository at this point in the history
  • Loading branch information
UrsZeidler committed Apr 15, 2024
1 parent 8b01567 commit 7323c6e
Show file tree
Hide file tree
Showing 6 changed files with 837 additions and 0 deletions.
14 changes: 14 additions & 0 deletions de.urszeidler.shr5.acceleo/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@
class="de.urszeidler.eclipse.shr5Management.CharacterGroup">
</TransformerMapping>
</Transformer>
<Transformer
acceleoGenerator="de.urszeidler.shr5.acceleo.sheets.MarkdownCharacterSheet"
description="markdown character report"
dialogImage="images/textTransformations.png"
name="chracter report in markdown">
<TransformerMapping
class="de.urszeidler.eclipse.shr5Management.NonPlayerCharacter"></TransformerMapping>
<TransformerMapping
class="de.urszeidler.eclipse.shr5Management.PlayerCharacter">
</TransformerMapping>
<TransformerMapping
class="de.urszeidler.eclipse.shr5Management.CharacterGroup">
</TransformerMapping>
</Transformer>
<Transformer
acceleoGenerator="de.urszeidler.shr5.acceleo.sheets.BoardShr5GeneratorSheet"
description="%Transformer.bbgeneratorsheet.description"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[comment encoding = UTF-8 /]
[**
* The documentation of the module.
*/]
[module ShadowrunMarkdownSheetTools('http://urszeidler.de/shr5/1.0', 'http://urszeidler.de/shr5mngt/1.0', 'http://www.eclipse.org/emf/2002/Ecore')/]

[query public titelText(txt : String, heading : String) : String = heading+' '+self /]
[query public titelText(txt : String) : String = self.titelText('###') /]

[query public boldText(txt : String) : String = self.tagText('**') /]
[query public italicText(txt : String) : String = self.tagText('*') /]
[query public underlineText(txt : String) : String = self.tagText('u') /]
[query public tagText(txt : String,tag : String) : String = tag +self+tag /]
[query public quoteText(txt : String) : String = '> ' +self /]

[query public startTag(txt : String,) : String = '['+ self + ']' /]
[query public endTag(txt : String,) : String = '[/'+ self + ']' /]

[query public cellText(txt : String) : String = self.tagText('td') /]
[query public tableRow(row : Sequence(OclAny)) : String = (self->collect(e| (e.toString()).cellText())+'').tagText('tr') /]

[query public table(txt : String) : String = self.tagText('table') /]
[query public tableHeading(txt : String) : String = self.tagText('th') /]


[**
* Prints a row in the table
*/]
[template public printRow(row : Sequence(String))]
[startTag('tr')/][for (it : String | row)]
[startTag('td')/][it/][endTag('td')/][/for][endTag('tr')/]
[/template]


Loading

0 comments on commit 7323c6e

Please sign in to comment.