over.app.Option: add new source type (preset)

This commit is contained in:
Martin Sekera 2021-04-07 23:05:08 +02:00
parent 03ab783437
commit 852cce04b6
3 changed files with 9 additions and 5 deletions

View file

@ -107,6 +107,7 @@ class Option_sources(enum.Enum):
default = 1
config_file = 2
command_line = 3
preset = 4
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):
@ -446,6 +447,9 @@ class Main:
def info(self, *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):
self.print(*args, tag=self.print.tl.done, **kwargs)

View file

@ -319,7 +319,7 @@ class Output:
Formatting
==========
You can use all formatting characters supported by strftime, as well as:
<T> - tag
<@> - tag
<n> - name
<t> - supplied text
<i> - indentation start marker

View file

@ -2,7 +2,7 @@
# encoding: utf-8
major = 2 # VERSION_MAJOR_IDENTIFIER
minor = 2 # VERSION_MINOR_IDENTIFIER
# VERSION_LAST_MM 2.2
patch = 1 # VERSION_PATCH_IDENTIFIER
str = "2.2.1" # VERSION_STRING_IDENTIFIER
minor = 3 # VERSION_MINOR_IDENTIFIER
# VERSION_LAST_MM 2.3
patch = 0 # VERSION_PATCH_IDENTIFIER
str = "2.3.0" # VERSION_STRING_IDENTIFIER