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()

[((115, 129), 'rinobot_plugin.filepath', 'bot.filepath', ([], {}), '()\n', (127, 129), True, 'import rinobot_plugin as bot\n'), ((141, 163), 'rinobot_plugin.loadfile', 'bot.loadfile', (['filepath'], {}), '(filepath)\n', (153, 163), True, 'import rinobot_plugin as bot\n'), ((217, 264), 'rinobot_plugin.get_arg', 'bot.get_arg', (['"""shift"""'], {'type': 'float', 'required': '(True)'}), "('shift', type=float, required=True)\n", (228, 264), True, 'import rinobot_plugin as bot\n'), ((277, 302), 'rinobot_plugin.index_from_args', 'bot.index_from_args', (['data'], {}), '(data)\n', (296, 302), True, 'import rinobot_plugin as bot\n'), ((447, 475), 'rinobot_plugin.output_filepath', 'bot.output_filepath', (['outname'], {}), '(outname)\n', (466, 475), True, 'import rinobot_plugin as bot\n'), ((480, 505), 'numpy.savetxt', 'np.savetxt', (['outpath', 'data'], {}), '(outpath, data)\n', (490, 505), True, 'import numpy as np\n'), ((356, 374), 'rinobot_plugin.no_extension', 'bot.no_extension', ([], {}), '()\n', (372, 374), True, 'import rinobot_plugin as bot\n')]