Open adowling2 opened 4 years ago
Interesting idea. Would be enough to do the following ...
Maybe that's saying same thing you intended, just trying to be sure I understand.
Yes, that would work. We should also keep the under-construction tag.
Looking into this. Trickier than it might seem. In this case, the under-construction removal requires access to the nbpages "level" metadata that is inserted when the sections are numbered. Removing the under-construction items amounts to rewriting the notebooks after numbering and adding metadata.
The problem is that I've assumed there is no rewriting of the notebooks during nbpages processing. Based on that assumption, the various indices are constructed just once and cached for reuse. So the indices would would have out-of-date information unless there is a lot of care about order of operations.
I'd suggest that a new class be created for handling indices, and then revisit this issue.
Proposal: With a special command-line option, if
nbpages
finds a header cell with the tagunder-construction
, it will strip out replace all of the subsequent non-header cells that under it with custom text. We can make the default "This notebook section is under construction". Check again soon."Example with three markdown cells:
If I tagged the first cell with
under-construction
, then the contents "blah B blah B, blah B" and "blah C blah C, blah C" would get replaced with "This notebook section is under construction".Why is this helpful? I want to start migrating old class notebooks but I do not want to make the contents, besides the header structure, public. Some notebooks require a major text or example rewrite. I'd prefer to get everything online and "under construction" then systematically clean notebooks up one section at a time.