Skip to content

Commit

Permalink
Add plugin section
Browse files Browse the repository at this point in the history
  • Loading branch information
cremarco committed Jul 25, 2024
1 parent 39c8283 commit 471a6f9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 365 deletions.
182 changes: 1 addition & 181 deletions docs/plug-in/add-on.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,184 +2,4 @@
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.
# Add-on
4 changes: 1 addition & 3 deletions docs/plug-in/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,4 @@ Transformation plugins perform various transformations on table data, such as da
import DocCardList from '@theme/DocCardList';
<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😉
```
182 changes: 1 addition & 181 deletions docs/plug-in/transformation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,184 +2,4 @@
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.
# Transformation

0 comments on commit 471a6f9

Please sign in to comment.