General Examples

arrows.goluca

PTA Source

# Arrow variants supported by pta2svg

2024-03-01 * Standard arrow
  Income:Salary -> Asset:Bank "pay" 3000.00 GBP

2024-03-02 * Slash arrow
  Asset:Bank // Expense:Groceries "weekly shop" 85.50 GBP

2024-03-03 * Unicode arrow
  Asset:Bank → Expense:Utilities "electric bill" 120.00 GBP

2024-03-04 * Bare greater-than
  Asset:Bank > Expense:Transport "commute" 45.00 GBP
JSON model
{
  "accounts": [
    {
      "name": "Asset:Bank",
      "short": "Bank",
      "type": "Asset"
    },
    {
      "name": "Expense:Groceries",
      "short": "Groceries",
      "type": "Expense"
    },
    {
      "name": "Expense:Transport",
      "short": "Transport",
      "type": "Expense"
    },
    {
      "name": "Expense:Utilities",
      "short": "Utilities",
      "type": "Expense"
    },
    {
      "name": "Income:Salary",
      "short": "Salary",
      "type": "Income"
    }
  ],
  "transactions": [
    {
      "date": "",
      "flag": "*",
      "payee": "Standard arrow",
      "movements": [
        {
          "from": "Income:Salary",
          "to": "Asset:Bank",
          "amount": 3000,
          "commodity": "GBP",
          "description": "pay"
        }
      ]
    },
    {
      "date": "",
      "flag": "*",
      "payee": "Slash arrow",
      "movements": [
        {
          "from": "Asset:Bank",
          "to": "Expense:Groceries",
          "amount": 85.5,
          "commodity": "GBP",
          "description": "weekly shop"
        }
      ]
    },
    {
      "date": "",
      "flag": "*",
      "payee": "Unicode arrow",
      "movements": [
        {
          "from": "Asset:Bank",
          "to": "Expense:Utilities",
          "amount": 120,
          "commodity": "GBP",
          "description": "electric bill"
        }
      ]
    },
    {
      "date": "",
      "flag": "*",
      "payee": "Bare greater-than",
      "movements": [
        {
          "from": "Asset:Bank",
          "to": "Expense:Transport",
          "amount": 45,
          "commodity": "GBP",
          "description": "commute"
        }
      ]
    }
  ]
}

SVG Output

Salary -£3,000.00 Bank £2,749.50 Groceries £85.50 Utilities £120.00 Transport £45.00 pay £3,000.00 weekly shop £85.50 electric bill £120.00 commute £45.00 Income Asset Expense

budget.goluca

PTA Source

# Monthly household budget

2024-04-01 * April salary
  Income:Salary -> Asset:Bank "net pay" 3,200.00 GBP

2024-04-01 * Tax withholding
  Income:Salary -> Expense:Tax "PAYE" 800.00 GBP

2024-04-03 * Mortgage payment
  Asset:Bank -> Liability:Mortgage "monthly" 1,100.00 GBP

2024-04-05 * Groceries
  Asset:Bank -> Expense:Food "weekly shop" 95.00 GBP

2024-04-07 * Savings transfer
  Asset:Bank -> Asset:Savings "rainy day" 500.00 GBP

2024-04-10 * Utilities
  Asset:Bank -> Expense:Utilities "gas and electric" 145.00 GBP

2024-04-15 * Council tax
  Asset:Bank -> Expense:Tax "council tax" 180.00 GBP
