Beware what you're asking for: most comprehensive books use formal music analysis, including a Roman numeral based system that is different from the relative notation often used by guitarists to note progressions in a key-independent fashion. In particular, formal theory is heavy on detailing inversions and analyzing the consequent voice leading, and the notation assumes you know the default quality of a chord from the mode and scale degree of the chord's root. That sort of theory would glaze anyone's eyes.
A book I've been going through is The Jazz Theory Book by Mark Levine. If you're interested in the usage of advanced chords, it's a pretty good treatment, and it sticks with the familiar chord notations. But for a number of reasons, I can't recommend it to others with much enthusiasm.
Chord construction is pretty easy to understand, as is how to decipher guitar chord names—you can pick that up from musictheory.net, Wikipedia and other online sources.
If you want to learn to play any chord, given its name, and in any region of the fretboard, I recommend Sokolow and Beloff's Ukulele Fretboard Roadmaps. I've developed what I think is a more complete, and in some ways simpler, system by building on their models, but it was their book that made the bulbs light up. Lots of other good stuff in their book as well.
The real difficulty is figuring out how and when to use all the fancy chords, and, of course, training your ear to hear them and to analyze the harmonic structure so you can give a chord its proper name—the same set of pitches can be heard as several different chords, but generally, only one of those chord names will make musical sense in the given passage—and sometimes the root of that chord isn't present in the chord as played. No matter how well you write algorithms, there's no substitute for ear training. Jim D'Ville has online lessons in ear training, though I don't know if they get into complex chords and their usage.