From 39c8283129d63842a7e35585504f47bbcb96be6e Mon Sep 17 00:00:00 2001 From: Marco Date: Thu, 25 Jul 2024 18:59:58 +0200 Subject: [PATCH] Add plugin section --- docs/advanced-guides/_category_.json | 7 - docs/advanced-guides/plugins.md | 5 - docs/plug-in/add-on.md | 185 +++++++++++++++++++++++++++ docs/plug-in/export.md | 185 +++++++++++++++++++++++++++ docs/plug-in/index.mdx | 47 +++++++ docs/plug-in/transformation.md | 185 +++++++++++++++++++++++++++ 6 files changed, 602 insertions(+), 12 deletions(-) delete mode 100644 docs/advanced-guides/_category_.json delete mode 100644 docs/advanced-guides/plugins.md create mode 100644 docs/plug-in/add-on.md create mode 100644 docs/plug-in/export.md create mode 100644 docs/plug-in/index.mdx create mode 100644 docs/plug-in/transformation.md diff --git a/docs/advanced-guides/_category_.json b/docs/advanced-guides/_category_.json deleted file mode 100644 index a74f4f4..0000000 --- a/docs/advanced-guides/_category_.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "label": "Advanced Guides", - "position": 4, - "link": { - "type": "generated-index" - } -} diff --git a/docs/advanced-guides/plugins.md b/docs/advanced-guides/plugins.md deleted file mode 100644 index d3439d9..0000000 --- a/docs/advanced-guides/plugins.md +++ /dev/null @@ -1,5 +0,0 @@ -# Plugins - -Plugins are the building blocks of features in a MantisTable UI. Each plugin handles its own individual feature. - -## Creating plugins {#creating-plugins} \ No newline at end of file diff --git a/docs/plug-in/add-on.md b/docs/plug-in/add-on.md new file mode 100644 index 0000000..6f71b2f --- /dev/null +++ b/docs/plug-in/add-on.md @@ -0,0 +1,185 @@ +--- +sidebar_position: 2 +--- + +# Add-on + +MantisTable UI is designed with extensibility in mind, allowing users to enhance its capabilities through the use of plugins. There are three main types of plugins that can be integrated into MantisTable UI: + +1. **Export Plugins** +2. **Add-on Plugins** +3. **Transformation Plugins** + +## Plugin Types + +### 1. Export Plugins + +**Description:** +Export plugins enable MantisTable UI to export data and annotation in user-defined formats. + +**Use Cases:** +- Exporting tables to custom file formats (e.g., JSON, XML, CSV) +- Generating reports in PDF or other document formats +- Custom serialization of table data for integration with other systems + +### 2. Add-on Plugins + +**Description:** +Add-on plugins use semantic annotations to process table data, providing additional functionalities such as lexicalization and visualization. These plugins enhance the interpretability and presentation of the data. + +**Use Cases:** +- Visualizing table data in charts or graphs +- Generating natural language descriptions of table content +- Integrating with external semantic services for enriched data processing + +### 3. Transformation Plugins + +**Description:** +Transformation plugins perform various transformations on table data, such as data cleaning and data transformation. These plugins help in improving data quality and reshaping data to meet specific analysis needs. + +**Use Cases:** +- Cleaning and normalizing data entries +- Transforming table structures +- Applying complex data transformations and computations + +## Plugin Configuration + +Plugins are configured through the MantisTable UI configuration file (`.env`). The relevant parameters for configuring plugins include the base URL for the plugins service and the specific settings for each type of plugin. + +### Example Configuration + +```env +PLUGINS_PORT="5001" +EXPORT_PLUGINS_DIR="/path/to/export/plugins" +ADDON_PLUGINS_DIR="/path/to/addon/plugins" +TRANSFORMATION_PLUGINS_DIR="/path/to/transformation/plugins" +``` + +## Developing Plugins + +### General Guidelines + +1. **Isolation:** Each plugin should operate independently and not interfere with other plugins or the core functionality of MantisTable UI. +2. **Configuration:** Plugins should allow configuration through environment variables or configuration files. +3. **Documentation:** Provide clear documentation for each plugin, including usage instructions, dependencies, and configuration options. + +### Export Plugin Example + +**Structure:** + +``` +/export-plugin-example + /src + index.js + /config + config.json + /docs + README.md +``` + +**index.js:** + +```javascript +module.exports = { + export: (tableData) => { + // Implement custom export functionality here + return customFormattedData; + } +}; +``` + +**config.json:** + +```json +{ + "format": "custom-format", + "description": "Export plugin for custom format" +} +``` + +### Add-on Plugin Example + +**Structure:** + +``` +/addon-plugin-example + /src + index.js + /config + config.json + /docs + README.md +``` + +**index.js:** + +```javascript +module.exports = { + process: (annotatedTable) => { + // Implement custom processing functionality here + return processedData; + } +}; +``` + +**config.json:** + +```json +{ + "name": "semantic-visualizer", + "description": "Add-on plugin for visualizing annotated tables" +} +``` + +### Transformation Plugin Example + +**Structure:** + +``` +/transformation-plugin-example + /src + index.js + /config + config.json + /docs + README.md +``` + +**index.js:** + +```javascript +module.exports = { + transform: (tableData) => { + // Implement custom transformation functionality here + return transformedData; + } +}; +``` + +**config.json:** + +```json +{ + "name": "data-cleaner", + "description": "Transformation plugin for cleaning and normalizing data" +} +``` + +## Using Plugins in MantisTable UI + +1. **Install the Plugin:** + - Place the plugin files in the appropriate directory as specified in the configuration file. + - Ensure all dependencies are installed and properly configured. + +2. **Configure the Plugin:** + - Update the `.env` file with the necessary configuration parameters. + - Restart MantisTable UI to load the new plugins. + +3. **Access Plugin Functionality:** + - Export plugins can be accessed through the export menu in the UI. + - Add-on plugins are typically accessed through semantic processing options. + - Transformation plugins can be applied through the data transformation tools in the UI. + +## Conclusion + +The plugin system in MantisTable UI provides a flexible and powerful way to extend the functionality of the application. By developing custom export, add-on, and transformation plugins, users can tailor MantisTable UI to meet their specific needs and enhance their data management workflows. \ No newline at end of file diff --git a/docs/plug-in/export.md b/docs/plug-in/export.md new file mode 100644 index 0000000..b53f6b9 --- /dev/null +++ b/docs/plug-in/export.md @@ -0,0 +1,185 @@ +--- +sidebar_position: 1 +--- + +# Export + +MantisTable UI is designed with extensibility in mind, allowing users to enhance its capabilities through the use of plugins. There are three main types of plugins that can be integrated into MantisTable UI: + +1. **Export Plugins** +2. **Add-on Plugins** +3. **Transformation Plugins** + +## Plugin Types + +### 1. Export Plugins + +**Description:** +Export plugins enable MantisTable UI to export data and annotation in user-defined formats. + +**Use Cases:** +- Exporting tables to custom file formats (e.g., JSON, XML, CSV) +- Generating reports in PDF or other document formats +- Custom serialization of table data for integration with other systems + +### 2. Add-on Plugins + +**Description:** +Add-on plugins use semantic annotations to process table data, providing additional functionalities such as lexicalization and visualization. These plugins enhance the interpretability and presentation of the data. + +**Use Cases:** +- Visualizing table data in charts or graphs +- Generating natural language descriptions of table content +- Integrating with external semantic services for enriched data processing + +### 3. Transformation Plugins + +**Description:** +Transformation plugins perform various transformations on table data, such as data cleaning and data transformation. These plugins help in improving data quality and reshaping data to meet specific analysis needs. + +**Use Cases:** +- Cleaning and normalizing data entries +- Transforming table structures +- Applying complex data transformations and computations + +## Plugin Configuration + +Plugins are configured through the MantisTable UI configuration file (`.env`). The relevant parameters for configuring plugins include the base URL for the plugins service and the specific settings for each type of plugin. + +### Example Configuration + +```env +PLUGINS_PORT="5001" +EXPORT_PLUGINS_DIR="/path/to/export/plugins" +ADDON_PLUGINS_DIR="/path/to/addon/plugins" +TRANSFORMATION_PLUGINS_DIR="/path/to/transformation/plugins" +``` + +## Developing Plugins + +### General Guidelines + +1. **Isolation:** Each plugin should operate independently and not interfere with other plugins or the core functionality of MantisTable UI. +2. **Configuration:** Plugins should allow configuration through environment variables or configuration files. +3. **Documentation:** Provide clear documentation for each plugin, including usage instructions, dependencies, and configuration options. + +### Export Plugin Example + +**Structure:** + +``` +/export-plugin-example + /src + index.js + /config + config.json + /docs + README.md +``` + +**index.js:** + +```javascript +module.exports = { + export: (tableData) => { + // Implement custom export functionality here + return customFormattedData; + } +}; +``` + +**config.json:** + +```json +{ + "format": "custom-format", + "description": "Export plugin for custom format" +} +``` + +### Add-on Plugin Example + +**Structure:** + +``` +/addon-plugin-example + /src + index.js + /config + config.json + /docs + README.md +``` + +**index.js:** + +```javascript +module.exports = { + process: (annotatedTable) => { + // Implement custom processing functionality here + return processedData; + } +}; +``` + +**config.json:** + +```json +{ + "name": "semantic-visualizer", + "description": "Add-on plugin for visualizing annotated tables" +} +``` + +### Transformation Plugin Example + +**Structure:** + +``` +/transformation-plugin-example + /src + index.js + /config + config.json + /docs + README.md +``` + +**index.js:** + +```javascript +module.exports = { + transform: (tableData) => { + // Implement custom transformation functionality here + return transformedData; + } +}; +``` + +**config.json:** + +```json +{ + "name": "data-cleaner", + "description": "Transformation plugin for cleaning and normalizing data" +} +``` + +## Using Plugins in MantisTable UI + +1. **Install the Plugin:** + - Place the plugin files in the appropriate directory as specified in the configuration file. + - Ensure all dependencies are installed and properly configured. + +2. **Configure the Plugin:** + - Update the `.env` file with the necessary configuration parameters. + - Restart MantisTable UI to load the new plugins. + +3. **Access Plugin Functionality:** + - Export plugins can be accessed through the export menu in the UI. + - Add-on plugins are typically accessed through semantic processing options. + - Transformation plugins can be applied through the data transformation tools in the UI. + +## Conclusion + +The plugin system in MantisTable UI provides a flexible and powerful way to extend the functionality of the application. By developing custom export, add-on, and transformation plugins, users can tailor MantisTable UI to meet their specific needs and enhance their data management workflows. \ No newline at end of file diff --git a/docs/plug-in/index.mdx b/docs/plug-in/index.mdx new file mode 100644 index 0000000..4a7db4f --- /dev/null +++ b/docs/plug-in/index.mdx @@ -0,0 +1,47 @@ +# Plug-in + +MantisTable UI is designed with extensibility in mind, allowing users to enhance its capabilities through the use of plugins. There are three main types of plugins that can be integrated into MantisTable UI: + +1. **Export Plugins** +2. **Add-on Plugins** +3. **Transformation Plugins** + +## Plugin Types + +### 1. Export Plugins + +**Description:** +Export plugins enable MantisTable UI to export data and annotation in user-defined formats. + +**Use Cases:** +- Exporting tables to custom file formats (e.g., JSON, XML, CSV) +- Generating reports in PDF or other document formats +- Custom serialization of table data for integration with other systems + +### 2. Add-on Plugins + +**Description:** +Add-on plugins use semantic annotations to process table data, providing additional functionalities such as lexicalization and visualization. These plugins enhance the interpretability and presentation of the data. + +**Use Cases:** +- Visualizing table data in charts or graphs +- Generating natural language descriptions of table content +- Integrating with external semantic services for enriched data processing + +### 3. Transformation Plugins + +**Description:** +Transformation plugins perform various transformations on table data, such as data cleaning and data transformation. These plugins help in improving data quality and reshaping data to meet specific analysis needs. + +**Use Cases:** +- Cleaning and normalizing data entries +- Transforming table structures +- Applying complex data transformations and computations + +```mdx-code-block +import DocCardList from '@theme/DocCardList'; + + +``` + +We will assume that you have finished the guides, and know the basics like how to configure plugins, how to write React components, etc. These sections will have plugin authors and code contributors in mind, so we may occasionally refer to [plugin APIs](../api/plugin-methods/README.mdx) or other architecture details. Don't panic if you don't understand everything😉 \ No newline at end of file diff --git a/docs/plug-in/transformation.md b/docs/plug-in/transformation.md new file mode 100644 index 0000000..b67f03f --- /dev/null +++ b/docs/plug-in/transformation.md @@ -0,0 +1,185 @@ +--- +sidebar_position: 3 +--- + +# Transformation + +MantisTable UI is designed with extensibility in mind, allowing users to enhance its capabilities through the use of plugins. There are three main types of plugins that can be integrated into MantisTable UI: + +1. **Export Plugins** +2. **Add-on Plugins** +3. **Transformation Plugins** + +## Plugin Types + +### 1. Export Plugins + +**Description:** +Export plugins enable MantisTable UI to export data and annotation in user-defined formats. + +**Use Cases:** +- Exporting tables to custom file formats (e.g., JSON, XML, CSV) +- Generating reports in PDF or other document formats +- Custom serialization of table data for integration with other systems + +### 2. Add-on Plugins + +**Description:** +Add-on plugins use semantic annotations to process table data, providing additional functionalities such as lexicalization and visualization. These plugins enhance the interpretability and presentation of the data. + +**Use Cases:** +- Visualizing table data in charts or graphs +- Generating natural language descriptions of table content +- Integrating with external semantic services for enriched data processing + +### 3. Transformation Plugins + +**Description:** +Transformation plugins perform various transformations on table data, such as data cleaning and data transformation. These plugins help in improving data quality and reshaping data to meet specific analysis needs. + +**Use Cases:** +- Cleaning and normalizing data entries +- Transforming table structures +- Applying complex data transformations and computations + +## Plugin Configuration + +Plugins are configured through the MantisTable UI configuration file (`.env`). The relevant parameters for configuring plugins include the base URL for the plugins service and the specific settings for each type of plugin. + +### Example Configuration + +```env +PLUGINS_PORT="5001" +EXPORT_PLUGINS_DIR="/path/to/export/plugins" +ADDON_PLUGINS_DIR="/path/to/addon/plugins" +TRANSFORMATION_PLUGINS_DIR="/path/to/transformation/plugins" +``` + +## Developing Plugins + +### General Guidelines + +1. **Isolation:** Each plugin should operate independently and not interfere with other plugins or the core functionality of MantisTable UI. +2. **Configuration:** Plugins should allow configuration through environment variables or configuration files. +3. **Documentation:** Provide clear documentation for each plugin, including usage instructions, dependencies, and configuration options. + +### Export Plugin Example + +**Structure:** + +``` +/export-plugin-example + /src + index.js + /config + config.json + /docs + README.md +``` + +**index.js:** + +```javascript +module.exports = { + export: (tableData) => { + // Implement custom export functionality here + return customFormattedData; + } +}; +``` + +**config.json:** + +```json +{ + "format": "custom-format", + "description": "Export plugin for custom format" +} +``` + +### Add-on Plugin Example + +**Structure:** + +``` +/addon-plugin-example + /src + index.js + /config + config.json + /docs + README.md +``` + +**index.js:** + +```javascript +module.exports = { + process: (annotatedTable) => { + // Implement custom processing functionality here + return processedData; + } +}; +``` + +**config.json:** + +```json +{ + "name": "semantic-visualizer", + "description": "Add-on plugin for visualizing annotated tables" +} +``` + +### Transformation Plugin Example + +**Structure:** + +``` +/transformation-plugin-example + /src + index.js + /config + config.json + /docs + README.md +``` + +**index.js:** + +```javascript +module.exports = { + transform: (tableData) => { + // Implement custom transformation functionality here + return transformedData; + } +}; +``` + +**config.json:** + +```json +{ + "name": "data-cleaner", + "description": "Transformation plugin for cleaning and normalizing data" +} +``` + +## Using Plugins in MantisTable UI + +1. **Install the Plugin:** + - Place the plugin files in the appropriate directory as specified in the configuration file. + - Ensure all dependencies are installed and properly configured. + +2. **Configure the Plugin:** + - Update the `.env` file with the necessary configuration parameters. + - Restart MantisTable UI to load the new plugins. + +3. **Access Plugin Functionality:** + - Export plugins can be accessed through the export menu in the UI. + - Add-on plugins are typically accessed through semantic processing options. + - Transformation plugins can be applied through the data transformation tools in the UI. + +## Conclusion + +The plugin system in MantisTable UI provides a flexible and powerful way to extend the functionality of the application. By developing custom export, add-on, and transformation plugins, users can tailor MantisTable UI to meet their specific needs and enhance their data management workflows. \ No newline at end of file