Simple formatting to make data h/ledger-ready

Cc-ing from reddit: Suggest me a simple accounting solution that's very light and quick, lets me paste someone's beginning trial balance, and just lets me do general entries:

What the title says. Just need something quick and light that quickly lets me paste someone's trial balance, do entries, and get results. I usually do it in excel but it's so easy to make a mistake since it's manual. Any suggestions?

The data is usually a PDF balance sheet and profit and loss reports. So:
Cash $500
Sales $100
Office expenses $55
We paste it into Excel and do adjusting entries like depreciation, etc...

If you copied data like this from your PDF,

Cash $500
Sales $100
Office expenses $55

Here's the least you need to do to start analysing it with hledger or ledger:

  1. Indent these lines by at least one space.

  2. Add an extra space between each category name and amount, to clearly separate them.

  3. Parenthesise the category names, to allow unbalanced single entry accounting.

  4. Prepend a non-indented date line.

  5. Save these in a text file. FILE.journal is conventional.

     2024-08-27
         (Cash)  $500
         (Sales)  $100
         (Office expenses)  $55
    

Add more dated entries in this format if you like.

Now you can run h/ledger reports like:

  hledger -f FILE.journal balance
  hledger -f FILE.journal aregister Cash

etc.

Method 2: Alternately, using hledger's CSV reader:

  1. Save those lines in FILE.csv, adding dates and commas:

     2024-08-27, Cash, $500
     2024-08-27, Sales, $100
     2024-08-27, Office expenses, $55
    
  2. Create FILE.csv.rules, containing:

     fields date, account1, amount1
     account1 (%account1)
    

And run reports as before:

hledger -f FILE.csv balance
hledger -f FILE.csv aregister Cash