Here's "
IRS Publication 17 2009 - IRS Staff.mobi".
Publication 17 is the instruction book for filling out a US personal tax return. The IRS offers this as a PDF and a webpage, but nothing that quite fits onto an e-reader. This fetch of the web edition has been fixed a bit to look nice on the Kindle, and hopefully others.
If you want to convert your own pickings from the legion of IRS documents, here's how I did it. This was done with free apps on a Mac, your platform's ports may vary.
Code:
wget -rp --convert-links -I publications/p17,irs/cda/common/images,irs/cda/common/styleSheets,publications/images http://www.irs.gov/publications/p17/index.html
Yeah, fix up that wget line to chage publications/p17 in BOTH places.
Make sure nothing important got left on the server. Fix up the wget line further to catch everything, and redo as needed.
Make an ecub document, starting from an outermost set of folders (one up from "www.irs.gov" folder is good), so the heirarchy to the /images folder falls therein.
Add in the html files in an appropriate order. The chapters all have the same header, so change the chapter names to match file names (just enough to recognize them, like ch01). Use the arrow buttons to shuffle the chapters into order. PT01 files may mix in-between chapter groups, ix01 is the index, and ar0# could fall either way. Use the view button to check a questionable file out.
Modify the .html files with a perl regex, turning those <p> tags within <li> into a <span>; that way lists don't have extra newlines. Set aside the p17 folder, and rename the fixed folder into its place. This bit assumes bash, not the Windows shell.
Code:
mkdir ../fixed ; for foo in *.html ; do perl -e ' $/=""; while(<>) { s#<li>[ \n\t]*<p>#<li><span class="listPara">#g; s#</p>[ \n\t]*</li>#</span></li>#g ; print} ' <"$foo" > ../fixed/"$foo" ;done
Compile an epub. Rename the epub file to a zip, and replace wholesale what ecub included of the website rip file folder. Ecub didn't even include the images or the original style sheets, so get that whole heirarchy, such that the .html files still land at the same place as before. Re-zip the whole folder, and rename it back as an epub.
Give it to calibre, and convert into .mobi with Calibre's "look and feel" css entry filled with the IRS cleanup stylesheet for printing.
Code:
div#menu{display:none}
div.headerBar{display:none}
body div.content{float:left;display:block;border-left:0px;width:675px;}
div.contentPane{margin-left:0px;}
div.search{ display:block;background-color:#001E5A;}
body div.sub-nav-content {width:675px;}
div.navigation{ display:none;}
div.subNavigation { display:none;}
div.leftnav{ display:none}
div.leftnavxmlbc{ display:none}
div.footer#footerDiv{ display:none;}
div.footer{ display:none;}j
li.menuitem {
color:#000000;
padding-bottom:0px;
}
ul.menu {
list-style-type:square;
margin-left:0px;
}
li div.listPara{
margin: none !important;
text-indent: 4em !important;
text-align: none !important;
height: none !important;
width: none !important;
padding:none !important;
}
This work is in the Canadian public domain OR the copyright holder has given specific permission for distribution. It may still be under copyright in some countries. If you live outside Canada, check your country's copyright laws.
If the book is under copyright in your country, do not download or redistribute this work.
To report a copyright violation you can
contact us here.