INotebookPostProcessor Interface#
Extension capability for post-processing notebooks after deserialization and before serialization. Implementations can transform cells, inject metadata, or migrate legacy formats.
public interface INotebookPostProcessor : Verso.Abstractions.IExtension
Implements IExtension
Properties#
Priority Property#
Execution priority. Lower values run first.
int Priority { get; }
Property Value#
Methods#
CanProcess(string, string) Method#
Determines whether this post-processor should run for the given file and format.
bool CanProcess(string? filePath, string formatId);
Parameters#
filePath System.String
The file path being opened/saved, or null if not available.
formatId System.String
The serialization format identifier (e.g. "jupyter", "verso-native").
Returns#
System.Boolean
true if this post-processor should participate.
PostDeserializeAsync(NotebookModel, string) Method#
Transforms a notebook after deserialization (on open/import).
System.Threading.Tasks.Task<Verso.Abstractions.NotebookModel> PostDeserializeAsync(Verso.Abstractions.NotebookModel notebook, string? filePath);
Parameters#
notebook NotebookModel
The deserialized notebook model.
filePath System.String
The source file path, or null if not available.
Returns#
System.Threading.Tasks.Task<NotebookModel>
The (possibly modified) notebook model.
PreSerializeAsync(NotebookModel, string) Method#
Transforms a notebook before serialization (on save/export).
System.Threading.Tasks.Task<Verso.Abstractions.NotebookModel> PreSerializeAsync(Verso.Abstractions.NotebookModel notebook, string? filePath);
Parameters#
notebook NotebookModel
The notebook model about to be serialized.
filePath System.String
The target file path, or null if not available.
Returns#
System.Threading.Tasks.Task<NotebookModel>
The (possibly modified) notebook model.