over.app.Option: add new source type (preset)
This commit is contained in:
parent
03ab783437
commit
852cce04b6
3 changed files with 9 additions and 5 deletions
|
@ -107,6 +107,7 @@ class Option_sources(enum.Enum):
|
||||||
default = 1
|
default = 1
|
||||||
config_file = 2
|
config_file = 2
|
||||||
command_line = 3
|
command_line = 3
|
||||||
|
preset = 4
|
||||||
|
|
||||||
class Option:
|
class Option:
|
||||||
def __init__(self, name, description, callback, default=Option_sources.none, count=0, overwrite=True, abbr=None, in_cfg_file=True, in_help=True, is_boolean=None):
|
def __init__(self, name, description, callback, default=Option_sources.none, count=0, overwrite=True, abbr=None, in_cfg_file=True, in_help=True, is_boolean=None):
|
||||||
|
@ -446,6 +447,9 @@ class Main:
|
||||||
def info(self, *args, **kwargs):
|
def info(self, *args, **kwargs):
|
||||||
self.print(*args, **kwargs)
|
self.print(*args, **kwargs)
|
||||||
|
|
||||||
|
def start(self, *args, **kwargs):
|
||||||
|
self.print(*args, tag=self.print.tl.start, **kwargs)
|
||||||
|
|
||||||
def done(self, *args, **kwargs):
|
def done(self, *args, **kwargs):
|
||||||
self.print(*args, tag=self.print.tl.done, **kwargs)
|
self.print(*args, tag=self.print.tl.done, **kwargs)
|
||||||
|
|
||||||
|
|
|
@ -319,7 +319,7 @@ class Output:
|
||||||
Formatting
|
Formatting
|
||||||
==========
|
==========
|
||||||
You can use all formatting characters supported by strftime, as well as:
|
You can use all formatting characters supported by strftime, as well as:
|
||||||
<T> - tag
|
<@> - tag
|
||||||
<n> - name
|
<n> - name
|
||||||
<t> - supplied text
|
<t> - supplied text
|
||||||
<i> - indentation start marker
|
<i> - indentation start marker
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# encoding: utf-8
|
# encoding: utf-8
|
||||||
|
|
||||||
major = 2 # VERSION_MAJOR_IDENTIFIER
|
major = 2 # VERSION_MAJOR_IDENTIFIER
|
||||||
minor = 2 # VERSION_MINOR_IDENTIFIER
|
minor = 3 # VERSION_MINOR_IDENTIFIER
|
||||||
# VERSION_LAST_MM 2.2
|
# VERSION_LAST_MM 2.3
|
||||||
patch = 1 # VERSION_PATCH_IDENTIFIER
|
patch = 0 # VERSION_PATCH_IDENTIFIER
|
||||||
str = "2.2.1" # VERSION_STRING_IDENTIFIER
|
str = "2.3.0" # VERSION_STRING_IDENTIFIER
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue