Lost in the Wilds of Brazil by Foster, James H.
 is a Project Gutenberg book, now on Github.