When J.K. Rowling announced last October that her Harry Potter series would get a new story—in the form of a play that featured her beloved book characters as adults—fans greeted the news with mixed feelings. As I wrote at the time, it was exciting to see the author experiment with a new medium and a non-Harry-centric tale in Harry Potter and the Cursed Child. The play picks up the story 19 years after Harry Potter and the Deathly Hallows, and focuses on Harry’s relationship with his son, Albus Severus. The casting choices that were later announced—with a black actress, Noma Dumezweni, in the role of grown-up Hermione—were even more heartening.

And yet. I complained that few of Rowling’s millions of fans would be able to actually attend (or afford tickets to) the two-part play during its run in London’s West End: “The nature of the theater experience means the vast majority of fans won’t get to experience the communal joy of seeing what Rowling’s dreamed up for them. They’ll be trying not to feel too sad that the first new Harry Potter story in almost 10 years won’t be one they can binge-read the day it comes out.”

Praise Dumbledore’s beard, I was wrong. The publisher Scholastic announced Wednesday that both parts of Harry Potter and the Cursed Child would be published as a script book, to be released in the U.S. and Canada just after midnight on July 31, 2016—roughly the anniversary of when Hagrid would have visited Harry for the first time with a messy birthday cake and a letter in tow, to change his life forever. (The play—written by Jack Thorne and based on a story by Rowling, Thorne, and the director John Tiffany—has its official world premiere the day before.)

Little, Brown Book Group will publish a print version in the U.K., and Pottermore will publish a digital version of the book that should make it available to readers in other countries. The book released July 31 will be a “special rehearsal edition,” featuring a version of the script used during the show’s preview period, when changes can still be made to the story. A “definitive collector’s edition” will be published later.

Sure, squinting at stage directions and lines of dialogue in the wee hours of the morning won’t quite be the same as sitting in a spacious theater and letting a talented crop of actors tell the newest Harry Potter story, with the help of beautiful set design, costumes, music, lighting, and special effects. But it’s likely that most readers won’t care, knowing that dry eyes and a stiff neck are small, and very familiar, prices to pay for a chance to visit that world again.