mirror of
https://github.com/master-of-zen/Av1an.git
synced 2024-11-25 02:29:40 +00:00
better doc strings
This commit is contained in:
parent
37577864f5
commit
2cec9794cf
1 changed files with 5 additions and 5 deletions
10
av1an.py
10
av1an.py
|
@ -29,9 +29,8 @@ if sys.version_info < (3, 7):
|
|||
class Av1an:
|
||||
|
||||
def __init__(self):
|
||||
"""
|
||||
Av1an - AV1 wrapper for AV1 encoders
|
||||
"""
|
||||
"""Av1an - AV1 wrapper for AV1 encoders"""
|
||||
|
||||
self.temp_dir = Path('.temp')
|
||||
|
||||
self.FFMPEG = 'ffmpeg -y -hide_banner -loglevel error'
|
||||
|
@ -52,10 +51,12 @@ class Av1an:
|
|||
self.skip_scenes = False
|
||||
|
||||
def log(self, info):
|
||||
"""Default logging function, write to file"""
|
||||
with open(self.logging, 'a') as log:
|
||||
log.write(time.strftime('%X') + ' ' + info)
|
||||
|
||||
def call_cmd(self, cmd, capture_output=False):
|
||||
"""Calling system shell, if capture_ouput=True output string will be returned"""
|
||||
if capture_output:
|
||||
return subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT).stdout
|
||||
|
||||
|
@ -63,8 +64,7 @@ class Av1an:
|
|||
subprocess.run(cmd, shell=True, stdout=log, stderr=log)
|
||||
|
||||
def arg_parsing(self):
|
||||
|
||||
# Command line parse and assigning defined and user defined params
|
||||
"""Command line parse and assigning defined and user defined params"""
|
||||
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--mode', '-m', type=int, default=self.mode, help='Mode 0 - video, Mode 1 - image')
|
||||
|
|
Loading…
Reference in a new issue