From acaae142b83b810e2ff67d5ece4fb9ce85a464bb Mon Sep 17 00:00:00 2001 From: aleteoryx Date: Sun, 10 Nov 2024 16:49:39 -0500 Subject: [PATCH] prep for docs --- cap.tcl => src/cap.tcl | 0 {db => src/db}/main.tcl | 0 irc.tcl => src/irc.tcl | 0 {irc => src/irc}/main.tcl | 0 main.tcl => src/main.tcl | 12 ++++++++---- migrate_core.tcl => src/migrate_core.tcl | 0 plugins.tcl => src/plugins.tcl | 0 {spdx => src/spdx}/dump.tcldict.gz | Bin {spdx => src/spdx}/gen.tcl | 0 {spdx => src/spdx}/lib.tcl | 0 threads.tcl => src/threads.tcl | 0 {ui => src/ui}/main.tcl | 0 12 files changed, 8 insertions(+), 4 deletions(-) rename cap.tcl => src/cap.tcl (100%) rename {db => src/db}/main.tcl (100%) rename irc.tcl => src/irc.tcl (100%) rename {irc => src/irc}/main.tcl (100%) rename main.tcl => src/main.tcl (87%) rename migrate_core.tcl => src/migrate_core.tcl (100%) rename plugins.tcl => src/plugins.tcl (100%) rename {spdx => src/spdx}/dump.tcldict.gz (100%) rename {spdx => src/spdx}/gen.tcl (100%) rename {spdx => src/spdx}/lib.tcl (100%) rename threads.tcl => src/threads.tcl (100%) rename {ui => src/ui}/main.tcl (100%) diff --git a/cap.tcl b/src/cap.tcl similarity index 100% rename from cap.tcl rename to src/cap.tcl diff --git a/db/main.tcl b/src/db/main.tcl similarity index 100% rename from db/main.tcl rename to src/db/main.tcl diff --git a/irc.tcl b/src/irc.tcl similarity index 100% rename from irc.tcl rename to src/irc.tcl diff --git a/irc/main.tcl b/src/irc/main.tcl similarity index 100% rename from irc/main.tcl rename to src/irc/main.tcl diff --git a/main.tcl b/src/main.tcl similarity index 87% rename from main.tcl rename to src/main.tcl index 1f8b22a..174615b 100755 --- a/main.tcl +++ b/src/main.tcl @@ -2,6 +2,10 @@ set path [file dirname [dict get [info frame 0] file]] set version v0.0.1 +proc src {file} { + global path + uplevel [list source [file join $path $file]] +} package require Thread thread::id; # avoid use-after-free @@ -12,7 +16,7 @@ package require sqlite3 ${log}::info "tclircc $version " ${log}::info "running from $path" -source threads.tcl +src threads.tcl proc on_threads_update {} { puts "threads updated!" @@ -43,14 +47,14 @@ start_thread db thread::send [t::ns tclircc::db] {path_to_core} core_db_path sqlite3 core_db $core_db_path -create true -fullmutex true -source migrate_core.tcl +src migrate_core.tcl -source plugins.tcl +src plugins.tcl start_thread irc start_thread ui -plugins::load [file join $path testplugin] +plugins::load [file join $path .. testplugin] ${log}::debug "opening initial window..." t::exec tclircc::ui { diff --git a/migrate_core.tcl b/src/migrate_core.tcl similarity index 100% rename from migrate_core.tcl rename to src/migrate_core.tcl diff --git a/plugins.tcl b/src/plugins.tcl similarity index 100% rename from plugins.tcl rename to src/plugins.tcl diff --git a/spdx/dump.tcldict.gz b/src/spdx/dump.tcldict.gz similarity index 100% rename from spdx/dump.tcldict.gz rename to src/spdx/dump.tcldict.gz diff --git a/spdx/gen.tcl b/src/spdx/gen.tcl similarity index 100% rename from spdx/gen.tcl rename to src/spdx/gen.tcl diff --git a/spdx/lib.tcl b/src/spdx/lib.tcl similarity index 100% rename from spdx/lib.tcl rename to src/spdx/lib.tcl diff --git a/threads.tcl b/src/threads.tcl similarity index 100% rename from threads.tcl rename to src/threads.tcl diff --git a/ui/main.tcl b/src/ui/main.tcl similarity index 100% rename from ui/main.tcl rename to src/ui/main.tcl -- 2.45.2