This plugin handles utility functions
usage: #bp.utils.api [-h] [api]
list functions in the api
positional arguments:
api api to get details of
optional arguments:
-h, --help show help (default: False)
usage: #bp.utils.help [-a] [-c] [-h]
show help info for this plugin
optional arguments:
-a, --api show functions this plugin has in the api (default: False)
-c, --commands show commands in this plugin (default: False)
-h, --help show help (default: False)
usage: #bp.utils.inspect [-m METHOD] [-o OBJECT] [-s] [-h]
inspect a plugin
optional arguments:
-m METHOD, --method METHOD
get code for a method
-o OBJECT, --object OBJECT
show an object of the plugin, can be method or
variable
-s, --simple show a simple output (default: False)
-h, --help show help (default: False)
usage: #bp.utils.reset [-h]
reset the plugin
optional arguments:
-h, --help show help (default: False)
usage: #bp.utils.save [-h]
save the plugin state
optional arguments:
-h, --help show help (default: False)
usage: #bp.utils.set [-h] [name] [value]
change a setting in the plugin
if there are no arguments or 'list' is the first argument then
it will list the settings for the plugin
positional arguments:
name the setting name (default: list)
value the new value of the setting
optional arguments:
-h, --help show help (default: False)
usage: #bp.utils.stats [-h]
show plugin stats
optional arguments:
-h, --help show help (default: False)
utils.readablenumber(num, places=2)
convert a number to a shorter readable number
original defined in plugins/core/utils.py
utils.center(tstr, fillerc, length)
center a string with color codes
original defined in plugins/core/utils.py
utils.secondstodhms(sseconds)
convert seconds to years, days, hours, mins, secs
original defined in plugins/core/utils.py
utils.funccallerplugin()
check to see if the caller is a plugin, if so return the plugin object
this is so plugins can figure out who gave them data and keep up with it.
original defined in plugins/core/utils.py
utils.formattime(length, nosec=False)
format a length of time into a string
original defined in plugins/core/utils.py
utils.timelengthtosecs(timel)
converts a time length to seconds
Format is 1d:2h:30m:40s, any part can be missing
original defined in plugins/core/utils.py
utils.verify(val, vtype)
verify values
original defined in plugins/core/utils.py
utils.checklistformatch(arg, tlist)
check a list for a match of arg
original defined in plugins/core/utils.py
utils.timedeltatostring(stime, etime, fmin=False, colorn='', )
take two times and return a string of the difference
in the form ##d:##h:##m:##s
original defined in plugins/core/utils.py