Skip to content

Commit

Permalink
docs: fix some docstring and rename and move files
Browse files Browse the repository at this point in the history
  • Loading branch information
mdsanima committed Feb 25, 2022
1 parent b10e65f commit be1eaeb
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 21 deletions.
36 changes: 36 additions & 0 deletions docs/source/console/shell-converts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# Shell `converts`

Converting directly in shell console script on the command line.

```{important}
This command line options are a wrapper on existing functions and returning
the same value on calling selected convert method for the appropriate option,
both shell command line script and python module.
- Python Function
[``frames_to_timecode``](../modules/converts.html#function-frames-to-timecode)
→ Console Script
[``frames-to-timecode``](#converts-frames-to-timecode)
Command Line.
- Python Function
[``timecode_to_frames``](../modules/converts.html#function-timecode-to-frames)
→ Console Script
[``timecode-to-frames``](#converts-timecode-to-frames)
Command Line.
```

## Command `mdsanima-dev-converts`

Choose converts options which you want to use.

### Converts `frames-to-timecode`

```{eval-rst}
.. autofunction:: mdsanima_dev.utils.converts.shell_frames_to_timecode
```

### Converts `timecode-to-frames`

```{eval-rst}
.. autofunction:: mdsanima_dev.utils.converts.shell_timecode_to_frames
```
17 changes: 0 additions & 17 deletions docs/source/module_converts.md

This file was deleted.

17 changes: 17 additions & 0 deletions docs/source/modules/converts.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Module `converts`

```{eval-rst}
.. automodule:: mdsanima_dev.utils.converts
```

## Function `frames_to_timecode`

```{eval-rst}
.. autofunction:: mdsanima_dev.utils.converts.frames_to_timecode
```

## Function `timecode_to_frames`

```{eval-rst}
.. autofunction:: mdsanima_dev.utils.converts.timecode_to_frames
```
8 changes: 4 additions & 4 deletions src/mdsanima_dev/utils/converts.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def frames_to_timecode(frames: int, fps: float) -> str:
:class: note
Shell console script
`mdsanima-dev-converts <#command-mdsanima-dev-converts>`_ converting
`mdsanima-dev-converts <../console/shell-converts.html#converts-frames-to-timecode>`_ converting
directly on the command line.
"""
# assigning a function to a variable setup seconds
Expand Down Expand Up @@ -118,7 +118,7 @@ def timecode_to_frames(timecode: str, fps: float) -> int:
:class: note
Shell console script
`mdsanima-dev-converts <#command-mdsanima-dev-converts>`_ converting
`mdsanima-dev-converts <../console/shell-converts.html#converts-timecode-to-frames>`_ converting
directly on the command line.
"""
# assigning a function to a variable setup seconds
Expand Down Expand Up @@ -176,7 +176,7 @@ def shell_frames_to_timecode(frames: int, fps: float) -> str:
.. admonition:: SEE ALSO
:class: note
Invoke function `frames_to_timecode <#function-frames-to-timecode>`_
Invoke function `frames_to_timecode <../modules/converts.html#function-frames-to-timecode>`_
with a given arguments values.
"""
# run calculation
Expand Down Expand Up @@ -220,7 +220,7 @@ def shell_timecode_to_frames(timecode: str, fps: float) -> str:
.. admonition:: SEE ALSO
:class: note
Invoke function `timecode_to_frames <#function-timecode-to-frames>`_
Invoke function `timecode_to_frames <../modules/converts.html#function-timecode-to-frames>`_
with a given arguments values.
"""
# run calculation
Expand Down

0 comments on commit be1eaeb

Please sign in to comment.