Help Liberate Scene Datelines from Novel

I’ve written a novel, 240k words, and decided that my chapters are too long. I want to liberate scenes from chapters. Fortunately, I start every scene with a dateline: date, time, place. I’d like to create a json file listing all the scenes which I can then use to insert new chapter names. (I’ve got 50 chapters now. I want 75.)

My datelines all use paragraph styles. In fact, I don’t think there’s a single element not styled with paragraph/page styles.

Some time ago I looked at learning the embedded BASIC, but was put off by the rather non-BASIC bits you had to learn before you could start coding. I’ve used BASIC for many years, so that’s an option. Recommendation for a good tutorial would be very helpful.

Or just a way to delete all the characters in fonts 11 points and down would discard all but chapter/scene headers and I could copy/paste that into my coding editor and attack what’s left with some regex.

A common workflow is to style chapter headings and other outline paragraphs with Heading x paragraph styles. The headings are then entered into the Navigator (F5) where you can reorganise your chapters, moving them with their dependent content simultaneously.

In your case, datelines could be Heading 2 or higher, so that you have an overall view of your book. You can then navigate to the scene by double-clicking on the heading in the Navigator. There you are free to add a new chapter.

Thanks. I will explore that navigator. But I still want to liberate the scene datelines so I can get them into json. I’ve got some tools that let me look at my novel, show which characters are in which scenes and so on.

I think I see a way. Since my chapters are Heading 1, scene datelines are Heading 2 I set my outline to 2 levels (ridiculous in a novel, remind me to set it back!) copy/paste the outline into my code editor and then use a little regex. All the chapter lines start with a digit (chapter number) and all the datelines start with a day-of-week name (Sunday, Monday, etc.) Then a liberal dash of regex should turn this text file into JSON. Right?

FWIW I didn’t know that LO now supports JavaScript macros. I love JS! But googling for a nice tutorial got me nowhere. Anyone know how to write JS macros in LO? I guess I should post another question.