Item Source
From MightyWiki
Items Sources are one of key elements in Mighty Box core. Item sources are the only method that exists in which the engine can obtain collections of items in the process called Catalog Indexing.
An item source is responsible for providing a list of items when queried by the engine, with a specific catalog entry. Each Item Source expects a specific group of parameters, obtained by the catalog entry settings, to be given to it, for it to be able to return a meaningful answer to the engine's query. Item source developers should document the parameters supported by the Item source, so other plugins could interact with the source.
Example: a FileSystemSource might expect parameters that include a directory/file path, depth level (for recursive scanning) etc.
Example: File System Source Settings
| Property | Type | Description |
|---|---|---|
| OmitSourceItem | Bool | Don't include the root folder item |
| Contents | String | None/FolderContents/HTML Links/Text Lines
This determines which parser should the source use DirectoryParser/TextParser/list. |
| Bool | Path | Path of File/Directory to index |
| Integer | Depth | Folder depth to index |
| String | Types | Types of files to include in index (by extensions) |
| Bool | watchTarget | Listen to file system events, and update catalogs immediately |
Plugins
Item Sources are defined in plugins manifest files.
