That's fairly trivial to do (I think) but if you want it to also sign the transaction, then you will need access to the blockchain somehow. Either you as the user would have to input all of the necessary data (output script, txid, vout) or it needs to access the blockchain somehow to look up the data that it needs.
Ok - but on the practical side: Can I have some pointers to existing solutions on github or similar?
That's what I hoped for. I could live with a (heavily) pruned blockchain on the machine running the script.
Rico
you just need some basic bash/python/php/nodejs (or annother) and some imagination. You will then quickly find a solution to your problem, you could even do more. Eventually you will build a project around the script and release some nice new services.
Just download bitcoind, read some guides, and start developing using bitcoin, you will save a lot of time.