def addToCraftMenu(menu):
 settings.ToolDialog().addPluginToMenu(menu, archive.getUntilDot(os.path.abspath(__file__)))
 menu.add_separator()
 directoryPath = skeinforge_craft.getPluginsDirectoryPath()
 directoryFolders = settings.getFolders(directoryPath)
 pluginFileNames = skeinforge_craft.getPluginFileNames()
 for pluginFileName in pluginFileNames:
  pluginFolderName = (pluginFileName + '_plugins')
  pluginPath = os.path.join(directoryPath, pluginFileName)
  if (pluginFolderName in directoryFolders):
   addSubmenus(menu, pluginFileName, os.path.join(directoryPath, pluginFolderName), pluginPath)
  else:
   settings.ToolDialog().addPluginToMenu(menu, pluginPath)

def addToCraftMenu ( menu ) : settings . ToolDialog ( ) . addPluginToMenu ( menu , archive . getUntilDot ( os . path . abspath ( __file__ ) ) ) menu . add_separator ( ) directoryPath = skeinforge_craft . getPluginsDirectoryPath ( ) directoryFolders = settings . getFolders ( directoryPath ) pluginFileNames = skeinforge_craft . getPluginFileNames ( ) for pluginFileName in pluginFileNames : pluginFolderName = ( pluginFileName + '_plugins' ) pluginPath = os . path . join ( directoryPath , pluginFileName ) if ( pluginFolderName in directoryFolders ) : addSubmenus ( menu , pluginFileName , os . path . join ( directoryPath , pluginFolderName ) , pluginPath ) else : settings . ToolDialog ( ) . addPluginToMenu ( menu , pluginPath )
add a craft plugin menu .