JSON model
{
  "accounts": [
    {
      "name": "Asset:Bank",
      "short": "Bank",
      "type": "Asset"
    },
    {
      "name": "Asset:Savings",
      "short": "Savings",
      "type": "Asset"
    },
    {
      "name": "Expense:Food",
      "short": "Food",
      "type": "Expense"
    },
    {
      "name": "Expense:Tax",
      "short": "Tax",
      "type": "Expense"
    },
    {
      "name": "Expense:Utilities",
      "short": "Utilities",
      "type": "Expense"
    },
    {
      "name": "Income:Salary",
      "short": "Salary",
      "type": "Income"
    },
    {
      "name": "Liability:Mortgage",
      "short": "Mortgage",
      "type": "Liability"
    }
  ],
  "transactions": [
    {
      "date": "",
      "flag": "*",
      "payee": "April salary",
      "movements": [
        {
          "from": "Income:Salary",
          "to": "Asset:Bank",
          "amount": 3200,
          "commodity": "GBP",
          "description": "net pay"
        }
      ]
    },
    {
      "date": "",
      "flag": "*",
      "payee": "Tax withholding",
      "movements": [
        {
          "from": "Income:Salary",
          "to": "Expense:Tax",
          "amount": 800,
          "commodity": "GBP",
          "description": "PAYE"
        }
      ]
    },
    {
      "date": "",
      "flag": "*",
      "payee": "Mortgage payment",
      "movements": [
        {
          "from": "Asset:Bank",
          "to": "Liability:Mortgage",
          "amount": 1100,
          "commodity": "GBP",
          "description": "monthly"
        }
      ]
    },
    {
      "date": "",
      "flag": "*",
      "payee": "Groceries",
      "movements": [
        {
          "from": "Asset:Bank",
          "to": "Expense:Food",
          "amount": 95,
          "commodity": "GBP",
          "description": "weekly shop"
        }
      ]
    },
    {
      "date": "",
      "flag": "*",
      "payee": "Savings transfer",
      "movements": [
        {
          "from": "Asset:Bank",
          "to": "Asset:Savings",
          "amount": 500,
          "commodity": "GBP",
          "description": "rainy day"
        }
      ]
    },
    {
      "date": "",
      "flag": "*",
      "payee": "Utilities",
      "movements": [
        {
          "from": "Asset:Bank",
          "to": "Expense:Utilities",
          "amount": 145,
          "commodity": "GBP",
          "description": "gas and electric"
        }
      ]
    },
    {
      "date": "",
      "flag": "*",
      "payee": "Council tax",
      "movements": [
        {
          "from": "Asset:Bank",
          "to": "Expense:Tax",
          "amount": 180,
          "commodity": "GBP",
          "description": "council tax"
        }
      ]
    }
  ]
}

SVG Output

Salary -£4,000.00 Bank £1,180.00 Mortgage £1,100.00 Food £95.00 Savings £500.00 Utilities £145.00 Tax £980.00 net pay £3,200.00 PAYE £800.00 monthly £1,100.00 weekly shop £95.00 rainy day £500.00 gas and electric £145.00 council tax £180.00 Income Asset Liability Expense

movement.goluca

PTA Source

# One movement drawn with the balances it leaves: the balance directives
# state what each account held before it. Product IDs carry hyphens and a
# name with spaces is quoted.

2026-01-31 balance "Liability:Savings:Alice Lovelace:easy-access" 1000.00 GBP
2026-01-31 balance Expense:Interest 50.00 GBP

2026-01-31 * Interest applied
  Expense:Interest -> "Liability:Savings:Alice Lovelace:easy-access" "interest" 1.27 GBP
JSON model
{
  "accounts": [
    {
      "name": "Expense:Interest",
      "short": "Interest",
      "type": "Expense"
    },
    {
      "name": "Liability:Savings:Alice Lovelace:easy-access",
      "short": "easy-access",
      "type": "Liability"
    }
  ],
  "opening": {
    "Expense:Interest": 50,
    "Liability:Savings:Alice Lovelace:easy-access": 1000
  },
  "transactions": [
    {
      "date": "",
      "flag": "*",
      "payee": "Interest applied",
      "movements": [
        {
          "from": "Expense:Interest",
          "to": "Liability:Savings:Alice Lovelace:easy-access",
          "amount": 1.27,
          "commodity": "GBP",
          "description": "interest"
        }
      ]
    }
  ]
}

SVG Output

Interest £48.73 easy-access £1,001.27 interest £1.27 Expense Liability

simple.goluca

PTA Source

2024-01-15 * Salary deposit
  Income:Salary -> Asset:Bank "salary payment" 5000.00 GBP

2024-01-20 * Pay rent
  Asset:Bank -> Expense:Rent "monthly rent" 1200.00 GBP

2024-01-25 * Loan repayment
  Asset:Bank -> Liability:Mortgage "repayment" 800.00 GBP

2024-02-01 * Multi-leg payroll
  +Income:Salary -> Asset:Bank "net salary" 4000.00 GBP
  +Income:Salary -> Expense:Tax "income tax" 1000.00 GBP
