Skip to content

An unofficial stub generator for vapoursynth and its plugins, which is helpful to autocomplete code in VSCode.

License

Notifications You must be signed in to change notification settings

HuangRuixiao-eng/VapourSynth-Plugins-Stub-Generator

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VapourSynth-Plugins-Stub-Generator

An unofficial stub generator for vapoursynth and its plugins, which is helpful to autocomplete code in VSCode.

Two way of Generating stub file

1.(Onekey install) Place the whole folder VapourSynth-Plugins-Stub-Generator at the same path of python.exe of vapoursynth.

run the onekey install.bat.

Done!

2.(Install manually) At first, you need to have a python with vapoursynth installed. You can check it with

python -c 'from vapoursynth import core
print(core.version())'

Then run the command:

python vs_plugins_helper.py

A file called vapoursynth.pyi should be created. Move it to where your language server or library like Jedi can recognize.

Generating stub file for VSCode

For VSCode users, there are some simpler way to generate the stub file.

For Pylance or Microsoft Python Language Server users, run the command to install the stub file:

python vs_plugins_helper.py install vapoursynth

For Jedi or JediLSP users, run the command to install the stub file:

python vs_plugins_helper.py install vscode

Setting up VSCode

Files in .vscode folder might be helpful to set up VSCode.

  1. Install VSCode, then install Python extension and Pylance in VSCode extension market.

  2. Paste the settings.json to the user settings folder1 or work area settings folder2. This will enable the python code highlighting and autocompletion.

  3. Paste the tasks.json to the user settings folder1 or work area settings folder2, and paste the keybindings.json to your vscode user settings folder1. This will enable shift+f5/f6 hotkeys as f5/f6 in vsedit.

  4. Remember to change "path\\to\\your\\VapourSynth\\python.exe" in settings.json and tasks.json to your own python interpreter.

1: Usually refer to %APPDATA%\Code\User\ on Windows and $HOME/.config/Code/User/ on Linux

2: Usually refer to /path/to/your/workdir/.vscode/

About

An unofficial stub generator for vapoursynth and its plugins, which is helpful to autocomplete code in VSCode.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.0%
  • Batchfile 1.0%