You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
809 B
Kotlin
31 lines
809 B
Kotlin
package moe.odango.index
|
|
|
|
import com.github.ajalt.clikt.core.CliktCommand
|
|
import com.github.ajalt.clikt.core.subcommands
|
|
import com.github.ajalt.clikt.parameters.options.option
|
|
import moe.odango.index.cli.*
|
|
import org.kodein.di.instance
|
|
|
|
fun main(args: Array<String>) {
|
|
object : CliktCommand() {
|
|
val config: String? by option()
|
|
|
|
init {
|
|
subcommands(
|
|
AniDBSync(),
|
|
DatabaseMigration(),
|
|
MyAnimeListListingSync(),
|
|
MyAnimeListPageSync(),
|
|
HTTPServer(),
|
|
ElasticIndex()
|
|
)
|
|
}
|
|
|
|
override fun run() {
|
|
val configFile by di.instance<MutableList<String>>("config-file")
|
|
config?.let { configFile.add(0, it) }
|
|
}
|
|
}
|
|
.main(args)
|
|
}
|