Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 2.98 KB

README.md

File metadata and controls

56 lines (36 loc) · 2.98 KB

ReaScriptDocParser

This project aims to parse the Reascript HTML documentation, reaper actions list and USDocML documentation (Ultraschall API) to any other format.

An intermediate representation of the documentation (class ReaDoc) is built and used by a parser (child of class ReaDocParser).

ReaDoc currently extract:

  • Functions with their name, description, language, parameters (types, names, descriptions and possible values) and return values (types, names and descriptions)
  • Keywords detected in functions' descriptions (e.g. gfx variables, 'parmname' possible values) along with their own description and their language.

BeautifulSoup4 (see doc) is used in this project, to install it with pip, use the command : pip install beautifulsoup4

The folder api contains all available documentation:

  • reascripthelp.html : Documentation shown in REAPER (Help -> ReaScript Documentation)
  • reaper-apidocs.USDocML : Documentation of REAPER by Ultraschall. It gives additionnal informations like descriptions for functions parameters and returned values.
  • reaper-videoprocessor-docs.USDocML : Documentation of REAPER video-processor by Ultraschall (for eel only).
  • ultraschall.USDocML : Documentation of Ultraschall API. This documentation is build using build_usdoc function in the main.py file.
  • reaper_ActionList.txt : Action list generated by SWS action Dump action list (native actions only)
  • sws_ActionList.txt : Action list generated by SWS action Dump action list (SWS actions only)

Be sure to update the api folder with the lastest documentation available.

Command arguments are available, check --help to get more information.

Below is a list of available parser.

Visual Studio Code parser

This parser produce snippets for Visual Studio Code for all available languages (C, EEL, Lua and Python).

This parser provide 'with return' snippets with the following prefix : reaperwr.FUNCTION_NAME on lua and WR_FUNCTION_NAME on C, EEL and Python. (Same applies for ultraschall functions)

Example of 'with return' snippet in lua :

reaperwr.GetSetMediaTrackInfo_String gives local boolean retval, string stringNeedBig = reaper.GetSetMediaTrackInfo_String(MediaTrack tr, string parmname, string stringNeedBig, boolean setNewValue)

Every documentation has been parsed in the folder vscode_snippets/.

See its README.md for available snippets / installation process.

Raw parser

This is a readable / example parser.

Output: raw/ folder.

Making a custom parser

You can make your own parser by creating a ReaDocParser child class and by implementing its parse method.