import rinobot_plugin as bot
import numpy as np

def main():
    # lets get our parameters and data
    filepath = bot.filepath()
    data = bot.loadfile(filepath)

    # now comes the custom plugin logic
    shift = bot.get_arg('shift', type=float, required=True)
    index = bot.index_from_args(data)
    data[index] = data[index] + shift

    outname = bot.no_extension() + '-shift-%s.txt' % shift
    # then we set up the output
    outpath = bot.output_filepath(outname)
    np.savetxt(outpath, data)

if __name__ == "__main__":
    main()

[(6, 'rinobot_plugin.filepath', 'bot.filepath', True, 'import rinobot_plugin as bot\n'), (7, 'rinobot_plugin.loadfile', 'bot.loadfile', True, 'import rinobot_plugin as bot\n'), (10, 'rinobot_plugin.get_arg', 'bot.get_arg', True, 'import rinobot_plugin as bot\n'), (11, 'rinobot_plugin.index_from_args', 'bot.index_from_args', True, 'import rinobot_plugin as bot\n'), (16, 'rinobot_plugin.output_filepath', 'bot.output_filepath', True, 'import rinobot_plugin as bot\n'), (17, 'numpy.savetxt', 'np.savetxt', True, 'import numpy as np\n'), (14, 'rinobot_plugin.no_extension', 'bot.no_extension', True, 'import rinobot_plugin as bot\n')]