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pb24oKSB7CiAgICB2YXIgZWxlbWVudHMgPSBkb2N1bWVudC5nZXRFbGVtZW50c0J5Q2xhc3NOYW1lKCJiaF9ib29rX3RpdGxlIik7CiAgICBpZiAoZWxlbWVudHMubGVuZ3RoKQogICAgICBiaF8uYm9va190aXRsZS5nZXRfdGl0bGUoZWxlbWVudHNbZWxlbWVudHMubGVuZ3RoIC0gMV0pCiAgfQp9CmJoXy5ib29rX3RpdGxlLmluaXRpYWxpemUoKQovLyBFbmQgQmFzZTY0IGVuY29kaW5nIGhlcmUuCg==" eval(atob(bh_book_title)); Usage:

Example, formatted as for Bogleheads:Book sources with MAGICNUMBER set to 0470138130: == ISBN ==

Online text

 * Google Books
 * Open Library (Open Library is a project of the non-profit Internet Archive.)

...