~aleteoryx/tclircc

ref: 7fdaa9361e04b0445c322ca41537ede6fc8bda72 tclircc/src/main.tcl -rwxr-xr-x 587 bytes
7fdaa936Aleteoryx subcommand system 7 days ago
                                                                                
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
#!/bin/env tclsh

set version 0.0.1

set boot_dir [pwd]
cd [file dirname [dict get [info frame [info frame]] file]]

puts "boot_dir=$boot_dir"
puts "pwd=[pwd]"

source persist.tcl
source deps.tcl
source util.tcl

set log [logger::init tclircc::main]

source db.tcl
db::init_core $data_dir
source db/networks.tcl

source history.tcl
hist::open hist_db [file join $data_dir foo.db]
hist::ensure hist_db #foo

# cleanup every 6 hours, should be heuristic-driven eventually
db::autocleanup [expr {6 * 60 * 60 * 1000}]

source ui.tcl
wm withdraw .
toplevel .mainwin
ui::basic::setup .mainwin