This program has been deprecated in favor of Fixie3, the main improvement being that Fixie3 doesn't require Java as a dependency and runs fully native Python. Find it at projects/fixie3.
This script processes a 1099 form in .pdf format, extracting data from the 1099-DIV and 1099-B sections on the Summary Information page. It also extracts data from the Detail for Dividends and Distributions pages, grouping and summing by ticker symbol. The output is a set of .csv files:
summary.csv
. Extracts the 1099-DIV section from Summary Information page.income.csv
. Displays data from the Detail for Dividends and Distributions pages. Groups and sums rows by ticker symbol, with these columns:- Nonqualified dividends
- Qualified dividends
- Short term capital gains
- Long term capital gains
- Section 199A dividends
- Foreign taxes paid
- Tax exempt income
broker_transactions.csv
. Extracts data from the 1099-B section of the Summary Information page ("Summary of Proceeds, Gains & Losses"), parsed into these columns:- Short term gain/loss
- Long term gain/loss
- Undetermined total
- Grand total
result.xmls
is a single file combining the data described above into three worksheets.
The script takes a PDF file, extracts specific sections into ./input
, then processes the data using PyPDF2 and tabula-py. After processing, it deletes the copies in ./input
, leaving the original file untouched, and stores output files into ./output
. This tool is a complement to a tax calculator spreadsheet.
- Python and Java are required dependencies for this program.
- Activate the virtual environment:
source venv/bin/activate
. - Install dependencies:
pip3 install -r requirements.txt
. - Create two empty folders in the main directory:
./input
and./output
. - Place a 1099 file (in .pdf format) into the
./input
folder. - Go to
app.py
and change this line:summary_table = summary('./input/summary.pdf', '2023')
for your desired year instead of "2023". Do the same inlocal.py
. (Promise to fix this some day). - Run the program:
python3 local.py
. - Find the result files in the
./output
folder.
To use this program as a Quick Action on a Mac:
- Create an Automator Quick Action that points to
./driver.sh
(an example script and guide is provided in./automator.sh
). - Add your Quick Action to Finder on your Mac.
- Right-click any file in Finder; the Quick Action you created should be displayed under 'Quick Actions' (tested on Mac OS X Sonoma 14.1.1).
Please feel free to clone, fork, or contribute in any way you find interesting.
Resources and related topics worth to investigate IMO: