use output mode from stdin
This commit is contained in:
parent
38867347fb
commit
92507add43
@ -9,6 +9,7 @@ specially when the day_start time is in the night.
|
|||||||
import datetime
|
import datetime
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
from importlib import import_module
|
||||||
|
|
||||||
import time_machine
|
import time_machine
|
||||||
|
|
||||||
@ -22,14 +23,19 @@ sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
|
|||||||
# set time zone
|
# set time zone
|
||||||
_TZ = ZoneInfo("Europe/Berlin")
|
_TZ = ZoneInfo("Europe/Berlin")
|
||||||
# fake date and time
|
# fake date and time
|
||||||
SOURCE_TIME = [2021, 2, 14, 23, 59, 0]
|
SOURCE_TIME = [2021, 6, 24, 23, 57, 30]
|
||||||
|
|
||||||
|
|
||||||
@time_machine.travel(datetime.datetime(*SOURCE_TIME, tzinfo=_TZ))
|
@time_machine.travel(datetime.datetime(*SOURCE_TIME, tzinfo=_TZ))
|
||||||
def run_in_time_machine():
|
def run_in_time_machine():
|
||||||
desktop.output()
|
if stdin_args.mode:
|
||||||
|
output = import_module(f'ffplayout.output.{stdin_args.mode}').output
|
||||||
|
output()
|
||||||
|
else:
|
||||||
|
desktop.output()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
from ffplayout.output import desktop
|
from ffplayout.output import desktop
|
||||||
|
from ffplayout.utils import stdin_args
|
||||||
run_in_time_machine()
|
run_in_time_machine()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user