Output order into separate dict file
This commit is contained in:
parent
432ee4d045
commit
49df752ef8
@ -44,6 +44,8 @@ fun main(vararg args: String) {
|
||||
entry.deleteIfExists()
|
||||
}
|
||||
|
||||
FileOutputStream(File(output, "dict.sql")).bufferedWriter().use { dict ->
|
||||
|
||||
parsed.entries.forEachIndexed { index, (text, type) ->
|
||||
println("Writing ${type.fileName}")
|
||||
val outputFile = File(output, type.fileName)
|
||||
@ -52,8 +54,11 @@ fun main(vararg args: String) {
|
||||
throw IllegalArgumentException("File already exists $outputFile")
|
||||
}
|
||||
|
||||
dict.write("-- ${type.fileName}\n")
|
||||
|
||||
FileOutputStream(outputFile).bufferedWriter().use {
|
||||
it.write("-- Order $index\n" + text.trim())
|
||||
it.write(text.trim())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user