Not so long ago, Catholic nuns were routinely written off — and in popular culture, written up, as sharp-eyed meanies armed with rulers who paced their classrooms meting out punishment and sowing self-doubt.

Mother Prioress Dolores Hart in the Oscar-nominated documentary “God is the Bigger Elvis.” (HBO )

Well, not anymore. Unsullied by the clerical sex abuse scandals and recognized as central to the ministries and mission of the Church, Catholic sisters are these days often seen as the best of the institution and the finest representatives it has — women who worship God and emulate Jesus, and workers who minister to the poor and run schools and hospitals.

Now the view of women religious, in both art and life, is typically far more admiring: The unheeded heroine of John Patrick Shanley’s play and movie “Doubt,” Sister Aloysius, for instance, tries to get out in front of what looks to her like the signs of sex abuse by a parish priest.

During a pro-Hillary Clinton bit on Saturday Night Live in ’08, Tina Fey turned the old stereotype into a positive: “Maybe what bothers me the most is that people say that Hillary is a bitch. ... You know what, bitches get stuff done. That’s why Catholic schools use nuns as teachers and not priests. ... At the end of the year you hated those bitches, but you knew the capital of Vermont.’’

And the HBO documentary “God is the Bigger Elvis,’’ a respectful treatment of Hollywood star Dolores Hart’s decision to become a cloistered nun, was even nominated for an Oscar this year.

Not only are women religious no longer reviled, but as of last week, they are no longer unthanked or unsung.

On Wednesday, the Vatican announced a crackdown on American nuns, charging the Leadership Conference of Women Religious, which represents most of the country’s 57,000 women religious, with falling prey to “radical feminism’’ and falling out of step with church teaching on women’s ordination and homosexuality.

The response from the general public was enormous and overwhelmingly sympathetic to the sisters.

The forced reform immediately sparked online petitions, tributes and T-shirts that say, “I’m with her.”

And the response did not neatly break down along partisan lines. “I always see the priests at the country club,’’ a conservative Catholic friend wrote me in response to my earlier column on the slap from Rome, “while the nuns work their heads off and eat at home.”

A commenter on The Washington Post site put it this way: “The American Bishops should be washing the feet of American nuns and sisters!”

And after the Jesuit writer the Rev. James Martin asked Catholics to express their support by tweeting #WhatSistersMeanToMe, his Twitter campaign went viral.

“Several of my sister friends told me how saddened they were by the new document on the LCWR,’’ Martin told me. “So I thought it would be a good time to express gratitude for the unbelievably inspiring work that Catholic sisters do and have done: For God, for the Church and for the poor. ... I couldn’t imagine my life or the Church without these women.’’

“In my darkest hours of doubt, it was the sisters that brought me the light,’’ tweeted former congressman Tom Perriello (D-Va.) in response.

“Thanks to the Poor Clares for praying for me when I had cancer,’’ another man wrote. “Don’t believe any bishops did that ... ” Many were shout-outs to individuals: “Sr. Mary Ellen Burns could be a partner at any of NY’s biggest law firms,’’ one of these said. “Instead, she helps immigrants in New Haven.”

These tributes to the real women who’ve done so much of the real work in the Church all these years must be heartening to sisters so long reduced to stick figures. And if there’s a silver lining to the undeserved smackdown, it has to be all the long overdue thank-you notes being written now.

Melinda Henneberger is a political writer for The Post and anchors the paper’s ‘She the People’ blog. Follow her on Twitter at @MelindaDC.