docs(logs): Mimick argparse option default format
I find it more readable to use punctuation to separate technical information, such as required vs optional or default values, from narrative description. Follow argparse's lead, and put such information in parens following the narrative description.
This commit is contained in:
parent
28b5a81d19
commit
9808e93533
1 changed files with 11 additions and 10 deletions
|
|
@ -67,7 +67,7 @@ class PersistLogsValidator(StrictDictValidator):
|
||||||
@property
|
@property
|
||||||
def logs_directory(self) -> str:
|
def logs_directory(self) -> str:
|
||||||
"""
|
"""
|
||||||
Required. The directory to store the logs in.
|
The directory to store the logs in. (required)
|
||||||
"""
|
"""
|
||||||
return self._logs_directory.value
|
return self._logs_directory.value
|
||||||
|
|
||||||
|
|
@ -92,7 +92,7 @@ class PersistLogsValidator(StrictDictValidator):
|
||||||
@property
|
@property
|
||||||
def keep_successful_logs(self) -> bool:
|
def keep_successful_logs(self) -> bool:
|
||||||
"""
|
"""
|
||||||
Optional. Whether to store logs when downloading is successful. Defaults to True.
|
Whether to store logs when downloading is successful. (default ``True``)
|
||||||
"""
|
"""
|
||||||
return self._keep_successful_logs.value
|
return self._keep_successful_logs.value
|
||||||
|
|
||||||
|
|
@ -147,7 +147,7 @@ class ConfigOptions(StrictDictValidator):
|
||||||
def working_directory(self) -> str:
|
def working_directory(self) -> str:
|
||||||
"""
|
"""
|
||||||
The directory to temporarily store downloaded files before moving them into their final
|
The directory to temporarily store downloaded files before moving them into their final
|
||||||
directory. Defaults to .ytdl-sub-working-directory
|
directory. (default ``./.ytdl-sub-working-directory``)
|
||||||
"""
|
"""
|
||||||
# Expands tildas to actual paths, use native os sep
|
# Expands tildas to actual paths, use native os sep
|
||||||
return os.path.expanduser(self._working_directory.value.replace(posixpath.sep, os.sep))
|
return os.path.expanduser(self._working_directory.value.replace(posixpath.sep, os.sep))
|
||||||
|
|
@ -155,7 +155,7 @@ class ConfigOptions(StrictDictValidator):
|
||||||
@property
|
@property
|
||||||
def umask(self) -> Optional[str]:
|
def umask(self) -> Optional[str]:
|
||||||
"""
|
"""
|
||||||
Umask (octal format) to apply to every created file. Defaults to "022".
|
Umask in octal format to apply to every created file. (default ``022``)
|
||||||
"""
|
"""
|
||||||
return self._umask.value
|
return self._umask.value
|
||||||
|
|
||||||
|
|
@ -214,24 +214,25 @@ class ConfigOptions(StrictDictValidator):
|
||||||
def lock_directory(self) -> str:
|
def lock_directory(self) -> str:
|
||||||
"""
|
"""
|
||||||
The directory to temporarily store file locks, which prevents multiple instances
|
The directory to temporarily store file locks, which prevents multiple instances
|
||||||
of ``ytdl-sub`` from running. Note that file locks do not work on network-mounted
|
of ``ytdl-sub`` from running. Note that file locks do not work on
|
||||||
directories. Ensure that this directory resides on the host machine. Defaults to ``/tmp``.
|
network-mounted directories. Ensure that this directory resides on the host
|
||||||
|
machine. (default ``/tmp``)
|
||||||
"""
|
"""
|
||||||
return self._lock_directory.value
|
return self._lock_directory.value
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ffmpeg_path(self) -> str:
|
def ffmpeg_path(self) -> str:
|
||||||
"""
|
"""
|
||||||
Path to ffmpeg executable. Defaults to ``/usr/bin/ffmpeg`` for Linux, and
|
Path to ffmpeg executable. (default ``/usr/bin/ffmpeg`` for Linux,
|
||||||
``ffmpeg.exe`` for Windows (in the same directory as ytdl-sub).
|
``./ffmpeg.exe`` in the same directory as ytdl-sub for Windows)
|
||||||
"""
|
"""
|
||||||
return self._ffmpeg_path.value
|
return self._ffmpeg_path.value
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def ffprobe_path(self) -> str:
|
def ffprobe_path(self) -> str:
|
||||||
"""
|
"""
|
||||||
Path to ffprobe executable. Defaults to ``/usr/bin/ffprobe`` for Linux, and
|
Path to ffprobe executable. (default ``/usr/bin/ffprobe`` for Linux,
|
||||||
``ffprobe.exe`` for Windows (in the same directory as ytdl-sub).
|
``./ffprobe.exe`` in the same directory as ytdl-sub for Windows)
|
||||||
"""
|
"""
|
||||||
return self._ffprobe_path.value
|
return self._ffprobe_path.value
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue