-
Notifications
You must be signed in to change notification settings - Fork 156
Plugin
DragonDon edited this page Dec 27, 2013
·
2 revisions
This page is to describe how to make your own *COMMANDS*(scripts) *(note, should try to be consistent with naming. Plugin, Commands, Scripts are all used to point to the same thing here.)
Plugins consist of three files, a plugin.info(See #1) file, an actions.dic(See #2) file and an executable(See #3).
1/ The following is an example of a plugin.info:
- name = TotemPlugin (Any spaces will be removed, Music Launcher will be installed as MusicLauncher)
- version = 1.0 (This line must be either an interger (1, 6, 10) or a float (1.1, 2.4, 4.2))
- file = totem (The name of the file that will be called. If your plugin doesn't need a file enter NONE)
- description = Control Totem Media Player (This is the description that will be displayed to the user before installation)
- author = Brett Mayson (The creator of the Plugin)
- actions = (Actions the plugin adds)(note: need better description for this)
- dependencies = totem (This is an optional line. If added the user will be notified of any programs they need)
- play video,plays the loaded video ("play video" is what the user says, "plays the loaded video" is what the plugin will do)
- pause video,pauses the video if it is playing
- next video,plays the next video in the playlist
- previous video,plays the previous video in the playlist
2/ The following is an example of all the code that goes into the actions.dic file.
- <p,P>lay <v,V>ideo
- totem '--play'
- <pause,POS> <v,V>ideo
- totem '--pause'
- <n,N>ext <v,V>ideo
- totem '--next'
- <p,P>revious <v,V>ideo
- totem '--previous'
3/ Executable. This will be the file/binary to be run. In this example, it is "totem".
- After this you should have three files:
-
- plugin.info
- actons.dic
- And the executable (In our example this would be totem)
You can now compress them into a .tar.gz file and rename the extension to .sp
Leaving us with something like totem.sp You can see this plugin in the Example Plugins directory