-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.kt
More file actions
64 lines (50 loc) · 1.47 KB
/
main.kt
File metadata and controls
64 lines (50 loc) · 1.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
import java.io.File
import java.io.FileNotFoundException
/**
* Git-Issue[179]: {
* Improve the whole Project-Strucutre
* >>
* - Prepare for mutli-user editing
* - Sync online Issue-Body to local body?
* - Let The GithubApiConnector run asynchronous and inform parser with replaysubject
* <<
* [improvement]
* }
*/
class App {
var path: String = ""
var parser: Parser = Parser()
companion object {
@JvmStatic fun main(args: Array<String>) {
App().run(args)
}
}
fun run(args: Array<String>) {
/**
* Git-Issue[180]: Enable Regex-Folder-Spec [improvement]
*/
if(args.isEmpty()){
println("No path specified! Taking root...")
path = "."
} else {
path = args[0]
}
if(args.contains("-r")){
parser.removeFromRemote = true
}
if(args.contains("-b")){
parser.skipParseErrors = false
}
try {
val config = File("config.ie")
val token = config.readLines().get(0)
println("UserToken "+token)
val start = System.currentTimeMillis()
parser.parseProject(File(path), token)
val end = System.currentTimeMillis()
println("\nRun-Time: "+end.minus(start)+" ms")
} catch (e: FileNotFoundException) {
println("config.ie not found! Please add 'config.ie' with your api-token in it")
}
}
}