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