Skip to content

Commit 85a5f21

Browse files
author
arch
committed
improve docs
1 parent b755cab commit 85a5f21

27 files changed

+437
-59
lines changed

README.md

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,9 @@
11
# Python Funscript Editor
22

3-
A Python program to quickly create prototype algorithms to partially automate the generation of funscripts.
3+
A Python program that use Computer Vision to predict the funscript actions. Most of you are probably interested in the [Open Funscripter (OFS)](https://github.com/OpenFunscripter/OFS) integration of this tool. I create a hacky lua script to integrate the prediction of this tool in OFS. More information and installation instructions in [OFS Integration](https://github.com/michael-mueller-git/Python-Funscript-Editor/blob/main/docs/app/docs/user-guide/ofs-integration.md). For the application configuration see [this](https://github.com/michael-mueller-git/Python-Funscript-Editor/blob/main/docs/app/docs/user-guide/config.md) Documentation page.
44

5-
**NOTE:** The program is currently not intended for productive use. But you can do whatever you want with this tool.
5+
**NOTE:** The Tool could also use as an standalone application with an build in UI. Due to the limitations it is not intended for productive use.
66

77
## Documentation
88

99
The application documentation is located in [`./docs/app/docs`](https://github.com/michael-mueller-git/Python-Funscript-Editor/blob/main/docs/app/docs)
10-
11-
## Build
12-
13-
### Windows
14-
15-
Use `pyinstaller` in anaconda environment with all packages from `requirements.txt` set up. Then run:
16-
17-
```
18-
pip install pyinstaller
19-
build.bat
20-
```
21-
22-
This create the Windows Package in `./dist`
23-
24-
### Pip-Package (Recommend for Linux)
25-
26-
Generate distribution package of this project. These are archives that can be uploaded to an local Package Index and can be installed by pip.
27-
28-
```bash
29-
make docs package
30-
```
31-
32-
This create the distribution package in `./dist`. Or simply type `make all` to build and install the package.

docs/app/docs/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Python Funscript Editor
22

3-
A Python program to quickly create prototype algorithms to partially automate the generation of funscripts.
3+
A Python program that use Computer Vision to predict the funscript actions. Most of you are probably interested in the [Open Funscripter (OFS)](https://github.com/OpenFunscripter/OFS) integration of this tool. I create a hacky lua script to integrate the prediction of this tool in OFS. More information in [OFS Integration](user-guide/ofs-integration.md). For the configuration see [this](user-guide/config.md) Documentation page.
44

5-
**NOTE:** The program is currently not intended for productive use. But you can do whatever you want with this tool.
5+
**NOTE:** The Tool could also use as an standalone application with an build in UI. Due to the limitations it is not intended for productive use.
66

77
## User-Guide
88

99
- [Algorithms](user-guide/algorithms.md)
10+
- [Build](user-guide/build.md)
11+
- [Config](user-guide/config.md)
1012
- [OFS Integration](user-guide/ofs-integration.md)
1113
- [UI](user-guide/ui.md)

docs/app/docs/index.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
# Python Funscript Editor
22

3-
A Python program to quickly create prototype algorithms to partially automate the generation of funscripts.
3+
A Python program that use Computer Vision to predict the funscript actions. Most of you are probably interested in the [Open Funscripter (OFS)](https://github.com/OpenFunscripter/OFS) integration of this tool. I create a hacky lua script to integrate the prediction of this tool in OFS. More information in [OFS Integration](user-guide/ofs-integration/index.html). For the configuration see [this](user-guide/config/index.html) Documentation page.
44

5-
**NOTE:** The program is currently not intended for productive use. But you can do whatever you want with this tool.
5+
**NOTE:** The Tool could also use as an standalone application with an build in UI. Due to the limitations it is not intended for productive use.
66

77
## User-Guide
88

99
- [Algorithms](user-guide/algorithms/index.html)
10+
- [Build](user-guide/build/index.html)
11+
- [Config](user-guide/config/index.html)
1012
- [OFS Integration](user-guide/ofs-integration/index.html)
1113
- [UI](user-guide/ui/index.html)

docs/app/docs/user-guide/build.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Build
2+
3+
## Windows
4+
5+
Use `pyinstaller` in anaconda environment with all packages from `requirements.txt` set up. Then run:
6+
7+
```
8+
pip install pyinstaller
9+
build.bat
10+
```
11+
12+
This create the Windows Package in `./dist`
13+
14+
## Pip-Package (Recommend for Linux)
15+
16+
Generate distribution package of this project. These are archives that can be uploaded to an local Package Index and can be installed by pip.
17+
18+
```bash
19+
make docs package
20+
```
21+
22+
This create the distribution package in `./dist`. Or simply type `make all` to build and install the package.

docs/app/docs/user-guide/config.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Python Funscript Editor Config
2+
3+
The configuration files for the Windows release version are located in the `funscript-editor/funscript_editor/config` directory since release `v0.0.3`. If you use the python source code directly they are located in [`funscript_editor/config`](https://github.com/michael-mueller-git/Python-Funscript-Editor/tree/main/funscript_editor/config).
4+
5+
## Config Files
6+
7+
The directory contains several config files. The most interesting are `video_scaling.json`, `settings.yaml` and `hyperparameter.yaml`. When editing the `*.yaml` configuration files, pay attention to the formatting, otherwise the program will not work later.
8+
9+
Config Files:
10+
11+
- `hyperparameter.yaml`: hyperparameter for the prediction algorithms
12+
- `logging_linux.yaml`: the logging configuration for linx
13+
- `logging_windows.yaml`: the logging configuration for windows
14+
- `settings.yaml`: application settings
15+
- `ui.yaml`: user interface settings
16+
- `video_scaling.json`: scaling for the preview window
17+
18+
### Config Parameter
19+
20+
#### `hyperparameter.yaml`
21+
22+
- `skip_frames` (int): This parameter specifies how many frames are skipped and interpolated during tracking. Increase this parameter to improve the processing speed on slow hardware. But higher values result in poorer predictions!
23+
- `avg_sec_for_local_min_max_extraction` (float): Specify the window size for the calculation of the reference value for the local min and max search.
24+
- `min_frames` (int): Specify the minimum required frames for the tracking. Wee need this parameter to ensure there is at leas two strokes in the tracking result.
25+
- `shift_top_points` (int): Shift predicted top points by given frame number. Positive values delay the position and negative values result in an earlier position.
26+
- `shift_bottom_points` (int): Shift predicted bottom points by given frame number. Positive values delay the position and negative values result in an earlier position.
27+
28+
#### `settings.yaml`
29+
30+
- `use_zoom` (bool): Enable or disable an additional step to zoom in the Video before selecting a tracking feature for the Woman or Men.
31+
- `tracking_direction` (str): Specify the tracking direction. Allowed values are `'x'` and `'y'`.
32+
- `max_playback_fps` (int): Limit the max player speed in the tracking preview window (0 = disable limit)
33+
34+
#### `video_scaling.json`
35+
36+
The `video_scaling.json` config file specifies how the video get scaled bevor the tracking. The scaling also apply tho the preview size. If the preview to select the tracking feature is to small or to large you have to adjust this config file.
37+
38+
The entries in this config file consist of a pair of values.
39+
40+
Example config:
41+
42+
```json
43+
{ "1920": 1.0, "3500": 0.5, "5000": 0.25 }
44+
```
45+
46+
One pair in the example config is e.g. `"1920": 1.0`. Each pair of values defines which scaling should be used for which video resolution. The first value, refers to the video width in pixels. Videos with size larger than 1920 pixels horizontally use a scaling of `1.0`. Videos with 3500 pixel and more are scaled with `0.5` and from 5000 with `0.25`. All videos which are smaller than the smallest value (in this case 1920) are scaled always with `1.0` (original size). You can enter as many values as you want and change the existing scaling.
47+
48+
It’s best to look at your screen resolution and calculate which scaling you need for which video size so that the window fits on the monitor. e.g. You have `1920x1080` screen and `5400x2700` Video, you can divide `1920 / 5400 = 0.36` → add `"5300": 0.35` to the config (the key value have to be a little bit smaller than the Video resolution to apply the correct scaling).

docs/app/docs/user-guide/ofs-integration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22

33
Currently we use a hacky lua script to communicate between the Python Funscript Generator and the Open Funscripter.
44

5-
## Installation
5+
## Installation (Windows)
66

77
1. Download the latest packed Python Funscript Editor from [github release page](https://github.com/michael-mueller-git/Python-Funscript-Editor/releases).
88
2. Extract the Archiv to an Path without special character or spaces.
99
3. Copy the `funscript_generator.lua` script ([`Repository/contrib/OpenFunscripter`](https://github.com/michael-mueller-git/Python-Funscript-Editor/tree/main/contrib/OpenFunscripter)) to `data/lua` in your OFS directory.
1010
4. Open the `funscript_generator.lua` file and adjust the `Settings.FunscriptGenerator` and `Settings.TmpFile` variable.
11-
- `Settings.FunscriptGenerator`: point to the extracted Python Funscript Editor program
11+
- `Settings.FunscriptGenerator`: point to the extracted Python Funscript Editor program. Use `\\` instead of `/` symbols in the path string!
1212
- `Settings.TmpFile`: specifies a temporary file where to store the result (must be a file not a directory!). The file will be overwritten automatically the next time the generator is started!
1313
5. Now launch OFS.
1414
6. Navigate to `View : Special functions : Custom Functions` and select the `funscript_generator.lua` entry. Click the Button `Bind Script` (This may trigger the funscript generator, just ignore it for now).

docs/app/docs/user-guide/ui.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# UI
22

3-
The UI use an embedded mpv video player and matplotlib to draw the actions timeseries at the bottom.
3+
The build in UI use an embedded mpv video player and matplotlib to draw the actions timeseries at the bottom.
44

55
## UI Keyboard Shortcuts
66

docs/app/mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ pages:
55
- 'OFS Integration': 'user-guide/ofs-integration.md'
66
- 'UI': 'user-guide/ui.md'
77
- 'Algorithms': 'user-guide/algorithms.md'
8+
- 'Config': 'user-guide/config.md'
9+
- 'Build': 'user-guide/build.md'

docs/app/site/404.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@
5151
<li>
5252
<a href="/user-guide/algorithms/" class="dropdown-item">Algorithms</a>
5353
</li>
54+
55+
<li>
56+
<a href="/user-guide/config/" class="dropdown-item">Config</a>
57+
</li>
58+
59+
<li>
60+
<a href="/user-guide/build/" class="dropdown-item">Build</a>
61+
</li>
5462
</ul>
5563
</li>
5664
</ul>

docs/app/site/index.html

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,14 @@
5151
<li>
5252
<a href="user-guide/algorithms/" class="dropdown-item">Algorithms</a>
5353
</li>
54+
55+
<li>
56+
<a href="user-guide/config/" class="dropdown-item">Config</a>
57+
</li>
58+
59+
<li>
60+
<a href="user-guide/build/" class="dropdown-item">Build</a>
61+
</li>
5462
</ul>
5563
</li>
5664
</ul>
@@ -103,11 +111,13 @@
103111
<div class="col-md-9" role="main">
104112

105113
<h1 id="python-funscript-editor">Python Funscript Editor</h1>
106-
<p>A Python program to quickly create prototype algorithms to partially automate the generation of funscripts.</p>
107-
<p><strong>NOTE:</strong> The program is currently not intended for productive use. But you can do whatever you want with this tool.</p>
114+
<p>A Python program that use Computer Vision to predict the funscript actions. Most of you are probably interested in the <a href="https://github.com/OpenFunscripter/OFS">Open Funscripter (OFS)</a> integration of this tool. I create a hacky lua script to integrate the prediction of this tool in OFS. More information in <a href="user-guide/ofs-integration/index.html">OFS Integration</a>. For the configuration see <a href="user-guide/config/index.html">this</a> Documentation page.</p>
115+
<p><strong>NOTE:</strong> The Tool could also use as an standalone application with an build in UI. Due to the limitations it is not intended for productive use.</p>
108116
<h2 id="user-guide">User-Guide</h2>
109117
<ul>
110118
<li><a href="user-guide/algorithms/index.html">Algorithms</a></li>
119+
<li><a href="user-guide/build/index.html">Build</a></li>
120+
<li><a href="user-guide/config/index.html">Config</a></li>
111121
<li><a href="user-guide/ofs-integration/index.html">OFS Integration</a></li>
112122
<li><a href="user-guide/ui/index.html">UI</a></li>
113123
</ul></div>
@@ -194,5 +204,5 @@ <h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
194204

195205
<!--
196206
MkDocs version : 1.1.2
197-
Build Date UTC : 2021-06-26 06:43:36.336324+00:00
207+
Build Date UTC : 2021-06-26 10:02:28.282446+00:00
198208
-->

0 commit comments

Comments
 (0)