galaxy-central / scripts / migrate_tools / migrate_tools.py

"""
This script will start up its own web application which includes an InstallManager (~/lib/galaxy/tool_shed/install_manager.py).
For each tool discovered missing, the tool shed repository that contains it will be installed on disk and a new entry will be
created for it in the migrated_tools_conf.xml file.  These entries will be made so that the tool panel will be displayed the same
as it was before the tools were eliminated from the Galaxy distribution.  The InstallManager will properly handle entries in 
migrated_tools_conf.xml for tools outside tool panel sections as well as tools inside tool panel sections, depending upon the
layout of the local tool_conf.xml file.  Entries will not be created in migrated_tools_conf.xml for tools included in the tool
shed repository but not defined in tool_conf.xml.
"""
import sys, os

new_path = [ os.path.join( os.getcwd(), "lib" ) ]
# Remove scripts/ from the path.
new_path.extend( sys.path[1:] )
sys.path = new_path

from galaxy import eggs
from galaxy.tool_shed.migrate.common import MigrateToolsApplication

app = MigrateToolsApplication( sys.argv[ 1 ] )
non_shed_tool_confs = app.install_manager.proprietary_tool_confs
if len( non_shed_tool_confs ) == 1:
    plural = ''
    file_names = non_shed_tool_confs[ 0 ]
else:
    plural = 's'
    file_names = ', '.join( non_shed_tool_confs )
msg = "\nThe installation process is finished.  If any tools associated with this migration were defined in your file%s named\n" % plural
msg += "%s, then you should remove entries for them and start your Galaxy server.\n" % file_names
print msg 
app.shutdown()
sys.exit( 0 )
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.