I published a gem called ldgr recently. It’s actually a Ruby script that I wrote well over a year ago, but I made it a little more generalized so that others could use it. It lets you add transactions to a file for use with Ledger. It can also sort transactions in that file, tag transactions with accounts payable and clear any uncleared transactions whose dates have come.
It’s a useful tool that I’ve used successfully for a long time. Feel free to give it a whirl.