returning descriptions as json to preserve new lines
fredzannarbor opened this issue · comments
Hi, would it be possible to return descriptions as json so as to give the option to preserve paragraphing in the text?
E.g. print(isbnlib.desc('9781608881802')) returns this:
Simply put, there has never been a braver or more dashing collection of US
navy sailors, ever. SEALS, naval aviators, submariners, yes, to be sure,
they're all very dashing and very brave--but PT boat crews stood in
shirtsleeves on the decks of wooden speedboats and sprinted under heavy
fire toward enemy warships a hundred times their size. They didn't have
Kevlar vests, they didn't have air superiority, and they didn't have
stealth technology. They took great risks, in person, at the height of
WWII, at the times and in the theaters where the risk of defeat was at its
highest. PT Boats fought it out with the enemy under heavy fire, often at
night, against warships, planes, barges, and shore installations. For quite
a long time, PT boats and PT boat sailors were incredibly famous. Douglas
Macarthur was rescued from the Phillippines aboard a PT boat. The most
decorated PT boat captain, Lieutenant John D. Bulkeley, was awarded the
Medal of Honor. During the war years PT boat images were plastered on every
conceivable type of marketing paraphernalia. Arguably the most handsome and
charismatic US President ever, John F. Kennedy, was a PT boat captain and
hero. His boat, PT 109, and crew were prominently featured in his 1960
election campaign. Had he survived to serve out two terms and live the full
life he deserved, we would still be reading about PT 109. Such is the power
and fickleness of myth. The artifacts that Frank shares with readers do a
wonderful job of conveying the feeling of time and place. Myths can and
should rise again. This book includes 239 color images with detailed
captions. There is a Foreword by PT boat sailor and World War II veteran
Arthur John Frongello, Quartermaster Third Class, who served aboard PT 302
as a member of Squadron 22. Author Frank J. Andruss, Sr. writes in the
Preface: My passion for the history of the PT boats began as a very young
child, when, in 1967, my Dad suggested that I watch the movie PT 109. This
started my life-long journey in which as a young twenty-year-old I had the
pleasure of meeting so many PT boat veterans and started to collect some of
these treasured artifacts of the PT Navy. Over the years I would begin to
create "The Mosquito Fleet Exhibit" in which I would use these artifacts to
tell the story and provide the history that so many people did not know
about. It is my hope that, through these artifacts that were such a large
part of PT history, this book brings new attention to the PT navy during
World War II. In this book I hope to tell the stories of the brave sailors
that served on the boats. PT boats played important roles from the first
days of the war. They were in the Philippines, at Guadalcanal, at New
Guinea, in the Med, at Surigao Strait. Their crews deserve to be remembered
when World War II history is told. Although the PT boat has long since
gone, the bravery of the men who rode on her decks should never be
forgotten.
To preserve compatibility with previous versions I cannot change the return type of isbnlib
functions.
Anyway, the text comes from the original service without 'paragraphing', so isbnlib.desc
cannot preserve 'paragraphing'! By 'paragraphing' I think you mean 'end of line characters'... and if you want to get rid of them just use [text].replace(os.linesep)
.
Thanks