- About Expenses
- How to install
- Custom settings
- Importing Bank Statements
- Interactive functions
- Screenshots
Expenses
is an Emacs
package to keep records of your expenses and view expenses conveniently.
- Expenses could be calculated for given date/month/months/year.
- Expenses could be filtered by one or more categories for a given time period.
- Expenses could be imported from
CSV
files and entries would be added to appropriate files. - It saves the expenses in an
org-table
inside anorg
file. - For each month, a separate
org
file is created with the year and month as a prefix to the file names. - It uses the
org-table
formulas to calculate expenses for the given period. - Expenses could be tracked per user basis
Expenses
is available in MELPA. With use-package
you can do something like
(use-package expenses
:ensure t)
or if you use straight
then
(use-package expenses
:straight t)
- Directory for saving the expense
org
files(setq expenses-directory "/path/to/directory")
- Category list for expenses
(setq expenses-category-list '("Bike" "Car" "Clothes" "Coffee" "Electronics" "Entertainment" "Fee" "Food" "Gift" "Health" "Home" "Petrol" "Other" "Sport" "Subscriptions" "Travel" "Transfer" "Utilities"))
- Currency
(setq expenses-currency "$")
You can import directly from Bank CSV exports using expenses-import-expense
. Example CSV export from a bank
Bank Account,Date,Narrative,Debit Amount,Credit Amount,Balance,Categories,Serial 5544,05/12/2021,"THAT CAFE SYDNEY AUS",4.00,,0.00,OTHER,
First look at the CSV to determine the order remember that it starts at zero for the first column. NOTE: If category is set to -1 then you will be prompted to assign categories for each line.
To be able to import expenses from bank statements conveniently, you can set profiles
for your banks using the varibale expenses-bank-profiles
. This is a list where each element
is of the form (bank-name sep date-col debit-col date-format narrative-col category-col)
(setq expenses-bank-profiles (("EXAMPLE-BANK" "," 1 3 "dd/mm/yyyy" 2 -1)
("ANOTHER-BANK" "\t" 1 4 "yyyy/mm/dd" 2 3)))
Then you import bank statements using expenses-import-expense-with-bank-profile
You can auto assign based on keyword or phrase. To turn this on first do the following
(setq expenses-utils-auto-assign-categies-on-import t)
You can override the default phrases and keywords in your init.el file with the following
(require 'ht)
(setq expenses-utils-phrases-alist '(("BUDGET DIRECT" . "Car")
("WW METRO" . "Petrol")
("RS COMPONENTS" . "Electronics")))
(setq expenses-utils-keyword-category-ht (ht ("7-ELEVEN" "Petrol")
("BP" "Petrol")
("CALTEX" "Petrol")
("UNITED" "Petrol")
("GYM" "Sport")
("YOUTUBE" "Subscriptions")
("MYKI" "Travel")
("WATER" "Utilities")))
Sometime you may want to ignore some transactions. This could be done by providing a list
of keywords
or a list
of phrases
. While importing your
bank statements, it would look for words or phrases in the provided lists and ignore the transaction if it finds one. There are two varibales to set here.
First one is the expenses-utils-ignore-keywords-list
for providing a list
of keywords
and the second one is the expenses-utils-ignore-phrases-list
for providing
a list
of phrases
. Examples,
(setq expenses-utils-ignore-keywords-list '("keyword1" "keyword2"))
(setq expenses-utils-ignore-phrases-list '("this is phrase one" "this is phrase 2"))
Interactive functions | Actions |
---|---|
expenses-add-expense | Add an expense entry |
expenses-view-expense | View expense file |
expenses-calc-expense-for-day | Calculate expenses in a day |
expenses-calc-expense-for-month | Calculate expenses in a month |
expenses-calc-expense-for-months | Calculate expenses in a range of months |
expenses-calc-expense-for-year | Calculate expenses in a year |
expenses-calc-expense-by-category | Calculate expenses in one or more category for a given date or month |
expenses-import-expense | Import expense from CSV files |
expenses-pie-expense-for-month-filtered-by-categories | Create a pie chart of expenses in different categories |
expenses-import-expense-with-bank-profile | Import expense from CSV files using user customized profiles |