Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Clone this wiki locally
Expense.txt allows you to track and analyze your expenses using plain text files.
|-f “<File Path>”, —file=“<File Path>”||Define the active file to analyze|
|-s “<File Path>”, —save=“<File Path>”||Save output to a file|
|-i “<File Path>”, —import=“<File Path>”||Define a file to import into the active file|
|-a ‘4-19-11:Expense for work $100 @category +project’, —add=‘4-19-11:Expense for work $100 @category +project’||Add a line to the active file|
The following command defines the active file and displays all expenses in the project “+project”
./expense -f "~/expenses.txt" +project
4-19-2011:New Server @warehouse $2200 +project 4-25-2011:Printing expenses $1,535 +project Lunch with client +project $50 Total expenses: $3,785.00
Once I’ve defined the active file I don’t have to specify it unless I want to change that setting. In this next command I want to see items both in the project “+project” and in the category “@warehouse”.
./expense +project and @warehouse
4-19-2011:New Server @warehouse $2200 +project Total expenses: $2,200.00
This time I want see any expense that is in the category “@bob” or in the project “+project”. I also want to save the output to a text file instead of displaying it to the screen.
./expense +project or @bob --save="results.txt"
Example Contents of results.txt:
4-25-2011: Expense caused by Bob @bob $600 4-19-2011:New Server @warehouse $2200 +project 4-25-2011:Printing expenses $1,535 +project Lunch with client +project $50
This time I want any expense in the project “+project” that happened after 4/20. I also want to save the output to a csv instead of displaying it to the screen.
./expense +project and ">4-20-2011" --save="results.csv"
Example Contents of results.csv:
Date,Price,Project,Category,Note 2011-04-25,"1,535",project,,Printing expenses
In this example I want to import the results.csv (you can also import plain text files) into my active file and display any item greater than $1000.
./expense ">1000" --import="results.csv"
4-19-2011:New Server @warehouse $2200 +project 4-25-2011:Printing expenses $1,535 +project 2011-04-25: Printing expenses $1,535 +project Total expenses: $5,270.00
This time I simply want to add an expense to my active file:
./expense --add='4/20/2011: My new expense $55 @electronics +personal'
The Super Easy Way to Install (Macports)
You can install this application using MacPorts! Type the following:
sudo port -v selfupdate sudo port install expense.txt
This method takes care of all dependancies and can manage updates for you. For information on installing MacPorts, please visit their site.
Installing expense.txt is pretty easy. Because Macs and Linux already include Python, all you need to do is download the expense.txt source, decompress it, and move it wherever you want. Of course, if you use expense.txt a lot you might want to add your installation location to your PATH variable.
On Windows, you need to download Python 2.x and install it before installing expense.txt. Or install the version of expense.txt containing Python.
Windows (Zip file, Contains Python):https://github.com/tazzben/expense.txt/blob/master/dist/expense_dist.zip
Windows (Zip file): https://github.com/tazzben/expense.txt/blob/master/dist/expense.zip
Mac/Linux/Etc (tar.gz file): https://github.com/tazzben/expense.txt/blob/master/dist/expense.tar.gz