JSON model
{
  "accounts": [
    {
      "name": "Asset:Bank",
      "short": "Bank",
      "type": "Asset"
    },
    {
      "name": "Expense:Rent",
      "short": "Rent",
      "type": "Expense"
    },
    {
      "name": "Expense:Tax",
      "short": "Tax",
      "type": "Expense"
    },
    {
      "name": "Income:Salary",
      "short": "Salary",
      "type": "Income"
    },
    {
      "name": "Liability:Mortgage",
      "short": "Mortgage",
      "type": "Liability"
    }
  ],
  "transactions": [
    {
      "date": "",
      "flag": "*",
      "payee": "Salary deposit",
      "movements": [
        {
          "from": "Income:Salary",
          "to": "Asset:Bank",
          "amount": 5000,
          "commodity": "GBP",
          "description": "salary payment"
        }
      ]
    },
    {
      "date": "",
      "flag": "*",
      "payee": "Pay rent",
      "movements": [
        {
          "from": "Asset:Bank",
          "to": "Expense:Rent",
          "amount": 1200,
          "commodity": "GBP",
          "description": "monthly rent"
        }
      ]
    },
    {
      "date": "",
      "flag": "*",
      "payee": "Loan repayment",
      "movements": [
        {
          "from": "Asset:Bank",
          "to": "Liability:Mortgage",
          "amount": 800,
          "commodity": "GBP",
          "description": "repayment"
        }
      ]
    },
    {
      "date": "",
      "flag": "*",
      "payee": "Multi-leg payroll",
      "movements": [
        {
          "from": "Income:Salary",
          "to": "Asset:Bank",
          "amount": 4000,
          "commodity": "GBP",
          "description": "net salary",
          "linked": true
        },
        {
          "from": "Income:Salary",
          "to": "Expense:Tax",
          "amount": 1000,
          "commodity": "GBP",
          "description": "income tax",
          "linked": true
        }
      ]
    }
  ]
}

SVG Output

Salary -£10,000.00 Bank £7,000.00 Tax £1,000.00 Rent £1,200.00 Mortgage £800.00 salary payment £5,000.00 monthly rent £1,200.00 repayment £800.00 net salary £4,000.00 income tax £1,000.00 Income Asset Expense Liability

simple.pta

PTA Source

# The same ledger in the pta format: bare-word descriptions, no quotes.

2024-01-15 * Salary deposit
  Income:Salary -> Asset:Bank salary payment 5000.00 GBP

2024-01-20 * Pay rent
  Asset:Bank -> Expense:Rent monthly rent 1200.00 GBP

2024-01-25 * Loan repayment
  Asset:Bank -> Liability:Mortgage repayment 800.00 GBP

2024-02-01 * Multi-leg payroll
  +Income:Salary -> Asset:Bank net salary 4000.00 GBP
  +Income:Salary -> Expense:Tax income tax 1000.00 GBP
JSON model
{
  "accounts": [
    {
      "name": "Asset:Bank",
      "short": "Bank",
      "type": "Asset"
    },
    {
      "name": "Expense:Rent",
      "short": "Rent",
      "type": "Expense"
    },
    {
      "name": "Expense:Tax",
      "short": "Tax",
      "type": "Expense"
    },
    {
      "name": "Income:Salary",
      "short": "Salary",
      "type": "Income"
    },
    {
      "name": "Liability:Mortgage",
      "short": "Mortgage",
      "type": "Liability"
    }
  ],
  "transactions": [
    {
      "date": "2024-01-15",
      "flag": "*",
      "payee": "Salary deposit",
      "movements": [
        {
          "from": "Income:Salary",
          "to": "Asset:Bank",
          "amount": 5000,
          "commodity": "GBP",
          "description": "salary payment"
        }
      ]
    },
    {
      "date": "2024-01-20",
      "flag": "*",
      "payee": "Pay rent",
      "movements": [
        {
          "from": "Asset:Bank",
          "to": "Expense:Rent",
          "amount": 1200,
          "commodity": "GBP",
          "description": "monthly rent"
        }
      ]
    },
    {
      "date": "2024-01-25",
      "flag": "*",
      "payee": "Loan repayment",
      "movements": [
        {
          "from": "Asset:Bank",
          "to": "Liability:Mortgage",
          "amount": 800,
          "commodity": "GBP",
          "description": "repayment"
        }
      ]
    },
    {
      "date": "2024-02-01",
      "flag": "*",
      "payee": "Multi-leg payroll",
      "movements": [
        {
          "from": "Income:Salary",
          "to": "Asset:Bank",
          "amount": 4000,
          "commodity": "GBP",
          "description": "net salary",
          "linked": true
        },
        {
          "from": "Income:Salary",
          "to": "Expense:Tax",
          "amount": 1000,
          "commodity": "GBP",
          "description": "income tax",
          "linked": true
        }
      ]
    }
  ]
}

SVG Output

Salary -£10,000.00 Bank £7,000.00 Tax £1,000.00 Rent £1,200.00 Mortgage £800.00 salary payment £5,000.00 monthly rent £1,200.00 repayment £800.00 net salary £4,000.00 income tax £1,000.00 Income Asset Expense Liability