-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample_plugin.py
More file actions
24 lines (20 loc) · 819 Bytes
/
Copy pathexample_plugin.py
File metadata and controls
24 lines (20 loc) · 819 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from PluginLogic import PluginLogic
# You can rename the class, but keep its name exactly like the file one
class example_logic(PluginLogic):
# Name for calling this plugin
name_str = "TEST_PLUGIN"
# Text printed when calling the script with wrong parameters
help_str = "This is an example plugin that copy the 1st element of each " \
"list (if the list isn't empty)"
# Text of button in the GUI
button_str = "Example Plugin"
# The main function doing something with the lists and returning a list
def Logic(self, list1, list2):
out = []
if ((not (list1 is None)) and
(not (list2 is None))):
if (list1 != []):
out.append(list1[0])
if (list2 != []):
out.append(list2[0])
return (out)