@@ -13,12 +13,11 @@ import net.steppschuh.markdowngenerator.table.Table
13
13
import net .steppschuh .markdowngenerator .table .Table .Builder
14
14
15
15
object Ubidoc {
16
- private val fileNameSuffix : String = " UbiquitousLanguage"
17
16
private val fileNameExtension : String = " .md"
18
17
private val scaladocFileNameRegex = " [A-Z].*\\ .html"
19
18
20
- def apply (sourceDir : JFile , targetDir : JFile , htmlTags : Seq [String ], tableHeaders : Seq [String ]): Unit =
21
- Internals .ubiquitousScaladocTask(sourceDir, targetDir, htmlTags, tableHeaders)
19
+ def apply (sourceDir : JFile , targetDir : JFile , htmlTags : Seq [String ], tableHeaders : Seq [String ], fileNameSuffix : String ): Unit =
20
+ Internals .ubiquitousScaladocTask(sourceDir, targetDir, htmlTags, tableHeaders, fileNameSuffix )
22
21
23
22
private object Internals {
24
23
@@ -27,13 +26,14 @@ object Ubidoc {
27
26
targetDir : JFile ,
28
27
htmlTags : Seq [String ],
29
28
tableHeaders : Seq [String ],
29
+ fileNameSuffix : String ,
30
30
): Unit = {
31
31
if (htmlTags.length != tableHeaders.length)
32
32
throw new IllegalArgumentException (" htmlTags and tableHeaders must have the same number of elements" )
33
33
for {
34
34
dir <- directoriesFromDir(sourceDir.toScala)
35
35
rows = rowsFromFiles(dir, htmlTags)
36
- } generateMarkdownFile(dir.name, rows, targetDir.toScala, tableHeaders)
36
+ } generateMarkdownFile(dir.name, rows, targetDir.toScala, tableHeaders, fileNameSuffix )
37
37
}
38
38
39
39
def directoriesFromDir (sourceDir : File ): Iterator [File ] = ls(sourceDir) filter (_.isDirectory)
@@ -59,6 +59,7 @@ object Ubidoc {
59
59
rows : Iterator [Seq [String ]],
60
60
targetDir : File ,
61
61
tableHeaders : Seq [String ],
62
+ fileNameSuffix : String ,
62
63
): Unit = {
63
64
val table = addConceptsToTable(rows, tableHeaders)
64
65
val file = targetDir / s " $dirName$fileNameSuffix$fileNameExtension"
0 commit comments