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, 15, 6, 29), 'rinobot_plugin.filepath', 'bot.filepath', ({}, {}), '()', True, 'import rinobot_plugin as bot\n'), ((7, 11, 7, 33), 'rinobot_plugin.loadfile', 'bot.loadfile', ({(7, 24, 7, 32): 'filepath'}, {}), '(filepath)', True, 'import rinobot_plugin as bot\n'), ((10, 12, 10, 59), 'rinobot_plugin.get_arg', 'bot.get_arg', (), '', True, 'import rinobot_plugin as bot\n'), ((11, 12, 11, 37), 'rinobot_plugin.index_from_args', 'bot.index_from_args', ({(11, 32, 11, 36): 'data'}, {}), '(data)', True, 'import rinobot_plugin as bot\n'), ((16, 14, 16, 42), 'rinobot_plugin.output_filepath', 'bot.output_filepath', ({(16, 34, 16, 41): 'outname'}, {}), '(outname)', True, 'import rinobot_plugin as bot\n'), ((17, 4, 17, 29), 'numpy.savetxt', 'np.savetxt', ({(17, 15, 17, 22): 'outpath', (17, 24, 17, 28): 'data'}, {}), '(outpath, data)', True, 'import numpy as np\n'), ((14, 14, 14, 32), 'rinobot_plugin.no_extension', 'bot.no_extension', ({}, {}), '()', True, 'import rinobot_plugin as bot\n')]