It was a strange idea to begin with: Bill O’Reilly, perhaps the most impolite man on television, writing a book for children espousing the importance of politeness. But now that book, “Give Please a Chance,” co-written by blockbuster thriller writer James Patterson, seems like the set-up for a late-night TV joke.

The book, aimed at children ages 3 to 6, harks back to the good old days, when people held doors for others, nodded hello, minded their manners.

“James and I believe we can bring that civility and compassion back into the world,” the authors suggest. “Let’s start today with our children, by encouraging them to always say that wonderful, magical word: (BEGIN ITAL)please(END ITAL).”

A noble goal, for sure. And yet it’s hard to swallow his advice now, given the sexual harassment scandal that drove O’Reilly out of his job this week. How often, one wonders, did he use the magical word “please” in his interactions with women at Fox News?

O’Reilly’s publisher declined to comment on whether there will be any changes to the book’s publication plan. (Last week Bill Cosby’s children’s book series “Little Bill” made the American Library Association’s list of most banned books of 2016, a status it earned not because of its content but because of the behavior of its author.)

Published in November by the Jimmy Patterson imprint of Hachette, “Give Please a Chance” sold briskly when it first hit the shelves.

And yet now the book looks like a ribald parody. The cover alone — an image of a little girl with an expression of exuberant begging, her hands clasped almost in prayer — seems ready-made for Stephen Colbert’s show.

Other images in this picture book include one of a little girl, partially dressed, asking for help putting on the rest of her outfit. … A hungry boy hovers over a plate of chocolate-chip cookies, his tongue hanging out in greedy expectation: “I really, really need a cookie!” says the caption. “Can we take them all?” asks a little girl of a litter of kittens. “Please?” Some of the children have already committed a no-no — a girl who has dipped her finger in a bowl of frosting, a little boy who has broken a dish — and are asking for forgiveness by saying “Please!” after the fact. (BEGIN ITAL)Wink, wink(END ITAL).

In his 2004 book, “The O’Reilly Factor for Kids,” the TV personality offered wise counsel to a slightly older set on matters like body image (“I’m not saying that you’re unattractive or unlikable because you’re overweight”) and bullying (“Bullies are cowards”) as well as a few “instant messages” to help kids learn to behave like “smart operators” rather than — a favorite word from his show — “pinheads.” Remember, boys and girls: “A smart operator is a kid who doesn’t blame anyone else for his mistakes.”

Good advice — then and now. Perhaps O’Reilly ought to heed it himself.