]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Project] Move rspamadm libraries to a standard place
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 24 May 2018 13:13:32 +0000 (14:13 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 24 May 2018 18:56:05 +0000 (19:56 +0100)
lualib/ansicolors.lua [moved from lualib/rspamadm/ansicolors.lua with 100% similarity]
lualib/getopt.lua [moved from lualib/rspamadm/getopt.lua with 100% similarity]
lualib/plugins_stats.lua [moved from lualib/rspamadm/plugins_stats.lua with 100% similarity]
lualib/rescore_utility.lua [moved from lualib/rspamadm/rescore_utility.lua with 100% similarity]
lualib/rspamadm/confighelp.lua
lualib/rspamadm/configwizard.lua
lualib/rspamadm/corpus_test.lua
lualib/rspamadm/rescore.lua

similarity index 100%
rename from lualib/rspamadm/getopt.lua
rename to lualib/getopt.lua
index a03578b6ec66101108ee47e10037a279819520c8..8f0fd2b7d1e8e4e8ad4906dfd01a748cad593340 100644 (file)
@@ -7,8 +7,8 @@ local known_attrs = {
   default = 1,
 }
 
-local getopt = require "rspamadm/getopt"
-local ansicolors = require "rspamadm/ansicolors"
+local getopt = require "getopt"
+local ansicolors = require "ansicolors"
 
 local function maybe_print_color(key)
   if not opts['no-color'] then
index 1cd275f66cd6872b8b33013eecdb2f0e4b900740..542b61552c6ec857b8fd4f34807b62e551c8a7b4 100644 (file)
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
 limitations under the License.
 ]]--
 
-local ansicolors = require "rspamadm/ansicolors"
+local ansicolors = require "ansicolors"
 local local_conf = rspamd_paths['CONFDIR']
 local rspamd_util = require "rspamd_util"
 local rspamd_logger = require "rspamd_logger"
@@ -23,7 +23,7 @@ local lua_stat_tools = require "lua_stat"
 local lua_redis = require "lua_redis"
 local ucl = require "ucl"
 
-local plugins_stat = require "rspamadm/plugins_stats"
+local plugins_stat = require "plugins_stats"
 
 local rspamd_logo = [[
   ____                                     _
index cd9f66155cbe05b2642c83d80eb0e0f94ec068e4..71d1eeaf124810c8596a4a9fa1e5f474bf634e26 100644 (file)
@@ -1,7 +1,7 @@
 local rspamd_logger = require "rspamd_logger"
 local ucl = require "ucl"
 local lua_util = require "lua_util"
-local getopt = require "rspamadm/getopt"
+local getopt = require "getopt"
 
 local HAM = "HAM"
 local SPAM = "SPAM"
index 231cf2ea6682449560b321cf6a2e2cd028bdeaeb..e6df3b36408044e86ff2d9693053ab3123a3fa3b 100644 (file)
@@ -3,11 +3,11 @@ local nn = require "nn"
 local lua_util = require "lua_util"
 local ucl = require "ucl"
 local logger = require "rspamd_logger"
-local getopt = require "rspamadm/getopt"
+local getopt = require "getopt"
 local optim = require "optim"
 local rspamd_util = require "rspamd_util"
 
-local rescore_utility = require "rspamadm/rescore_utility"
+local rescore_utility = require "rescore_utility"
 
 local opts
 local ignore_symbols = {
@@ -473,8 +473,8 @@ return function (args, cfg)
                      "NAME", "HITS", "HAM", "HAM%", "SPAM", "SPAM%", "S/O", "OVER%"))
       for _, symbol_stats in pairs(t) do
           logger.message(
-              string.format("%-40s %6d %6d %6.2f %6d %6.2f %6.2f %6.2f", 
-                  symbol_stats.name, 
+              string.format("%-40s %6d %6d %6.2f %6d %6.2f %6.2f %6.2f",
+                  symbol_stats.name,
                   symbol_stats.no_of_hits,
                   symbol_stats.ham_hits,
                   lua_util.round(symbol_stats.ham_percent,2),
@@ -503,7 +503,7 @@ return function (args, cfg)
           -- Calculate percentage of rules with no hits
           local nhpct = lua_util.round((#symbols_no_hits/total_symbols)*100,2)
           logger.message(
-              string.format('\nFound %s (%-.2f%%) symbols out of %s with no hits in corpus:', 
+              string.format('\nFound %s (%-.2f%%) symbols out of %s with no hits in corpus:',
                             #symbols_no_hits, nhpct, total_symbols
               )
           )